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

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

Issue 527963003: Uncouple ActiveScriptController from LocationBarController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
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 <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 20 matching lines...) Expand all
31 namespace content { 31 namespace content {
32 struct LoadCommittedDetails; 32 struct LoadCommittedDetails;
33 class RenderFrameHost; 33 class RenderFrameHost;
34 } 34 }
35 35
36 namespace gfx { 36 namespace gfx {
37 class Image; 37 class Image;
38 } 38 }
39 39
40 namespace extensions { 40 namespace extensions {
41 class ActiveScriptController;
41 class BookmarkAppHelper; 42 class BookmarkAppHelper;
42 class Extension; 43 class Extension;
43 class LocationBarController; 44 class LocationBarController;
44 class WebstoreInlineInstallerFactory; 45 class WebstoreInlineInstallerFactory;
45 46
46 // Per-tab extension helper. Also handles non-extension apps. 47 // Per-tab extension helper. Also handles non-extension apps.
47 class TabHelper : public content::WebContentsObserver, 48 class TabHelper : public content::WebContentsObserver,
48 public extensions::ExtensionFunctionDispatcher::Delegate, 49 public extensions::ExtensionFunctionDispatcher::Delegate,
49 public base::SupportsWeakPtr<TabHelper>, 50 public base::SupportsWeakPtr<TabHelper>,
50 public content::NotificationObserver, 51 public content::NotificationObserver,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 } 103 }
103 104
104 ScriptExecutor* script_executor() { 105 ScriptExecutor* script_executor() {
105 return script_executor_.get(); 106 return script_executor_.get();
106 } 107 }
107 108
108 LocationBarController* location_bar_controller() { 109 LocationBarController* location_bar_controller() {
109 return location_bar_controller_.get(); 110 return location_bar_controller_.get();
110 } 111 }
111 112
113 ActiveScriptController* active_script_controller() {
114 return active_script_controller_.get();
115 }
116
112 ActiveTabPermissionGranter* active_tab_permission_granter() { 117 ActiveTabPermissionGranter* active_tab_permission_granter() {
113 return active_tab_permission_granter_.get(); 118 return active_tab_permission_granter_.get();
114 } 119 }
115 120
116 // Sets a non-extension app icon associated with WebContents and fires an 121 // Sets a non-extension app icon associated with WebContents and fires an
117 // INVALIDATE_TYPE_TITLE navigation state change to trigger repaint of title. 122 // INVALIDATE_TYPE_TITLE navigation state change to trigger repaint of title.
118 void SetAppIcon(const SkBitmap& app_icon); 123 void SetAppIcon(const SkBitmap& app_icon);
119 124
120 // Sets the factory used to create inline webstore item installers. 125 // Sets the factory used to create inline webstore item installers.
121 // Used for testing. Takes ownership of the factory instance. 126 // Used for testing. Takes ownership of the factory instance.
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 243
239 // Whether to trigger an update when the page load completes. 244 // Whether to trigger an update when the page load completes.
240 bool update_shortcut_on_load_complete_; 245 bool update_shortcut_on_load_complete_;
241 246
242 content::NotificationRegistrar registrar_; 247 content::NotificationRegistrar registrar_;
243 248
244 scoped_ptr<ScriptExecutor> script_executor_; 249 scoped_ptr<ScriptExecutor> script_executor_;
245 250
246 scoped_ptr<LocationBarController> location_bar_controller_; 251 scoped_ptr<LocationBarController> location_bar_controller_;
247 252
253 scoped_ptr<ActiveScriptController> active_script_controller_;
254
248 scoped_ptr<ActiveTabPermissionGranter> active_tab_permission_granter_; 255 scoped_ptr<ActiveTabPermissionGranter> active_tab_permission_granter_;
249 256
250 scoped_ptr<BookmarkAppHelper> bookmark_app_helper_; 257 scoped_ptr<BookmarkAppHelper> bookmark_app_helper_;
251 258
252 Profile* profile_; 259 Profile* profile_;
253 260
254 // Vend weak pointers that can be invalidated to stop in-progress loads. 261 // Vend weak pointers that can be invalidated to stop in-progress loads.
255 base::WeakPtrFactory<TabHelper> image_loader_ptr_factory_; 262 base::WeakPtrFactory<TabHelper> image_loader_ptr_factory_;
256 263
257 // Creates WebstoreInlineInstaller instances for inline install triggers. 264 // Creates WebstoreInlineInstaller instances for inline install triggers.
258 scoped_ptr<WebstoreInlineInstallerFactory> webstore_inline_installer_factory_; 265 scoped_ptr<WebstoreInlineInstallerFactory> webstore_inline_installer_factory_;
259 266
260 DISALLOW_COPY_AND_ASSIGN(TabHelper); 267 DISALLOW_COPY_AND_ASSIGN(TabHelper);
261 }; 268 };
262 269
263 } // namespace extensions 270 } // namespace extensions
264 271
265 #endif // CHROME_BROWSER_EXTENSIONS_TAB_HELPER_H_ 272 #endif // CHROME_BROWSER_EXTENSIONS_TAB_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698