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

Side by Side Diff: chrome/browser/ui/views/aura/launcher/launcher_icon_loader.h

Issue 9586018: Add support for multiple icon sizes for Mac platform apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build Created 8 years, 9 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_UI_VIEWS_AURA_LAUNCHER_LAUNCHER_ICON_LOADER_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_AURA_LAUNCHER_LAUNCHER_ICON_LOADER_H_
6 #define CHROME_BROWSER_UI_VIEWS_AURA_LAUNCHER_LAUNCHER_ICON_LOADER_H_ 6 #define CHROME_BROWSER_UI_VIEWS_AURA_LAUNCHER_LAUNCHER_ICON_LOADER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 12 matching lines...) Expand all
23 public: 23 public:
24 LauncherIconLoader(Profile* profile, ChromeLauncherDelegate* host); 24 LauncherIconLoader(Profile* profile, ChromeLauncherDelegate* host);
25 virtual ~LauncherIconLoader(); 25 virtual ~LauncherIconLoader();
26 26
27 // AppIconLoader: 27 // AppIconLoader:
28 virtual std::string GetAppID(TabContentsWrapper* tab) OVERRIDE; 28 virtual std::string GetAppID(TabContentsWrapper* tab) OVERRIDE;
29 virtual bool IsValidID(const std::string& id) OVERRIDE; 29 virtual bool IsValidID(const std::string& id) OVERRIDE;
30 virtual void FetchImage(const std::string& id) OVERRIDE; 30 virtual void FetchImage(const std::string& id) OVERRIDE;
31 31
32 // ImageLoadingTracker::Observer: 32 // ImageLoadingTracker::Observer:
33 virtual void OnImageLoaded(SkBitmap* image, 33 virtual void OnImageLoaded(const gfx::Image& image,
34 const ExtensionResource& resource, 34 const std::string& extension_id,
35 int index) OVERRIDE; 35 int index) OVERRIDE;
36 36
37 private: 37 private:
38 typedef std::map<int, std::string> ImageLoaderIDToExtensionIDMap; 38 typedef std::map<int, std::string> ImageLoaderIDToExtensionIDMap;
39 39
40 // Returns the extension for the specified tab. 40 // Returns the extension for the specified tab.
41 const Extension* GetExtensionForTab(TabContentsWrapper* tab); 41 const Extension* GetExtensionForTab(TabContentsWrapper* tab);
42 42
43 // Returns the extension by ID. 43 // Returns the extension by ID.
44 const Extension* GetExtensionByID(const std::string& id); 44 const Extension* GetExtensionByID(const std::string& id);
45 45
46 Profile* profile_; 46 Profile* profile_;
47 47
48 // ChromeLauncherDelegate we're associated with (and owned by). 48 // ChromeLauncherDelegate we're associated with (and owned by).
49 ChromeLauncherDelegate* host_; 49 ChromeLauncherDelegate* host_;
50 50
51 // Used to load images. 51 // Used to load images.
52 scoped_ptr<ImageLoadingTracker> image_loader_; 52 scoped_ptr<ImageLoadingTracker> image_loader_;
53 53
54 // Maps from id from the ImageLoadingTracker to the extension id. 54 // Maps from id from the ImageLoadingTracker to the extension id.
55 ImageLoaderIDToExtensionIDMap map_; 55 ImageLoaderIDToExtensionIDMap map_;
56 56
57 DISALLOW_COPY_AND_ASSIGN(LauncherIconLoader); 57 DISALLOW_COPY_AND_ASSIGN(LauncherIconLoader);
58 }; 58 };
59 59
60 #endif // CHROME_BROWSER_UI_VIEWS_AURA_LAUNCHER_LAUNCHER_ICON_LOADER_H_ 60 #endif // CHROME_BROWSER_UI_VIEWS_AURA_LAUNCHER_LAUNCHER_ICON_LOADER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698