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

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

Issue 10907104: Support an --install-from-webstore command line switch (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: rebased Created 8 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 | 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 "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"
(...skipping 19 matching lines...) Expand all
30 namespace extensions { 30 namespace extensions {
31 class Extension; 31 class Extension;
32 class LocationBarController; 32 class LocationBarController;
33 class ScriptBadgeController; 33 class ScriptBadgeController;
34 class ScriptExecutor; 34 class ScriptExecutor;
35 35
36 // Per-tab extension helper. Also handles non-extension apps. 36 // Per-tab extension helper. Also handles non-extension apps.
37 class TabHelper : public content::WebContentsObserver, 37 class TabHelper : public content::WebContentsObserver,
38 public ExtensionFunctionDispatcher::Delegate, 38 public ExtensionFunctionDispatcher::Delegate,
39 public ImageLoadingTracker::Observer, 39 public ImageLoadingTracker::Observer,
40 public WebstoreInlineInstaller::Delegate,
41 public AppNotifyChannelSetup::Delegate, 40 public AppNotifyChannelSetup::Delegate,
42 public base::SupportsWeakPtr<TabHelper>, 41 public base::SupportsWeakPtr<TabHelper>,
43 public content::NotificationObserver, 42 public content::NotificationObserver,
44 public WebContentsUserData<TabHelper> { 43 public WebContentsUserData<TabHelper> {
45 public: 44 public:
46 // Different types of action when web app info is available. 45 // Different types of action when web app info is available.
47 // OnDidGetApplicationInfo uses this to dispatch calls. 46 // OnDidGetApplicationInfo uses this to dispatch calls.
48 enum WebAppAction { 47 enum WebAppAction {
49 NONE, // No action at all. 48 NONE, // No action at all.
50 CREATE_SHORTCUT, // Bring up create application shortcut dialog. 49 CREATE_SHORTCUT, // Bring up create application shortcut dialog.
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 void UpdateExtensionAppIcon(const Extension* extension); 153 void UpdateExtensionAppIcon(const Extension* extension);
155 154
156 const Extension* GetExtension( 155 const Extension* GetExtension(
157 const std::string& extension_app_id); 156 const std::string& extension_app_id);
158 157
159 // ImageLoadingTracker::Observer. 158 // ImageLoadingTracker::Observer.
160 virtual void OnImageLoaded(const gfx::Image& image, 159 virtual void OnImageLoaded(const gfx::Image& image,
161 const std::string& extension_id, 160 const std::string& extension_id,
162 int index) OVERRIDE; 161 int index) OVERRIDE;
163 162
164 // WebstoreInlineInstaller::Delegate. 163 // WebstoreInlineInstaller::Callback.
165 virtual void OnInlineInstallSuccess(int install_id, 164 virtual void OnInlineInstallComplete(int install_id,
166 int return_route_id) OVERRIDE; 165 int return_route_id,
167 virtual void OnInlineInstallFailure(int install_id, 166 bool success,
168 int return_route_id, 167 const std::string& error);
169 const std::string& error) OVERRIDE;
170 168
171 // AppNotifyChannelSetup::Delegate. 169 // AppNotifyChannelSetup::Delegate.
172 virtual void AppNotifyChannelSetupComplete( 170 virtual void AppNotifyChannelSetupComplete(
173 const std::string& channel_id, 171 const std::string& channel_id,
174 const std::string& error, 172 const std::string& error,
175 const AppNotifyChannelSetup* setup) OVERRIDE; 173 const AppNotifyChannelSetup* setup) OVERRIDE;
176 174
177 // content::NotificationObserver. 175 // content::NotificationObserver.
178 virtual void Observe(int type, 176 virtual void Observe(int type,
179 const content::NotificationSource& source, 177 const content::NotificationSource& source,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 scoped_ptr<LocationBarController> location_bar_controller_; 216 scoped_ptr<LocationBarController> location_bar_controller_;
219 217
220 scoped_ptr<ActiveTabPermissionManager> active_tab_permission_manager_; 218 scoped_ptr<ActiveTabPermissionManager> active_tab_permission_manager_;
221 219
222 DISALLOW_COPY_AND_ASSIGN(TabHelper); 220 DISALLOW_COPY_AND_ASSIGN(TabHelper);
223 }; 221 };
224 222
225 } // namespace extensions 223 } // namespace extensions
226 224
227 #endif // CHROME_BROWSER_EXTENSIONS_TAB_HELPER_H_ 225 #endif // CHROME_BROWSER_EXTENSIONS_TAB_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698