OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_EXTENSION_TABS_MODULE_H__ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_TABS_MODULE_H__ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_TABS_MODULE_H__ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_TABS_MODULE_H__ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "chrome/browser/extensions/extension_function.h" | 10 #include "chrome/browser/extensions/extension_function.h" |
| 11 #include "chrome/browser/net/url_fetcher.h" |
11 #include "chrome/common/notification_service.h" | 12 #include "chrome/common/notification_service.h" |
12 #include "chrome/common/notification_registrar.h" | 13 #include "chrome/common/notification_registrar.h" |
13 | 14 |
14 class Browser; | 15 class Browser; |
15 class DictionaryValue; | 16 class DictionaryValue; |
16 class TabContents; | 17 class TabContents; |
17 class TabStripModel; | 18 class TabStripModel; |
18 | 19 |
19 class ExtensionTabUtil { | 20 class ExtensionTabUtil { |
20 public: | 21 public: |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 95 |
95 private: | 96 private: |
96 virtual void Observe(NotificationType type, | 97 virtual void Observe(NotificationType type, |
97 const NotificationSource& source, | 98 const NotificationSource& source, |
98 const NotificationDetails& details); | 99 const NotificationDetails& details); |
99 NotificationRegistrar registrar_; | 100 NotificationRegistrar registrar_; |
100 }; | 101 }; |
101 class CaptureVisibleTabFunction : public SyncExtensionFunction { | 102 class CaptureVisibleTabFunction : public SyncExtensionFunction { |
102 virtual bool RunImpl(); | 103 virtual bool RunImpl(); |
103 }; | 104 }; |
| 105 class ExecuteScriptWithUrlFunction : public AsyncExtensionFunction, |
| 106 public URLFetcher::Delegate { |
| 107 virtual bool RunImpl(); |
| 108 private: |
| 109 virtual void OnURLFetchComplete(const URLFetcher* source, |
| 110 const GURL& url, |
| 111 const URLRequestStatus& status, |
| 112 int response_code, |
| 113 const ResponseCookies& cookies, |
| 114 const std::string& data); |
| 115 |
| 116 scoped_ptr<URLFetcher> script_fetcher_; |
| 117 }; |
104 | 118 |
105 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TABS_MODULE_H__ | 119 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TABS_MODULE_H__ |
OLD | NEW |