OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_ALARMS_ALARMS_API_H__ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_ALARMS_ALARMS_API_H__ |
6 #define CHROME_BROWSER_EXTENSIONS_API_ALARMS_ALARMS_API_H__ | 6 #define CHROME_BROWSER_EXTENSIONS_API_ALARMS_ALARMS_API_H__ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "chrome/browser/extensions/extension_function.h" | 9 #include "chrome/browser/extensions/extension_function.h" |
10 | 10 |
11 namespace extensions { | 11 namespace extensions { |
12 | 12 |
13 class AlarmsCreateFunction : public SyncExtensionFunction { | 13 class AlarmsCreateFunction : public SyncExtensionFunction { |
14 protected: | 14 protected: |
15 virtual bool RunImpl() OVERRIDE; | 15 virtual bool RunImpl() OVERRIDE; |
16 DECLARE_EXTENSION_FUNCTION_NAME("experimental.alarms.create"); | 16 DECLARE_EXTENSION_FUNCTION_NAME("experimental.alarms.create"); |
| 17 private: |
| 18 virtual bool ValidateDelayTime(double delay_in_minutes); |
17 }; | 19 }; |
18 | 20 |
19 class AlarmsGetFunction : public SyncExtensionFunction { | 21 class AlarmsGetFunction : public SyncExtensionFunction { |
20 protected: | 22 protected: |
21 virtual bool RunImpl() OVERRIDE; | 23 virtual bool RunImpl() OVERRIDE; |
22 DECLARE_EXTENSION_FUNCTION_NAME("experimental.alarms.get"); | 24 DECLARE_EXTENSION_FUNCTION_NAME("experimental.alarms.get"); |
23 }; | 25 }; |
24 | 26 |
25 class AlarmsGetAllFunction : public SyncExtensionFunction { | 27 class AlarmsGetAllFunction : public SyncExtensionFunction { |
26 protected: | 28 protected: |
27 virtual bool RunImpl() OVERRIDE; | 29 virtual bool RunImpl() OVERRIDE; |
28 DECLARE_EXTENSION_FUNCTION_NAME("experimental.alarms.getAll"); | 30 DECLARE_EXTENSION_FUNCTION_NAME("experimental.alarms.getAll"); |
29 }; | 31 }; |
30 | 32 |
31 class AlarmsClearFunction : public SyncExtensionFunction { | 33 class AlarmsClearFunction : public SyncExtensionFunction { |
32 protected: | 34 protected: |
33 virtual bool RunImpl() OVERRIDE; | 35 virtual bool RunImpl() OVERRIDE; |
34 DECLARE_EXTENSION_FUNCTION_NAME("experimental.alarms.clear"); | 36 DECLARE_EXTENSION_FUNCTION_NAME("experimental.alarms.clear"); |
35 }; | 37 }; |
36 | 38 |
37 class AlarmsClearAllFunction : public SyncExtensionFunction { | 39 class AlarmsClearAllFunction : public SyncExtensionFunction { |
38 protected: | 40 protected: |
39 virtual bool RunImpl() OVERRIDE; | 41 virtual bool RunImpl() OVERRIDE; |
40 DECLARE_EXTENSION_FUNCTION_NAME("experimental.alarms.clearAll"); | 42 DECLARE_EXTENSION_FUNCTION_NAME("experimental.alarms.clearAll"); |
41 }; | 43 }; |
42 | 44 |
43 } // namespace extensions | 45 } // namespace extensions |
44 | 46 |
45 #endif // CHROME_BROWSER_EXTENSIONS_API_ALARMS_ALARMS_API_H__ | 47 #endif // CHROME_BROWSER_EXTENSIONS_API_ALARMS_ALARMS_API_H__ |
OLD | NEW |