| 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 class ExecuteCodeInTabFunction : public ExecuteCodeFunction { | 227 class ExecuteCodeInTabFunction : public ExecuteCodeFunction { |
| 228 public: | 228 public: |
| 229 ExecuteCodeInTabFunction(); | 229 ExecuteCodeInTabFunction(); |
| 230 | 230 |
| 231 protected: | 231 protected: |
| 232 ~ExecuteCodeInTabFunction() override; | 232 ~ExecuteCodeInTabFunction() override; |
| 233 | 233 |
| 234 // ExtensionFunction: | 234 // ExtensionFunction: |
| 235 bool HasPermission() override; | 235 bool HasPermission() override; |
| 236 | 236 |
| 237 // Initialize the |execute_tab_id_| and |details_| if they haven't already | 237 // Initializes |execute_tab_id_| and |details_|. |
| 238 // been. Returns whether initialization was successful. | 238 InitResult Init() override; |
| 239 bool Init() override; | |
| 240 bool CanExecuteScriptOnPage() override; | 239 bool CanExecuteScriptOnPage() override; |
| 241 ScriptExecutor* GetScriptExecutor() override; | 240 ScriptExecutor* GetScriptExecutor() override; |
| 242 bool IsWebView() const override; | 241 bool IsWebView() const override; |
| 243 const GURL& GetWebViewSrc() const override; | 242 const GURL& GetWebViewSrc() const override; |
| 244 | 243 |
| 245 private: | 244 private: |
| 246 const ChromeExtensionFunctionDetails chrome_details_; | 245 const ChromeExtensionFunctionDetails chrome_details_; |
| 247 | 246 |
| 248 // Id of tab which executes code. | 247 // Id of tab which executes code. |
| 249 int execute_tab_id_; | 248 int execute_tab_id_; |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 | 331 |
| 333 // ExtensionFunction: | 332 // ExtensionFunction: |
| 334 ExtensionFunction::ResponseAction Run() override; | 333 ExtensionFunction::ResponseAction Run() override; |
| 335 | 334 |
| 336 DISALLOW_COPY_AND_ASSIGN(TabsDiscardFunction); | 335 DISALLOW_COPY_AND_ASSIGN(TabsDiscardFunction); |
| 337 }; | 336 }; |
| 338 | 337 |
| 339 } // namespace extensions | 338 } // namespace extensions |
| 340 | 339 |
| 341 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ | 340 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ |
| OLD | NEW |