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 EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ | 5 #ifndef EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ |
6 #define EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ | 6 #define EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
14 #include "content/public/browser/bluetooth_chooser.h" | 14 #include "content/public/browser/bluetooth_chooser.h" |
15 #include "extensions/browser/extension_event_histogram_value.h" | 15 #include "extensions/browser/extension_event_histogram_value.h" |
16 #include "extensions/browser/extension_prefs_observer.h" | 16 #include "extensions/browser/extension_prefs_observer.h" |
17 #include "extensions/common/api/clipboard.h" | |
17 #include "extensions/common/view_type.h" | 18 #include "extensions/common/view_type.h" |
18 | 19 |
19 class ExtensionFunctionRegistry; | 20 class ExtensionFunctionRegistry; |
20 class PrefService; | 21 class PrefService; |
21 | 22 |
22 namespace base { | 23 namespace base { |
23 class CommandLine; | 24 class CommandLine; |
24 class FilePath; | 25 class FilePath; |
25 class ListValue; | 26 class ListValue; |
26 } | 27 } |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
100 // Returns the original "recording" context. This method returns |context| if | 101 // Returns the original "recording" context. This method returns |context| if |
101 // |context| is not incognito. | 102 // |context| is not incognito. |
102 virtual content::BrowserContext* GetOriginalContext( | 103 virtual content::BrowserContext* GetOriginalContext( |
103 content::BrowserContext* context) = 0; | 104 content::BrowserContext* context) = 0; |
104 | 105 |
105 #if defined(OS_CHROMEOS) | 106 #if defined(OS_CHROMEOS) |
106 // Returns a user id hash from |context| or an empty string if no hash could | 107 // Returns a user id hash from |context| or an empty string if no hash could |
107 // be extracted. | 108 // be extracted. |
108 virtual std::string GetUserIdHashFromContext( | 109 virtual std::string GetUserIdHashFromContext( |
109 content::BrowserContext* context) = 0; | 110 content::BrowserContext* context) = 0; |
111 | |
112 typedef base::Callback<void(const std::string&)> ErrorCallback; | |
Devlin
2016/12/16 02:26:16
prefer "using" syntax in new code. That said, for
jennyz
2016/12/19 07:01:36
Done.
| |
113 // Saves image data on clipboard. | |
114 virtual void SaveImageDataToClipboard( | |
115 const std::vector<char>& image_data, | |
116 api::clipboard::ImageType type, | |
117 const base::Closure& success_callback, | |
118 const ErrorCallback& error_callback) = 0; | |
110 #endif | 119 #endif |
111 | 120 |
112 // Returns true if |context| corresponds to a guest session. | 121 // Returns true if |context| corresponds to a guest session. |
113 virtual bool IsGuestSession(content::BrowserContext* context) const = 0; | 122 virtual bool IsGuestSession(content::BrowserContext* context) const = 0; |
114 | 123 |
115 // Returns true if |extension_id| can run in an incognito window. | 124 // Returns true if |extension_id| can run in an incognito window. |
116 virtual bool IsExtensionIncognitoEnabled( | 125 virtual bool IsExtensionIncognitoEnabled( |
117 const std::string& extension_id, | 126 const std::string& extension_id, |
118 content::BrowserContext* context) const = 0; | 127 content::BrowserContext* context) const = 0; |
119 | 128 |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
266 // Returns the single instance of |this|. | 275 // Returns the single instance of |this|. |
267 static ExtensionsBrowserClient* Get(); | 276 static ExtensionsBrowserClient* Get(); |
268 | 277 |
269 // Initialize the single instance. | 278 // Initialize the single instance. |
270 static void Set(ExtensionsBrowserClient* client); | 279 static void Set(ExtensionsBrowserClient* client); |
271 }; | 280 }; |
272 | 281 |
273 } // namespace extensions | 282 } // namespace extensions |
274 | 283 |
275 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ | 284 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ |
OLD | NEW |