| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_EXECUTE_CODE_IN_TAB_FUNCTION_H__ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXECUTE_CODE_IN_TAB_FUNCTION_H__ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXECUTE_CODE_IN_TAB_FUNCTION_H__ | 6 #define CHROME_BROWSER_EXTENSIONS_EXECUTE_CODE_IN_TAB_FUNCTION_H__ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | |
| 11 | 10 |
| 12 #include "base/file_path.h" | 11 #include "base/file_path.h" |
| 13 #include "chrome/browser/extensions/extension_function.h" | 12 #include "chrome/browser/extensions/extension_function.h" |
| 14 #include "chrome/common/extensions/extension_resource.h" | 13 #include "chrome/common/extensions/extension_resource.h" |
| 15 #include "chrome/common/notification_service.h" | 14 #include "chrome/common/notification_service.h" |
| 16 #include "chrome/common/notification_registrar.h" | 15 #include "chrome/common/notification_registrar.h" |
| 17 | 16 |
| 18 class MessageLoop; | |
| 19 | |
| 20 // Implement API call tabs.executeScript and tabs.insertCSS. | 17 // Implement API call tabs.executeScript and tabs.insertCSS. |
| 21 class ExecuteCodeInTabFunction : public AsyncExtensionFunction, | 18 class ExecuteCodeInTabFunction : public AsyncExtensionFunction, |
| 22 public NotificationObserver { | 19 public NotificationObserver { |
| 23 public: | 20 public: |
| 24 ExecuteCodeInTabFunction() : execute_tab_id_(-1), | 21 ExecuteCodeInTabFunction() : execute_tab_id_(-1), |
| 25 all_frames_(false) {} | 22 all_frames_(false) {} |
| 26 | 23 |
| 27 private: | 24 private: |
| 28 virtual bool RunImpl(); | 25 virtual bool RunImpl(); |
| 29 | 26 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 55 | 52 |
| 56 class TabsExecuteScriptFunction : public ExecuteCodeInTabFunction { | 53 class TabsExecuteScriptFunction : public ExecuteCodeInTabFunction { |
| 57 DECLARE_EXTENSION_FUNCTION_NAME("tabs.executeScript") | 54 DECLARE_EXTENSION_FUNCTION_NAME("tabs.executeScript") |
| 58 }; | 55 }; |
| 59 | 56 |
| 60 class TabsInsertCSSFunction : public ExecuteCodeInTabFunction { | 57 class TabsInsertCSSFunction : public ExecuteCodeInTabFunction { |
| 61 DECLARE_EXTENSION_FUNCTION_NAME("tabs.insertCSS") | 58 DECLARE_EXTENSION_FUNCTION_NAME("tabs.insertCSS") |
| 62 }; | 59 }; |
| 63 | 60 |
| 64 #endif // CHROME_BROWSER_EXTENSIONS_EXECUTE_CODE_IN_TAB_FUNCTION_H__ | 61 #endif // CHROME_BROWSER_EXTENSIONS_EXECUTE_CODE_IN_TAB_FUNCTION_H__ |
| OLD | NEW |