Reland the ULONG -> SIZE_T change from 317177
[chromium-blink-merge.git] / extensions / browser / api / idle / idle_api.h
blob60f13ade5ac990307fc3bfbc9dbd445cd889f150
1 // Copyright (c) 2012 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.
5 #ifndef EXTENSIONS_BROWSER_API_IDLE_IDLE_API_H_
6 #define EXTENSIONS_BROWSER_API_IDLE_IDLE_API_H_
8 #include "extensions/browser/extension_function.h"
9 #include "ui/base/idle/idle.h"
11 namespace extensions {
13 // Implementation of the chrome.idle.queryState API.
14 class IdleQueryStateFunction : public UIThreadExtensionFunction {
15 public:
16 DECLARE_EXTENSION_FUNCTION("idle.queryState", IDLE_QUERYSTATE)
18 protected:
19 ~IdleQueryStateFunction() override {}
21 // UIThreadExtensionFunction:
22 ResponseAction Run() override;
24 private:
25 void IdleStateCallback(ui::IdleState state);
28 // Implementation of the chrome.idle.setDetectionInterval API.
29 class IdleSetDetectionIntervalFunction : public UIThreadExtensionFunction {
30 public:
31 DECLARE_EXTENSION_FUNCTION("idle.setDetectionInterval",
32 IDLE_SETDETECTIONINTERVAL)
34 protected:
35 ~IdleSetDetectionIntervalFunction() override {}
37 // UIThreadExtensionFunction:
38 ResponseAction Run() override;
41 } // namespace extensions
43 #endif // EXTENSIONS_BROWSER_API_IDLE_IDLE_API_H_