OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_WEBVIEW_WEBVIEW_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_IDENTITY_PRIVATE_IDENTITY_PRIVATE_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_WEBVIEW_WEBVIEW_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_IDENTITY_PRIVATE_IDENTITY_PRIVATE_API_H_ |
7 | 7 |
8 #include "chrome/browser/extensions/extension_function.h" | 8 #include "chrome/browser/extensions/extension_function.h" |
9 #include "chrome/browser/extensions/script_executor.h" | |
10 | 9 |
11 class WebviewExecuteScriptFunction : public AsyncExtensionFunction { | 10 namespace extensions { |
| 11 |
| 12 class IdentityPrivateGetResourcesFunction : public SyncExtensionFunction { |
12 public: | 13 public: |
13 DECLARE_EXTENSION_FUNCTION("webview.executeScript", WEBVIEW_EXECUTESCRIPT) | 14 DECLARE_EXTENSION_FUNCTION("identityPrivate.getResources", |
14 | 15 IDENTITYPRIVATE_GETRESOURCES); |
15 WebviewExecuteScriptFunction(); | 16 IdentityPrivateGetResourcesFunction(); |
16 | 17 |
17 protected: | 18 protected: |
18 virtual ~WebviewExecuteScriptFunction(); | 19 virtual ~IdentityPrivateGetResourcesFunction(); |
19 | 20 |
20 // ExtensionFunction implementation. | 21 // ExtensionFunction: |
21 virtual bool RunImpl() OVERRIDE; | 22 virtual bool RunImpl() OVERRIDE; |
22 | 23 |
23 private: | 24 private: |
| 25 DISALLOW_COPY_AND_ASSIGN(IdentityPrivateGetResourcesFunction); |
| 26 }; |
24 | 27 |
25 void OnExecuteCodeFinished(const std::string& error, | 28 } // extensions |
26 int32 on_page_id, | |
27 const GURL& on_url, | |
28 const ListValue& result); | |
29 | 29 |
30 }; | 30 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_PRIVATE_IDENTITY_PRIVATE_API_H
_ |
31 #endif // CHROME_BROWSER_EXTENSIONS_API_WEBVIEW_WEBVIEW_API_H_ | |
OLD | NEW |