OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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_CHROME_EXTENSIONS_BROWSER_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSIONS_BROWSER_CLIENT_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSIONS_BROWSER_CLIENT_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSIONS_BROWSER_CLIENT_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 namespace content { | 24 namespace content { |
25 class BrowserContext; | 25 class BrowserContext; |
26 } | 26 } |
27 | 27 |
28 namespace extensions { | 28 namespace extensions { |
29 | 29 |
30 class ChromeComponentExtensionResourceManager; | 30 class ChromeComponentExtensionResourceManager; |
31 class ChromeExtensionsAPIClient; | 31 class ChromeExtensionsAPIClient; |
32 class ChromeProcessManagerDelegate; | 32 class ChromeProcessManagerDelegate; |
| 33 class ClipboardExtensionHelper; |
33 | 34 |
34 // Implementation of BrowserClient for Chrome, which includes | 35 // Implementation of BrowserClient for Chrome, which includes |
35 // knowledge of Profiles, BrowserContexts and incognito. | 36 // knowledge of Profiles, BrowserContexts and incognito. |
36 // | 37 // |
37 // NOTE: Methods that do not require knowledge of browser concepts should be | 38 // NOTE: Methods that do not require knowledge of browser concepts should be |
38 // implemented in ChromeExtensionsClient even if they are only used in the | 39 // implemented in ChromeExtensionsClient even if they are only used in the |
39 // browser process (see chrome/common/extensions/chrome_extensions_client.h). | 40 // browser process (see chrome/common/extensions/chrome_extensions_client.h). |
40 class ChromeExtensionsBrowserClient : public ExtensionsBrowserClient { | 41 class ChromeExtensionsBrowserClient : public ExtensionsBrowserClient { |
41 public: | 42 public: |
42 ChromeExtensionsBrowserClient(); | 43 ChromeExtensionsBrowserClient(); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 void BroadcastEventToRenderers( | 99 void BroadcastEventToRenderers( |
99 events::HistogramValue histogram_value, | 100 events::HistogramValue histogram_value, |
100 const std::string& event_name, | 101 const std::string& event_name, |
101 std::unique_ptr<base::ListValue> args) override; | 102 std::unique_ptr<base::ListValue> args) override; |
102 net::NetLog* GetNetLog() override; | 103 net::NetLog* GetNetLog() override; |
103 ExtensionCache* GetExtensionCache() override; | 104 ExtensionCache* GetExtensionCache() override; |
104 bool IsBackgroundUpdateAllowed() override; | 105 bool IsBackgroundUpdateAllowed() override; |
105 bool IsMinBrowserVersionSupported(const std::string& min_version) override; | 106 bool IsMinBrowserVersionSupported(const std::string& min_version) override; |
106 ExtensionWebContentsObserver* GetExtensionWebContentsObserver( | 107 ExtensionWebContentsObserver* GetExtensionWebContentsObserver( |
107 content::WebContents* web_contents) override; | 108 content::WebContents* web_contents) override; |
| 109 void SaveImageDataToClipboard(const std::vector<char>& image_data, |
| 110 clipboard::ImageType type, |
| 111 const base::Closure& success_callback, |
| 112 const base::Closure& error_callback) override; |
108 void ReportError(content::BrowserContext* context, | 113 void ReportError(content::BrowserContext* context, |
109 std::unique_ptr<ExtensionError> error) override; | 114 std::unique_ptr<ExtensionError> error) override; |
110 void CleanUpWebView(content::BrowserContext* browser_context, | 115 void CleanUpWebView(content::BrowserContext* browser_context, |
111 int embedder_process_id, | 116 int embedder_process_id, |
112 int view_instance_id) override; | 117 int view_instance_id) override; |
113 void AttachExtensionTaskManagerTag(content::WebContents* web_contents, | 118 void AttachExtensionTaskManagerTag(content::WebContents* web_contents, |
114 ViewType view_type) override; | 119 ViewType view_type) override; |
115 scoped_refptr<update_client::UpdateClient> CreateUpdateClient( | 120 scoped_refptr<update_client::UpdateClient> CreateUpdateClient( |
116 content::BrowserContext* context) override; | 121 content::BrowserContext* context) override; |
117 std::unique_ptr<ExtensionApiFrameIdMapHelper> | 122 std::unique_ptr<ExtensionApiFrameIdMapHelper> |
(...skipping 13 matching lines...) Expand all Loading... |
131 // Support for ProcessManager. | 136 // Support for ProcessManager. |
132 std::unique_ptr<ChromeProcessManagerDelegate> process_manager_delegate_; | 137 std::unique_ptr<ChromeProcessManagerDelegate> process_manager_delegate_; |
133 | 138 |
134 // Client for API implementations. | 139 // Client for API implementations. |
135 std::unique_ptr<ChromeExtensionsAPIClient> api_client_; | 140 std::unique_ptr<ChromeExtensionsAPIClient> api_client_; |
136 | 141 |
137 std::unique_ptr<ChromeComponentExtensionResourceManager> resource_manager_; | 142 std::unique_ptr<ChromeComponentExtensionResourceManager> resource_manager_; |
138 | 143 |
139 std::unique_ptr<ExtensionCache> extension_cache_; | 144 std::unique_ptr<ExtensionCache> extension_cache_; |
140 | 145 |
| 146 std::unique_ptr<ClipboardExtensionHelper> clipboard_extension_helper_; |
| 147 |
141 std::unique_ptr<KioskDelegate> kiosk_delegate_; | 148 std::unique_ptr<KioskDelegate> kiosk_delegate_; |
142 | 149 |
143 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionsBrowserClient); | 150 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionsBrowserClient); |
144 }; | 151 }; |
145 | 152 |
146 } // namespace extensions | 153 } // namespace extensions |
147 | 154 |
148 #endif // CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSIONS_BROWSER_CLIENT_H_ | 155 #endif // CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSIONS_BROWSER_CLIENT_H_ |
OLD | NEW |