| 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_TABS_TABS_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 // ExtensionFunction: | 226 // ExtensionFunction: |
| 227 bool HasPermission() override; | 227 bool HasPermission() override; |
| 228 | 228 |
| 229 // Initialize the |execute_tab_id_| and |details_| if they haven't already | 229 // Initialize the |execute_tab_id_| and |details_| if they haven't already |
| 230 // been. Returns whether initialization was successful. | 230 // been. Returns whether initialization was successful. |
| 231 bool Init() override; | 231 bool Init() override; |
| 232 bool CanExecuteScriptOnPage() override; | 232 bool CanExecuteScriptOnPage() override; |
| 233 ScriptExecutor* GetScriptExecutor() override; | 233 ScriptExecutor* GetScriptExecutor() override; |
| 234 bool IsWebView() const override; | 234 bool IsWebView() const override; |
| 235 const GURL& GetWebViewSrc() const override; | 235 const GURL& GetWebViewSrc() const override; |
| 236 bool LoadFileForWebUI(const std::string& file_src, |
| 237 const WebUILoadFileCallback& callback) override; |
| 236 | 238 |
| 237 private: | 239 private: |
| 238 const ChromeExtensionFunctionDetails chrome_details_; | 240 const ChromeExtensionFunctionDetails chrome_details_; |
| 239 | 241 |
| 240 // Id of tab which executes code. | 242 // Id of tab which executes code. |
| 241 int execute_tab_id_; | 243 int execute_tab_id_; |
| 242 }; | 244 }; |
| 243 | 245 |
| 244 class TabsExecuteScriptFunction : public ExecuteCodeInTabFunction { | 246 class TabsExecuteScriptFunction : public ExecuteCodeInTabFunction { |
| 245 protected: | 247 protected: |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 ~TabsGetZoomSettingsFunction() override {} | 311 ~TabsGetZoomSettingsFunction() override {} |
| 310 | 312 |
| 311 bool RunAsync() override; | 313 bool RunAsync() override; |
| 312 | 314 |
| 313 DECLARE_EXTENSION_FUNCTION("tabs.getZoomSettings", TABS_GETZOOMSETTINGS) | 315 DECLARE_EXTENSION_FUNCTION("tabs.getZoomSettings", TABS_GETZOOMSETTINGS) |
| 314 }; | 316 }; |
| 315 | 317 |
| 316 } // namespace extensions | 318 } // namespace extensions |
| 317 | 319 |
| 318 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ | 320 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ |
| OLD | NEW |