• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_IDLE_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_IDLE_API_H_
7 #pragma once
8 
9 #include "chrome/browser/idle.h"
10 #include "chrome/browser/extensions/extension_function.h"
11 
12 class Profile;
13 
14 // Event router class for events related to the idle API.
15 class ExtensionIdleEventRouter {
16  public:
17   static void OnIdleStateChange(Profile* profile,
18                                 IdleState idleState);
19  private:
20   DISALLOW_COPY_AND_ASSIGN(ExtensionIdleEventRouter);
21 };
22 
23 // Implementation of the chrome.idle.queryState API.
24 class ExtensionIdleQueryStateFunction : public SyncExtensionFunction {
25  public:
26   virtual bool RunImpl();
27   DECLARE_EXTENSION_FUNCTION_NAME("idle.queryState")
28 };
29 
30 #endif  // CHROME_BROWSER_EXTENSIONS_EXTENSION_IDLE_API_H_
31