OLD | NEW |
1 // Copyright (c) 2010 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 | 10 |
11 #include "chrome/browser/extensions/extension_function.h" | 11 #include "chrome/browser/extensions/extension_function.h" |
12 #include "chrome/common/extensions/extension_resource.h" | 12 #include "chrome/common/extensions/extension_resource.h" |
13 #include "chrome/common/notification_service.h" | 13 #include "chrome/common/notification_service.h" |
| 14 #include "chrome/common/notification_observer.h" |
14 #include "chrome/common/notification_registrar.h" | 15 #include "chrome/common/notification_registrar.h" |
15 | 16 |
16 // Implement API call tabs.executeScript and tabs.insertCSS. | 17 // Implement API call tabs.executeScript and tabs.insertCSS. |
17 class ExecuteCodeInTabFunction : public AsyncExtensionFunction, | 18 class ExecuteCodeInTabFunction : public AsyncExtensionFunction, |
18 public NotificationObserver { | 19 public NotificationObserver { |
19 public: | 20 public: |
20 ExecuteCodeInTabFunction() : execute_tab_id_(-1), | 21 ExecuteCodeInTabFunction() : execute_tab_id_(-1), |
21 all_frames_(false) {} | 22 all_frames_(false) {} |
22 | 23 |
23 private: | 24 private: |
(...skipping 27 matching lines...) Expand all Loading... |
51 | 52 |
52 class TabsExecuteScriptFunction : public ExecuteCodeInTabFunction { | 53 class TabsExecuteScriptFunction : public ExecuteCodeInTabFunction { |
53 DECLARE_EXTENSION_FUNCTION_NAME("tabs.executeScript") | 54 DECLARE_EXTENSION_FUNCTION_NAME("tabs.executeScript") |
54 }; | 55 }; |
55 | 56 |
56 class TabsInsertCSSFunction : public ExecuteCodeInTabFunction { | 57 class TabsInsertCSSFunction : public ExecuteCodeInTabFunction { |
57 DECLARE_EXTENSION_FUNCTION_NAME("tabs.insertCSS") | 58 DECLARE_EXTENSION_FUNCTION_NAME("tabs.insertCSS") |
58 }; | 59 }; |
59 | 60 |
60 #endif // CHROME_BROWSER_EXTENSIONS_EXECUTE_CODE_IN_TAB_FUNCTION_H__ | 61 #endif // CHROME_BROWSER_EXTENSIONS_EXECUTE_CODE_IN_TAB_FUNCTION_H__ |
OLD | NEW |