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

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: updated comment 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: 43 public:
45 // Different types of action when web app info is available. 44 // Different types of action when web app info is available.
46 // OnDidGetApplicationInfo uses this to dispatch calls. 45 // OnDidGetApplicationInfo uses this to dispatch calls.
47 enum WebAppAction { 46 enum WebAppAction {
48 NONE, // No action at all. 47 NONE, // No action at all.
49 CREATE_SHORTCUT, // Bring up create application shortcut dialog. 48 CREATE_SHORTCUT, // Bring up create application shortcut dialog.
50 UPDATE_SHORTCUT // Update icon for app shortcut. 49 UPDATE_SHORTCUT // Update icon for app shortcut.
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 void UpdateExtensionAppIcon(const Extension* extension); 155 void UpdateExtensionAppIcon(const Extension* extension);
157 156
158 const Extension* GetExtension( 157 const Extension* GetExtension(
159 const std::string& extension_app_id); 158 const std::string& extension_app_id);
160 159
161 // ImageLoadingTracker::Observer. 160 // ImageLoadingTracker::Observer.
162 virtual void OnImageLoaded(const gfx::Image& image, 161 virtual void OnImageLoaded(const gfx::Image& image,
163 const std::string& extension_id, 162 const std::string& extension_id,
164 int index) OVERRIDE; 163 int index) OVERRIDE;
165 164
166 // WebstoreInlineInstaller::Delegate. 165 // WebstoreInlineInstaller::Callback.
167 virtual void OnInlineInstallSuccess(int install_id, 166 virtual void OnInlineInstallComplete(int install_id,
168 int return_route_id) OVERRIDE; 167 int return_route_id,
169 virtual void OnInlineInstallFailure(int install_id, 168 bool success,
170 int return_route_id, 169 const std::string& error);
171 const std::string& error) OVERRIDE;
172 170
173 // AppNotifyChannelSetup::Delegate. 171 // AppNotifyChannelSetup::Delegate.
174 virtual void AppNotifyChannelSetupComplete( 172 virtual void AppNotifyChannelSetupComplete(
175 const std::string& channel_id, 173 const std::string& channel_id,
176 const std::string& error, 174 const std::string& error,
177 const AppNotifyChannelSetup* setup) OVERRIDE; 175 const AppNotifyChannelSetup* setup) OVERRIDE;
178 176
179 // content::NotificationObserver. 177 // content::NotificationObserver.
180 virtual void Observe(int type, 178 virtual void Observe(int type,
181 const content::NotificationSource& source, 179 const content::NotificationSource& source,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 scoped_ptr<LocationBarController> location_bar_controller_; 220 scoped_ptr<LocationBarController> location_bar_controller_;
223 221
224 ActiveTabPermissionManager active_tab_permission_manager_; 222 ActiveTabPermissionManager active_tab_permission_manager_;
225 223
226 DISALLOW_COPY_AND_ASSIGN(TabHelper); 224 DISALLOW_COPY_AND_ASSIGN(TabHelper);
227 }; 225 };
228 226
229 } // namespace extensions 227 } // namespace extensions
230 228
231 #endif // CHROME_BROWSER_EXTENSIONS_TAB_HELPER_H_ 229 #endif // CHROME_BROWSER_EXTENSIONS_TAB_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698