OLD | NEW |
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_EXTENSION_TAB_HELPER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_TAB_HELPER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_TAB_HELPER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_TAB_HELPER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 SkBitmap* GetExtensionAppIcon(); | 104 SkBitmap* GetExtensionAppIcon(); |
105 | 105 |
106 TabContents* tab_contents() { | 106 TabContents* tab_contents() { |
107 return tab_contents_; | 107 return tab_contents_; |
108 } | 108 } |
109 | 109 |
110 content::WebContents* web_contents() const { | 110 content::WebContents* web_contents() const { |
111 return content::WebContentsObserver::web_contents(); | 111 return content::WebContentsObserver::web_contents(); |
112 } | 112 } |
113 | 113 |
114 extensions::ScriptExecutor* script_executor(); | 114 extensions::ScriptExecutor* script_executor() { |
| 115 return script_executor_.get(); |
| 116 } |
115 | 117 |
116 extensions::LocationBarController* location_bar_controller(); | 118 extensions::LocationBarController* location_bar_controller() { |
| 119 return location_bar_controller_.get(); |
| 120 } |
117 | 121 |
118 extensions::ActiveTabPermissionManager* active_tab_permission_manager() { | 122 extensions::ActiveTabPermissionManager* active_tab_permission_manager() { |
119 return &active_tab_permission_manager_; | 123 return &active_tab_permission_manager_; |
120 } | 124 } |
121 | 125 |
122 // Sets a non-extension app icon associated with WebContents and fires an | 126 // Sets a non-extension app icon associated with WebContents and fires an |
123 // INVALIDATE_TYPE_TITLE navigation state change to trigger repaint of title. | 127 // INVALIDATE_TYPE_TITLE navigation state change to trigger repaint of title. |
124 void SetAppIcon(const SkBitmap& app_icon); | 128 void SetAppIcon(const SkBitmap& app_icon); |
125 | 129 |
126 private: | 130 private: |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 WebApplicationInfo web_app_info_; | 218 WebApplicationInfo web_app_info_; |
215 | 219 |
216 // Which deferred action to perform when OnDidGetApplicationInfo is notified | 220 // Which deferred action to perform when OnDidGetApplicationInfo is notified |
217 // from a WebContents. | 221 // from a WebContents. |
218 WebAppAction pending_web_app_action_; | 222 WebAppAction pending_web_app_action_; |
219 | 223 |
220 content::NotificationRegistrar registrar_; | 224 content::NotificationRegistrar registrar_; |
221 | 225 |
222 TabContents* tab_contents_; | 226 TabContents* tab_contents_; |
223 | 227 |
224 // Either script_executor/location_bar_controller will have values, or | |
225 // script_badge_controller will have a value, depending on whether the action | |
226 // box is turned on. | |
227 scoped_ptr<extensions::ScriptExecutor> script_executor_; | 228 scoped_ptr<extensions::ScriptExecutor> script_executor_; |
| 229 |
228 scoped_ptr<extensions::LocationBarController> location_bar_controller_; | 230 scoped_ptr<extensions::LocationBarController> location_bar_controller_; |
229 scoped_refptr<extensions::ScriptBadgeController> script_badge_controller_; | |
230 | 231 |
231 extensions::ActiveTabPermissionManager active_tab_permission_manager_; | 232 extensions::ActiveTabPermissionManager active_tab_permission_manager_; |
232 | 233 |
233 DISALLOW_COPY_AND_ASSIGN(ExtensionTabHelper); | 234 DISALLOW_COPY_AND_ASSIGN(ExtensionTabHelper); |
234 }; | 235 }; |
235 | 236 |
236 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TAB_HELPER_H_ | 237 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TAB_HELPER_H_ |
OLD | NEW |