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

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

Issue 12213093: Remove ImageLoadingTracker class (Closed) Base URL: https://git.chromium.org/chromium/src.git@Issue_163929
Patch Set: Fix merge conflict Created 7 years, 10 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 <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/observer_list.h" 14 #include "base/observer_list.h"
15 #include "chrome/browser/extensions/active_tab_permission_granter.h" 15 #include "chrome/browser/extensions/active_tab_permission_granter.h"
16 #include "chrome/browser/extensions/app_notify_channel_setup.h" 16 #include "chrome/browser/extensions/app_notify_channel_setup.h"
17 #include "chrome/browser/extensions/extension_function_dispatcher.h" 17 #include "chrome/browser/extensions/extension_function_dispatcher.h"
18 #include "chrome/browser/extensions/image_loading_tracker.h"
19 #include "chrome/common/web_apps.h" 18 #include "chrome/common/web_apps.h"
20 #include "content/public/browser/notification_observer.h" 19 #include "content/public/browser/notification_observer.h"
21 #include "content/public/browser/notification_registrar.h" 20 #include "content/public/browser/notification_registrar.h"
22 #include "content/public/browser/web_contents_observer.h" 21 #include "content/public/browser/web_contents_observer.h"
23 #include "content/public/browser/web_contents_user_data.h" 22 #include "content/public/browser/web_contents_user_data.h"
24 #include "third_party/skia/include/core/SkBitmap.h" 23 #include "third_party/skia/include/core/SkBitmap.h"
25 24
26 struct WebApplicationInfo; 25 struct WebApplicationInfo;
27 26
28 namespace content { 27 namespace content {
29 struct LoadCommittedDetails; 28 struct LoadCommittedDetails;
30 } 29 }
31 30
31 namespace gfx {
32 class Image;
33 }
34
32 namespace extensions { 35 namespace extensions {
33 class Extension; 36 class Extension;
34 class LocationBarController; 37 class LocationBarController;
35 class RulesRegistryService; 38 class RulesRegistryService;
36 class ScriptBadgeController; 39 class ScriptBadgeController;
37 class ScriptBubbleController; 40 class ScriptBubbleController;
38 class ScriptExecutor; 41 class ScriptExecutor;
39 42
40 // Per-tab extension helper. Also handles non-extension apps. 43 // Per-tab extension helper. Also handles non-extension apps.
41 class TabHelper : public content::WebContentsObserver, 44 class TabHelper : public content::WebContentsObserver,
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 int callback_id); 195 int callback_id);
193 void OnRequest(const ExtensionHostMsg_Request_Params& params); 196 void OnRequest(const ExtensionHostMsg_Request_Params& params);
194 void OnContentScriptsExecuting( 197 void OnContentScriptsExecuting(
195 const ScriptExecutionObserver::ExecutingScriptsMap& extension_ids, 198 const ScriptExecutionObserver::ExecutingScriptsMap& extension_ids,
196 int32 page_id, 199 int32 page_id,
197 const GURL& on_url); 200 const GURL& on_url);
198 void OnWatchedPageChange(const std::vector<std::string>& css_selectors); 201 void OnWatchedPageChange(const std::vector<std::string>& css_selectors);
199 202
200 // App extensions related methods: 203 // App extensions related methods:
201 204
202 // Resets app_icon_ and if |extension| is non-null creates a new 205 // Resets app_icon_ and if |extension| is non-null uses ImageLoader to load
203 // ImageLoadingTracker to load the extension's image. 206 // the extension's image asynchronously.
204 void UpdateExtensionAppIcon(const Extension* extension); 207 void UpdateExtensionAppIcon(const Extension* extension);
205 208
206 const Extension* GetExtension(const std::string& extension_app_id); 209 const Extension* GetExtension(const std::string& extension_app_id);
207 210
208 void OnImageLoaded(const gfx::Image& image); 211 void OnImageLoaded(const gfx::Image& image);
209 212
210 // WebstoreStandaloneInstaller::Callback. 213 // WebstoreStandaloneInstaller::Callback.
211 virtual void OnInlineInstallComplete(int install_id, 214 virtual void OnInlineInstallComplete(int install_id,
212 int return_route_id, 215 int return_route_id,
213 bool success, 216 bool success,
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 272
270 // Vend weak pointers that can be invalidated to stop in-progress loads. 273 // Vend weak pointers that can be invalidated to stop in-progress loads.
271 base::WeakPtrFactory<TabHelper> image_loader_ptr_factory_; 274 base::WeakPtrFactory<TabHelper> image_loader_ptr_factory_;
272 275
273 DISALLOW_COPY_AND_ASSIGN(TabHelper); 276 DISALLOW_COPY_AND_ASSIGN(TabHelper);
274 }; 277 };
275 278
276 } // namespace extensions 279 } // namespace extensions
277 280
278 #endif // CHROME_BROWSER_EXTENSIONS_TAB_HELPER_H_ 281 #endif // CHROME_BROWSER_EXTENSIONS_TAB_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/image_loading_tracker_unittest.cc ('k') | chrome/browser/ui/ash/app_icon_loader_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698