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 // Defines the Chrome Extensions Managed Mode API relevant classes to realize | 5 // Defines the Chrome Extensions Managed Mode API relevant classes to realize |
6 // the API as specified in the extension API JSON. | 6 // the API as specified in the extension API JSON. |
7 | 7 |
8 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGED_MODE_API_H_ | 8 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGED_MODE_API_H_ |
9 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGED_MODE_API_H_ | 9 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGED_MODE_API_H_ |
10 #pragma once | 10 #pragma once |
11 | 11 |
12 #include "chrome/browser/extensions/extension_function.h" | 12 #include "chrome/browser/extensions/extension_function.h" |
13 | 13 |
14 class GetManagedModeFunction : public SyncExtensionFunction { | 14 class GetManagedModeFunction : public SyncExtensionFunction { |
15 public: | 15 public: |
16 virtual ~GetManagedModeFunction(); | 16 virtual ~GetManagedModeFunction(); |
17 virtual bool RunImpl() OVERRIDE; | 17 virtual bool RunImpl() OVERRIDE; |
18 DECLARE_EXTENSION_FUNCTION_NAME("experimental.managedMode.get") | 18 DECLARE_EXTENSION_FUNCTION_NAME("managedModePrivate.get") |
19 }; | 19 }; |
20 | 20 |
21 class EnterManagedModeFunction : public AsyncExtensionFunction { | 21 class EnterManagedModeFunction : public AsyncExtensionFunction { |
22 public: | 22 public: |
23 virtual ~EnterManagedModeFunction(); | 23 virtual ~EnterManagedModeFunction(); |
24 virtual bool RunImpl() OVERRIDE; | 24 virtual bool RunImpl() OVERRIDE; |
25 DECLARE_EXTENSION_FUNCTION_NAME("experimental.managedMode.enter") | 25 DECLARE_EXTENSION_FUNCTION_NAME("managedModePrivate.enter") |
26 | 26 |
27 private: | 27 private: |
28 // Called when we have either successfully entered managed mode or failed. | 28 // Called when we have either successfully entered managed mode or failed. |
29 void SendResult(bool success); | 29 void SendResult(bool success); |
30 }; | 30 }; |
31 | 31 |
32 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGED_MODE_API_H_ | 32 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGED_MODE_API_H_ |
OLD | NEW |