| 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_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 "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
| 11 #include "chrome/browser/extensions/active_tab_permission_manager.h" | 11 #include "chrome/browser/extensions/active_tab_permission_granter.h" |
| 12 #include "chrome/browser/extensions/app_notify_channel_setup.h" | 12 #include "chrome/browser/extensions/app_notify_channel_setup.h" |
| 13 #include "chrome/browser/extensions/extension_function_dispatcher.h" | 13 #include "chrome/browser/extensions/extension_function_dispatcher.h" |
| 14 #include "chrome/browser/extensions/image_loading_tracker.h" | 14 #include "chrome/browser/extensions/image_loading_tracker.h" |
| 15 #include "chrome/browser/extensions/script_executor.h" | 15 #include "chrome/browser/extensions/script_executor.h" |
| 16 #include "chrome/browser/extensions/webstore_inline_installer.h" | 16 #include "chrome/browser/extensions/webstore_inline_installer.h" |
| 17 #include "chrome/browser/tab_contents/web_contents_user_data.h" | 17 #include "chrome/browser/tab_contents/web_contents_user_data.h" |
| 18 #include "chrome/common/web_apps.h" | 18 #include "chrome/common/web_apps.h" |
| 19 #include "content/public/browser/notification_observer.h" | 19 #include "content/public/browser/notification_observer.h" |
| 20 #include "content/public/browser/notification_registrar.h" | 20 #include "content/public/browser/notification_registrar.h" |
| 21 #include "content/public/browser/web_contents_observer.h" | 21 #include "content/public/browser/web_contents_observer.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 } | 96 } |
| 97 | 97 |
| 98 ScriptExecutor* script_executor() { | 98 ScriptExecutor* script_executor() { |
| 99 return &script_executor_; | 99 return &script_executor_; |
| 100 } | 100 } |
| 101 | 101 |
| 102 LocationBarController* location_bar_controller() { | 102 LocationBarController* location_bar_controller() { |
| 103 return location_bar_controller_.get(); | 103 return location_bar_controller_.get(); |
| 104 } | 104 } |
| 105 | 105 |
| 106 ActiveTabPermissionManager* active_tab_permission_manager() { | 106 ActiveTabPermissionGranter* active_tab_permission_granter() { |
| 107 return active_tab_permission_manager_.get(); | 107 return active_tab_permission_granter_.get(); |
| 108 } | 108 } |
| 109 | 109 |
| 110 // Sets a non-extension app icon associated with WebContents and fires an | 110 // Sets a non-extension app icon associated with WebContents and fires an |
| 111 // INVALIDATE_TYPE_TITLE navigation state change to trigger repaint of title. | 111 // INVALIDATE_TYPE_TITLE navigation state change to trigger repaint of title. |
| 112 void SetAppIcon(const SkBitmap& app_icon); | 112 void SetAppIcon(const SkBitmap& app_icon); |
| 113 | 113 |
| 114 private: | 114 private: |
| 115 explicit TabHelper(content::WebContents* web_contents); | 115 explicit TabHelper(content::WebContents* web_contents); |
| 116 static int kUserDataKey; | 116 static int kUserDataKey; |
| 117 friend class WebContentsUserData<TabHelper>; | 117 friend class WebContentsUserData<TabHelper>; |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 // Which deferred action to perform when OnDidGetApplicationInfo is notified | 210 // Which deferred action to perform when OnDidGetApplicationInfo is notified |
| 211 // from a WebContents. | 211 // from a WebContents. |
| 212 WebAppAction pending_web_app_action_; | 212 WebAppAction pending_web_app_action_; |
| 213 | 213 |
| 214 content::NotificationRegistrar registrar_; | 214 content::NotificationRegistrar registrar_; |
| 215 | 215 |
| 216 ScriptExecutor script_executor_; | 216 ScriptExecutor script_executor_; |
| 217 | 217 |
| 218 scoped_ptr<LocationBarController> location_bar_controller_; | 218 scoped_ptr<LocationBarController> location_bar_controller_; |
| 219 | 219 |
| 220 scoped_ptr<ActiveTabPermissionManager> active_tab_permission_manager_; | 220 scoped_ptr<ActiveTabPermissionGranter> active_tab_permission_granter_; |
| 221 | 221 |
| 222 DISALLOW_COPY_AND_ASSIGN(TabHelper); | 222 DISALLOW_COPY_AND_ASSIGN(TabHelper); |
| 223 }; | 223 }; |
| 224 | 224 |
| 225 } // namespace extensions | 225 } // namespace extensions |
| 226 | 226 |
| 227 #endif // CHROME_BROWSER_EXTENSIONS_TAB_HELPER_H_ | 227 #endif // CHROME_BROWSER_EXTENSIONS_TAB_HELPER_H_ |
| OLD | NEW |