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 int GetScriptInjectionInstanceId() const override; |
236 | 237 |
237 private: | 238 private: |
238 const ChromeExtensionFunctionDetails chrome_details_; | 239 const ChromeExtensionFunctionDetails chrome_details_; |
239 | 240 |
240 // Id of tab which executes code. | 241 // Id of tab which executes code. |
241 int execute_tab_id_; | 242 int execute_tab_id_; |
242 }; | 243 }; |
243 | 244 |
244 class TabsExecuteScriptFunction : public ExecuteCodeInTabFunction { | 245 class TabsExecuteScriptFunction : public ExecuteCodeInTabFunction { |
245 protected: | 246 protected: |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 ~TabsGetZoomSettingsFunction() override {} | 310 ~TabsGetZoomSettingsFunction() override {} |
310 | 311 |
311 bool RunAsync() override; | 312 bool RunAsync() override; |
312 | 313 |
313 DECLARE_EXTENSION_FUNCTION("tabs.getZoomSettings", TABS_GETZOOMSETTINGS) | 314 DECLARE_EXTENSION_FUNCTION("tabs.getZoomSettings", TABS_GETZOOMSETTINGS) |
314 }; | 315 }; |
315 | 316 |
316 } // namespace extensions | 317 } // namespace extensions |
317 | 318 |
318 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ | 319 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ |
OLD | NEW |