Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Side by Side Diff: chrome/browser/extensions/tab_helper.h

Issue 11547033: Implement declarativeContent API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_TAB_HELPER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_TAB_HELPER_H_
6 #define CHROME_BROWSER_EXTENSIONS_TAB_HELPER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_TAB_HELPER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
vabr (Chromium) 2013/01/23 12:32:56 Lint: add #include for vector<>.
Jeffrey Yasskin 2013/01/23 22:13:17 Done.
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "base/observer_list.h" 12 #include "base/observer_list.h"
13 #include "chrome/browser/extensions/active_tab_permission_granter.h" 13 #include "chrome/browser/extensions/active_tab_permission_granter.h"
14 #include "chrome/browser/extensions/app_notify_channel_setup.h" 14 #include "chrome/browser/extensions/app_notify_channel_setup.h"
15 #include "chrome/browser/extensions/extension_function_dispatcher.h" 15 #include "chrome/browser/extensions/extension_function_dispatcher.h"
16 #include "chrome/browser/extensions/image_loading_tracker.h" 16 #include "chrome/browser/extensions/image_loading_tracker.h"
17 #include "chrome/common/web_apps.h" 17 #include "chrome/common/web_apps.h"
18 #include "content/public/browser/notification_observer.h" 18 #include "content/public/browser/notification_observer.h"
19 #include "content/public/browser/notification_registrar.h" 19 #include "content/public/browser/notification_registrar.h"
20 #include "content/public/browser/web_contents_observer.h" 20 #include "content/public/browser/web_contents_observer.h"
21 #include "content/public/browser/web_contents_user_data.h" 21 #include "content/public/browser/web_contents_user_data.h"
22 #include "third_party/skia/include/core/SkBitmap.h" 22 #include "third_party/skia/include/core/SkBitmap.h"
23 23
24 struct WebApplicationInfo; 24 struct WebApplicationInfo;
25 25
26 namespace content { 26 namespace content {
27 struct LoadCommittedDetails; 27 struct LoadCommittedDetails;
28 } 28 }
29 29
30 namespace extensions { 30 namespace extensions {
31 class ContentRulesRegistry;
31 class Extension; 32 class Extension;
32 class LocationBarController; 33 class LocationBarController;
33 class ScriptBadgeController; 34 class ScriptBadgeController;
34 class ScriptBubbleController; 35 class ScriptBubbleController;
35 class ScriptExecutor; 36 class ScriptExecutor;
36 37
37 // Per-tab extension helper. Also handles non-extension apps. 38 // Per-tab extension helper. Also handles non-extension apps.
38 class TabHelper : public content::WebContentsObserver, 39 class TabHelper : public content::WebContentsObserver,
39 public ExtensionFunctionDispatcher::Delegate, 40 public ExtensionFunctionDispatcher::Delegate,
40 public ImageLoadingTracker::Observer, 41 public ImageLoadingTracker::Observer,
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 int return_route_id, 187 int return_route_id,
187 int callback_id); 188 int callback_id);
188 void OnGetAppInstallState(const GURL& requestor_url, 189 void OnGetAppInstallState(const GURL& requestor_url,
189 int return_route_id, 190 int return_route_id,
190 int callback_id); 191 int callback_id);
191 void OnRequest(const ExtensionHostMsg_Request_Params& params); 192 void OnRequest(const ExtensionHostMsg_Request_Params& params);
192 void OnContentScriptsExecuting( 193 void OnContentScriptsExecuting(
193 const ScriptExecutionObserver::ExecutingScriptsMap& extension_ids, 194 const ScriptExecutionObserver::ExecutingScriptsMap& extension_ids,
194 int32 page_id, 195 int32 page_id,
195 const GURL& on_url); 196 const GURL& on_url);
197 void OnWatchedPageChange(const std::vector<std::string>& css_selectors);
196 198
197 // App extensions related methods: 199 // App extensions related methods:
198 200
199 // Resets app_icon_ and if |extension| is non-null creates a new 201 // Resets app_icon_ and if |extension| is non-null creates a new
200 // ImageLoadingTracker to load the extension's image. 202 // ImageLoadingTracker to load the extension's image.
201 void UpdateExtensionAppIcon(const Extension* extension); 203 void UpdateExtensionAppIcon(const Extension* extension);
202 204
203 const Extension* GetExtension( 205 const Extension* GetExtension(
204 const std::string& extension_app_id); 206 const std::string& extension_app_id);
205 207
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 content::NotificationRegistrar registrar_; 262 content::NotificationRegistrar registrar_;
261 263
262 scoped_ptr<ScriptExecutor> script_executor_; 264 scoped_ptr<ScriptExecutor> script_executor_;
263 265
264 scoped_ptr<LocationBarController> location_bar_controller_; 266 scoped_ptr<LocationBarController> location_bar_controller_;
265 267
266 scoped_ptr<ActiveTabPermissionGranter> active_tab_permission_granter_; 268 scoped_ptr<ActiveTabPermissionGranter> active_tab_permission_granter_;
267 269
268 scoped_ptr<ScriptBubbleController> script_bubble_controller_; 270 scoped_ptr<ScriptBubbleController> script_bubble_controller_;
269 271
272 ContentRulesRegistry* content_rules_registry_;
273
270 Profile* profile_; 274 Profile* profile_;
271 275
272 DISALLOW_COPY_AND_ASSIGN(TabHelper); 276 DISALLOW_COPY_AND_ASSIGN(TabHelper);
273 }; 277 };
274 278
275 } // namespace extensions 279 } // namespace extensions
276 280
277 #endif // CHROME_BROWSER_EXTENSIONS_TAB_HELPER_H_ 281 #endif // CHROME_BROWSER_EXTENSIONS_TAB_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698