[email protected] | 8809f144 | 2012-01-20 21:21:47 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | 36fb2c7c | 2011-04-04 15:49:08 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
[email protected] | a6394ae | 2012-07-16 20:58:43 | [diff] [blame] | 5 | #ifndef CHROME_BROWSER_EXTENSIONS_TAB_HELPER_H_ |
| 6 | #define CHROME_BROWSER_EXTENSIONS_TAB_HELPER_H_ |
[email protected] | 36fb2c7c | 2011-04-04 15:49:08 | [diff] [blame] | 7 | |
[email protected] | 4b64d71 | 2013-01-17 17:53:17 | [diff] [blame] | 8 | #include <map> |
| 9 | #include <string> |
[email protected] | a714e46 | 2013-01-26 06:33:10 | [diff] [blame] | 10 | #include <vector> |
| 11 | |
[email protected] | 28a69d3 | 2012-05-30 07:58:18 | [diff] [blame] | 12 | #include "base/memory/ref_counted.h" |
[email protected] | 82a4373 | 2011-10-07 16:09:11 | [diff] [blame] | 13 | #include "base/memory/weak_ptr.h" |
[email protected] | a83b840 | 2012-05-17 06:56:44 | [diff] [blame] | 14 | #include "base/observer_list.h" |
[email protected] | 78ce302 | 2012-09-24 01:48:48 | [diff] [blame] | 15 | #include "chrome/browser/extensions/active_tab_permission_granter.h" |
[email protected] | c5dbef0 | 2011-05-13 05:06:09 | [diff] [blame] | 16 | #include "chrome/browser/extensions/extension_function_dispatcher.h" |
[email protected] | 93f5046 | 2013-05-10 04:40:40 | [diff] [blame^] | 17 | #include "chrome/common/web_application_info.h" |
[email protected] | 619f8618 | 2012-07-03 21:30:18 | [diff] [blame] | 18 | #include "content/public/browser/notification_observer.h" |
| 19 | #include "content/public/browser/notification_registrar.h" |
[email protected] | d8c66043 | 2011-12-22 20:51:25 | [diff] [blame] | 20 | #include "content/public/browser/web_contents_observer.h" |
[email protected] | 46b3c98 | 2012-10-09 18:38:30 | [diff] [blame] | 21 | #include "content/public/browser/web_contents_user_data.h" |
[email protected] | 36fb2c7c | 2011-04-04 15:49:08 | [diff] [blame] | 22 | #include "third_party/skia/include/core/SkBitmap.h" |
| 23 | |
[email protected] | 8286f51a | 2011-05-31 17:39:13 | [diff] [blame] | 24 | namespace content { |
| 25 | struct LoadCommittedDetails; |
| 26 | } |
| 27 | |
[email protected] | 75b91fd | 2013-02-12 22:14:25 | [diff] [blame] | 28 | namespace gfx { |
| 29 | class Image; |
| 30 | } |
| 31 | |
[email protected] | a83b840 | 2012-05-17 06:56:44 | [diff] [blame] | 32 | namespace extensions { |
[email protected] | 1c321ee5 | 2012-05-21 03:02:34 | [diff] [blame] | 33 | class Extension; |
[email protected] | 4a98816 | 2012-05-27 05:30:01 | [diff] [blame] | 34 | class LocationBarController; |
[email protected] | a714e46 | 2013-01-26 06:33:10 | [diff] [blame] | 35 | class RulesRegistryService; |
[email protected] | 4f88601 | 2012-05-19 03:51:10 | [diff] [blame] | 36 | class ScriptBadgeController; |
[email protected] | ee837d3 | 2012-10-02 22:25:49 | [diff] [blame] | 37 | class ScriptBubbleController; |
[email protected] | 09ae70d4 | 2012-11-07 00:42:09 | [diff] [blame] | 38 | class ScriptExecutor; |
[email protected] | a83b840 | 2012-05-17 06:56:44 | [diff] [blame] | 39 | |
[email protected] | 74e5140 | 2011-04-06 14:17:59 | [diff] [blame] | 40 | // Per-tab extension helper. Also handles non-extension apps. |
[email protected] | a6394ae | 2012-07-16 20:58:43 | [diff] [blame] | 41 | class TabHelper : public content::WebContentsObserver, |
| 42 | public ExtensionFunctionDispatcher::Delegate, |
[email protected] | a6394ae | 2012-07-16 20:58:43 | [diff] [blame] | 43 | public base::SupportsWeakPtr<TabHelper>, |
[email protected] | 7381d9f | 2012-09-12 20:26:22 | [diff] [blame] | 44 | public content::NotificationObserver, |
[email protected] | 46b3c98 | 2012-10-09 18:38:30 | [diff] [blame] | 45 | public content::WebContentsUserData<TabHelper> { |
[email protected] | 36fb2c7c | 2011-04-04 15:49:08 | [diff] [blame] | 46 | public: |
[email protected] | 619f8618 | 2012-07-03 21:30:18 | [diff] [blame] | 47 | // Different types of action when web app info is available. |
| 48 | // OnDidGetApplicationInfo uses this to dispatch calls. |
| 49 | enum WebAppAction { |
| 50 | NONE, // No action at all. |
| 51 | CREATE_SHORTCUT, // Bring up create application shortcut dialog. |
| 52 | UPDATE_SHORTCUT // Update icon for app shortcut. |
| 53 | }; |
| 54 | |
[email protected] | 09ae70d4 | 2012-11-07 00:42:09 | [diff] [blame] | 55 | // Observer base class for classes that need to be notified when content |
| 56 | // scripts and/or tabs.executeScript calls run on a page. |
| 57 | class ScriptExecutionObserver { |
[email protected] | d5b528c | 2012-09-27 16:30:20 | [diff] [blame] | 58 | public: |
| 59 | // Map of extensions IDs to the executing script paths. |
| 60 | typedef std::map<std::string, std::set<std::string> > ExecutingScriptsMap; |
| 61 | |
| 62 | // Automatically observes and unobserves |tab_helper| on construction |
| 63 | // and destruction. |tab_helper| must outlive |this|. |
[email protected] | 09ae70d4 | 2012-11-07 00:42:09 | [diff] [blame] | 64 | explicit ScriptExecutionObserver(TabHelper* tab_helper); |
| 65 | ScriptExecutionObserver(); |
[email protected] | d5b528c | 2012-09-27 16:30:20 | [diff] [blame] | 66 | |
[email protected] | 09ae70d4 | 2012-11-07 00:42:09 | [diff] [blame] | 67 | // Called when script(s) have executed on a page. |
| 68 | // |
| 69 | // |executing_scripts_map| contains all extensions that are executing |
| 70 | // scripts, mapped to the paths for those scripts. This may be an empty set |
| 71 | // if the script has no path associated with it (e.g. in the case of |
| 72 | // tabs.executeScript). |
| 73 | virtual void OnScriptsExecuted( |
[email protected] | d5b528c | 2012-09-27 16:30:20 | [diff] [blame] | 74 | const content::WebContents* web_contents, |
| 75 | const ExecutingScriptsMap& executing_scripts_map, |
| 76 | int32 on_page_id, |
| 77 | const GURL& on_url) = 0; |
| 78 | |
| 79 | protected: |
[email protected] | 09ae70d4 | 2012-11-07 00:42:09 | [diff] [blame] | 80 | virtual ~ScriptExecutionObserver(); |
[email protected] | d5b528c | 2012-09-27 16:30:20 | [diff] [blame] | 81 | |
[email protected] | d5b528c | 2012-09-27 16:30:20 | [diff] [blame] | 82 | TabHelper* tab_helper_; |
| 83 | }; |
| 84 | |
[email protected] | a6394ae | 2012-07-16 20:58:43 | [diff] [blame] | 85 | virtual ~TabHelper(); |
[email protected] | 36fb2c7c | 2011-04-04 15:49:08 | [diff] [blame] | 86 | |
[email protected] | 09ae70d4 | 2012-11-07 00:42:09 | [diff] [blame] | 87 | void AddScriptExecutionObserver(ScriptExecutionObserver* observer) { |
| 88 | script_execution_observers_.AddObserver(observer); |
[email protected] | d5b528c | 2012-09-27 16:30:20 | [diff] [blame] | 89 | } |
| 90 | |
[email protected] | 09ae70d4 | 2012-11-07 00:42:09 | [diff] [blame] | 91 | void RemoveScriptExecutionObserver(ScriptExecutionObserver* observer) { |
| 92 | script_execution_observers_.RemoveObserver(observer); |
[email protected] | d5b528c | 2012-09-27 16:30:20 | [diff] [blame] | 93 | } |
| 94 | |
[email protected] | 619f8618 | 2012-07-03 21:30:18 | [diff] [blame] | 95 | void CreateApplicationShortcuts(); |
| 96 | bool CanCreateApplicationShortcuts() const; |
[email protected] | 1739e57d | 2011-11-30 21:18:25 | [diff] [blame] | 97 | |
[email protected] | 619f8618 | 2012-07-03 21:30:18 | [diff] [blame] | 98 | void set_pending_web_app_action(WebAppAction action) { |
| 99 | pending_web_app_action_ = action; |
| 100 | } |
[email protected] | 553602e1 | 2011-04-05 17:01:18 | [diff] [blame] | 101 | |
[email protected] | 36fb2c7c | 2011-04-04 15:49:08 | [diff] [blame] | 102 | // App extensions ------------------------------------------------------------ |
| 103 | |
| 104 | // Sets the extension denoting this as an app. If |extension| is non-null this |
[email protected] | 0932b30c | 2012-04-17 13:25:10 | [diff] [blame] | 105 | // tab becomes an app-tab. WebContents does not listen for unload events for |
| 106 | // the extension. It's up to consumers of WebContents to do that. |
[email protected] | 36fb2c7c | 2011-04-04 15:49:08 | [diff] [blame] | 107 | // |
| 108 | // NOTE: this should only be manipulated before the tab is added to a browser. |
| 109 | // TODO(sky): resolve if this is the right way to identify an app tab. If it |
| 110 | // is, than this should be passed in the constructor. |
[email protected] | a6394ae | 2012-07-16 20:58:43 | [diff] [blame] | 111 | void SetExtensionApp(const Extension* extension); |
[email protected] | 36fb2c7c | 2011-04-04 15:49:08 | [diff] [blame] | 112 | |
| 113 | // Convenience for setting the app extension by id. This does nothing if |
| 114 | // |extension_app_id| is empty, or an extension can't be found given the |
| 115 | // specified id. |
| 116 | void SetExtensionAppById(const std::string& extension_app_id); |
| 117 | |
[email protected] | dd290d3 | 2012-03-06 02:47:51 | [diff] [blame] | 118 | // Set just the app icon, used by panels created by an extension. |
| 119 | void SetExtensionAppIconById(const std::string& extension_app_id); |
| 120 | |
[email protected] | a6394ae | 2012-07-16 20:58:43 | [diff] [blame] | 121 | const Extension* extension_app() const { return extension_app_; } |
[email protected] | 36fb2c7c | 2011-04-04 15:49:08 | [diff] [blame] | 122 | bool is_app() const { return extension_app_ != NULL; } |
[email protected] | 553602e1 | 2011-04-05 17:01:18 | [diff] [blame] | 123 | const WebApplicationInfo& web_app_info() const { |
| 124 | return web_app_info_; |
| 125 | } |
[email protected] | 36fb2c7c | 2011-04-04 15:49:08 | [diff] [blame] | 126 | |
[email protected] | 0932b30c | 2012-04-17 13:25:10 | [diff] [blame] | 127 | // If an app extension has been explicitly set for this WebContents its icon |
[email protected] | 36fb2c7c | 2011-04-04 15:49:08 | [diff] [blame] | 128 | // is returned. |
| 129 | // |
| 130 | // NOTE: the returned icon is larger than 16x16 (its size is |
[email protected] | 1d5e58b | 2013-01-31 08:41:40 | [diff] [blame] | 131 | // extension_misc::EXTENSION_ICON_SMALLISH). |
[email protected] | 36fb2c7c | 2011-04-04 15:49:08 | [diff] [blame] | 132 | SkBitmap* GetExtensionAppIcon(); |
| 133 | |
[email protected] | ea049a0 | 2011-12-25 21:37:09 | [diff] [blame] | 134 | content::WebContents* web_contents() const { |
| 135 | return content::WebContentsObserver::web_contents(); |
[email protected] | 36fb2c7c | 2011-04-04 15:49:08 | [diff] [blame] | 136 | } |
| 137 | |
[email protected] | a6394ae | 2012-07-16 20:58:43 | [diff] [blame] | 138 | ScriptExecutor* script_executor() { |
[email protected] | 09ae70d4 | 2012-11-07 00:42:09 | [diff] [blame] | 139 | return script_executor_.get(); |
[email protected] | af78a80 | 2012-07-10 23:47:02 | [diff] [blame] | 140 | } |
[email protected] | a83b840 | 2012-05-17 06:56:44 | [diff] [blame] | 141 | |
[email protected] | a6394ae | 2012-07-16 20:58:43 | [diff] [blame] | 142 | LocationBarController* location_bar_controller() { |
[email protected] | af78a80 | 2012-07-10 23:47:02 | [diff] [blame] | 143 | return location_bar_controller_.get(); |
| 144 | } |
[email protected] | a83b840 | 2012-05-17 06:56:44 | [diff] [blame] | 145 | |
[email protected] | 78ce302 | 2012-09-24 01:48:48 | [diff] [blame] | 146 | ActiveTabPermissionGranter* active_tab_permission_granter() { |
| 147 | return active_tab_permission_granter_.get(); |
[email protected] | fc5e65d6b | 2012-06-13 00:22:57 | [diff] [blame] | 148 | } |
| 149 | |
[email protected] | ee837d3 | 2012-10-02 22:25:49 | [diff] [blame] | 150 | ScriptBubbleController* script_bubble_controller() { |
| 151 | return script_bubble_controller_.get(); |
| 152 | } |
| 153 | |
[email protected] | 0932b30c | 2012-04-17 13:25:10 | [diff] [blame] | 154 | // Sets a non-extension app icon associated with WebContents and fires an |
[email protected] | d908348 | 2012-01-06 00:38:46 | [diff] [blame] | 155 | // INVALIDATE_TYPE_TITLE navigation state change to trigger repaint of title. |
[email protected] | 74e5140 | 2011-04-06 14:17:59 | [diff] [blame] | 156 | void SetAppIcon(const SkBitmap& app_icon); |
| 157 | |
[email protected] | 36fb2c7c | 2011-04-04 15:49:08 | [diff] [blame] | 158 | private: |
[email protected] | a78f03c | 2012-09-15 05:08:19 | [diff] [blame] | 159 | explicit TabHelper(content::WebContents* web_contents); |
[email protected] | 46b3c98 | 2012-10-09 18:38:30 | [diff] [blame] | 160 | friend class content::WebContentsUserData<TabHelper>; |
[email protected] | a78f03c | 2012-09-15 05:08:19 | [diff] [blame] | 161 | |
[email protected] | d8c66043 | 2011-12-22 20:51:25 | [diff] [blame] | 162 | // content::WebContentsObserver overrides. |
[email protected] | fc5e65d6b | 2012-06-13 00:22:57 | [diff] [blame] | 163 | virtual void RenderViewCreated( |
| 164 | content::RenderViewHost* render_view_host) OVERRIDE; |
[email protected] | a6e16aec | 2011-11-11 18:53:04 | [diff] [blame] | 165 | virtual void DidNavigateMainFrame( |
[email protected] | 8286f51a | 2011-05-31 17:39:13 | [diff] [blame] | 166 | const content::LoadCommittedDetails& details, |
[email protected] | 6766b17 | 2011-11-21 18:29:36 | [diff] [blame] | 167 | const content::FrameNavigateParams& params) OVERRIDE; |
[email protected] | 8915f34 | 2011-08-29 22:14:37 | [diff] [blame] | 168 | virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
[email protected] | 7381d9f | 2012-09-12 20:26:22 | [diff] [blame] | 169 | virtual void DidCloneToNewWebContents( |
| 170 | content::WebContents* old_web_contents, |
| 171 | content::WebContents* new_web_contents) OVERRIDE; |
[email protected] | 553602e1 | 2011-04-05 17:01:18 | [diff] [blame] | 172 | |
[email protected] | c5dbef0 | 2011-05-13 05:06:09 | [diff] [blame] | 173 | // ExtensionFunctionDispatcher::Delegate overrides. |
[email protected] | 44f4b13 | 2012-07-17 20:36:57 | [diff] [blame] | 174 | virtual extensions::WindowController* GetExtensionWindowController() |
[email protected] | b51f3562 | 2012-05-05 22:01:43 | [diff] [blame] | 175 | const OVERRIDE; |
[email protected] | ea049a0 | 2011-12-25 21:37:09 | [diff] [blame] | 176 | virtual content::WebContents* GetAssociatedWebContents() const OVERRIDE; |
[email protected] | c5dbef0 | 2011-05-13 05:06:09 | [diff] [blame] | 177 | |
[email protected] | 553602e1 | 2011-04-05 17:01:18 | [diff] [blame] | 178 | // Message handlers. |
| 179 | void OnDidGetApplicationInfo(int32 page_id, const WebApplicationInfo& info); |
[email protected] | a221ef09 | 2011-09-07 01:34:10 | [diff] [blame] | 180 | void OnInlineWebstoreInstall(int install_id, |
[email protected] | 7b92104 | 2012-02-11 01:41:27 | [diff] [blame] | 181 | int return_route_id, |
[email protected] | a221ef09 | 2011-09-07 01:34:10 | [diff] [blame] | 182 | const std::string& webstore_item_id, |
| 183 | const GURL& requestor_url); |
[email protected] | f2fe87c | 2012-04-24 17:53:49 | [diff] [blame] | 184 | void OnGetAppInstallState(const GURL& requestor_url, |
| 185 | int return_route_id, |
| 186 | int callback_id); |
[email protected] | c5dbef0 | 2011-05-13 05:06:09 | [diff] [blame] | 187 | void OnRequest(const ExtensionHostMsg_Request_Params& params); |
[email protected] | d5b528c | 2012-09-27 16:30:20 | [diff] [blame] | 188 | void OnContentScriptsExecuting( |
[email protected] | 09ae70d4 | 2012-11-07 00:42:09 | [diff] [blame] | 189 | const ScriptExecutionObserver::ExecutingScriptsMap& extension_ids, |
[email protected] | d5b528c | 2012-09-27 16:30:20 | [diff] [blame] | 190 | int32 page_id, |
| 191 | const GURL& on_url); |
[email protected] | a714e46 | 2013-01-26 06:33:10 | [diff] [blame] | 192 | void OnWatchedPageChange(const std::vector<std::string>& css_selectors); |
[email protected] | 36fb2c7c | 2011-04-04 15:49:08 | [diff] [blame] | 193 | |
| 194 | // App extensions related methods: |
| 195 | |
[email protected] | 75b91fd | 2013-02-12 22:14:25 | [diff] [blame] | 196 | // Resets app_icon_ and if |extension| is non-null uses ImageLoader to load |
| 197 | // the extension's image asynchronously. |
[email protected] | a6394ae | 2012-07-16 20:58:43 | [diff] [blame] | 198 | void UpdateExtensionAppIcon(const Extension* extension); |
[email protected] | 36fb2c7c | 2011-04-04 15:49:08 | [diff] [blame] | 199 | |
[email protected] | 7069ed8 | 2013-01-26 01:39:53 | [diff] [blame] | 200 | const Extension* GetExtension(const std::string& extension_app_id); |
[email protected] | dd290d3 | 2012-03-06 02:47:51 | [diff] [blame] | 201 | |
[email protected] | 7069ed8 | 2013-01-26 01:39:53 | [diff] [blame] | 202 | void OnImageLoaded(const gfx::Image& image); |
[email protected] | 8915f34 | 2011-08-29 22:14:37 | [diff] [blame] | 203 | |
[email protected] | 734bcec | 2012-10-08 20:29:05 | [diff] [blame] | 204 | // WebstoreStandaloneInstaller::Callback. |
[email protected] | d2a639e | 2012-09-17 07:41:21 | [diff] [blame] | 205 | virtual void OnInlineInstallComplete(int install_id, |
| 206 | int return_route_id, |
| 207 | bool success, |
| 208 | const std::string& error); |
[email protected] | 36fb2c7c | 2011-04-04 15:49:08 | [diff] [blame] | 209 | |
[email protected] | 619f8618 | 2012-07-03 21:30:18 | [diff] [blame] | 210 | // content::NotificationObserver. |
| 211 | virtual void Observe(int type, |
| 212 | const content::NotificationSource& source, |
| 213 | const content::NotificationDetails& details) OVERRIDE; |
| 214 | |
| 215 | // Requests application info for the specified page. This is an asynchronous |
| 216 | // request. The delegate is notified by way of OnDidGetApplicationInfo when |
| 217 | // the data is available. |
| 218 | void GetApplicationInfo(int32 page_id); |
| 219 | |
[email protected] | 36fb2c7c | 2011-04-04 15:49:08 | [diff] [blame] | 220 | // Data for app extensions --------------------------------------------------- |
| 221 | |
[email protected] | d5b528c | 2012-09-27 16:30:20 | [diff] [blame] | 222 | // Our content script observers. Declare at top so that it will outlive all |
| 223 | // other members, since they might add themselves as observers. |
[email protected] | 09ae70d4 | 2012-11-07 00:42:09 | [diff] [blame] | 224 | ObserverList<ScriptExecutionObserver> script_execution_observers_; |
[email protected] | a83b840 | 2012-05-17 06:56:44 | [diff] [blame] | 225 | |
[email protected] | 36fb2c7c | 2011-04-04 15:49:08 | [diff] [blame] | 226 | // If non-null this tab is an app tab and this is the extension the tab was |
| 227 | // created for. |
[email protected] | a6394ae | 2012-07-16 20:58:43 | [diff] [blame] | 228 | const Extension* extension_app_; |
[email protected] | 36fb2c7c | 2011-04-04 15:49:08 | [diff] [blame] | 229 | |
[email protected] | 74e5140 | 2011-04-06 14:17:59 | [diff] [blame] | 230 | // Icon for extension_app_ (if non-null) or a manually-set icon for |
| 231 | // non-extension apps. |
[email protected] | 36fb2c7c | 2011-04-04 15:49:08 | [diff] [blame] | 232 | SkBitmap extension_app_icon_; |
| 233 | |
[email protected] | c5dbef0 | 2011-05-13 05:06:09 | [diff] [blame] | 234 | // Process any extension messages coming from the tab. |
| 235 | ExtensionFunctionDispatcher extension_function_dispatcher_; |
| 236 | |
[email protected] | 553602e1 | 2011-04-05 17:01:18 | [diff] [blame] | 237 | // Cached web app info data. |
| 238 | WebApplicationInfo web_app_info_; |
| 239 | |
[email protected] | 619f8618 | 2012-07-03 21:30:18 | [diff] [blame] | 240 | // Which deferred action to perform when OnDidGetApplicationInfo is notified |
| 241 | // from a WebContents. |
| 242 | WebAppAction pending_web_app_action_; |
| 243 | |
| 244 | content::NotificationRegistrar registrar_; |
| 245 | |
[email protected] | 09ae70d4 | 2012-11-07 00:42:09 | [diff] [blame] | 246 | scoped_ptr<ScriptExecutor> script_executor_; |
[email protected] | af78a80 | 2012-07-10 23:47:02 | [diff] [blame] | 247 | |
[email protected] | a6394ae | 2012-07-16 20:58:43 | [diff] [blame] | 248 | scoped_ptr<LocationBarController> location_bar_controller_; |
[email protected] | a83b840 | 2012-05-17 06:56:44 | [diff] [blame] | 249 | |
[email protected] | 78ce302 | 2012-09-24 01:48:48 | [diff] [blame] | 250 | scoped_ptr<ActiveTabPermissionGranter> active_tab_permission_granter_; |
[email protected] | fc5e65d6b | 2012-06-13 00:22:57 | [diff] [blame] | 251 | |
[email protected] | ee837d3 | 2012-10-02 22:25:49 | [diff] [blame] | 252 | scoped_ptr<ScriptBubbleController> script_bubble_controller_; |
| 253 | |
[email protected] | a714e46 | 2013-01-26 06:33:10 | [diff] [blame] | 254 | RulesRegistryService* rules_registry_service_; |
| 255 | |
[email protected] | 4b64d71 | 2013-01-17 17:53:17 | [diff] [blame] | 256 | Profile* profile_; |
| 257 | |
[email protected] | 7069ed8 | 2013-01-26 01:39:53 | [diff] [blame] | 258 | // Vend weak pointers that can be invalidated to stop in-progress loads. |
| 259 | base::WeakPtrFactory<TabHelper> image_loader_ptr_factory_; |
| 260 | |
[email protected] | a6394ae | 2012-07-16 20:58:43 | [diff] [blame] | 261 | DISALLOW_COPY_AND_ASSIGN(TabHelper); |
[email protected] | 36fb2c7c | 2011-04-04 15:49:08 | [diff] [blame] | 262 | }; |
| 263 | |
[email protected] | a6394ae | 2012-07-16 20:58:43 | [diff] [blame] | 264 | } // namespace extensions |
| 265 | |
| 266 | #endif // CHROME_BROWSER_EXTENSIONS_TAB_HELPER_H_ |