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

Side by Side Diff: chrome/browser/icon_loader.h

Issue 6995068: Mac: Fix icons in download dom UI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/icon_loader_linux.cc » ('j') | chrome/browser/icon_loader_mac.mm » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_ICON_LOADER_H_ 5 #ifndef CHROME_BROWSER_ICON_LOADER_H_
6 #define CHROME_BROWSER_ICON_LOADER_H_ 6 #define CHROME_BROWSER_ICON_LOADER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 10
(...skipping 22 matching lines...) Expand all
33 // 33 //
34 // A facility to read a file containing an icon asynchronously in the IO 34 // A facility to read a file containing an icon asynchronously in the IO
35 // thread. Returns the icon in the form of an SkBitmap. 35 // thread. Returns the icon in the form of an SkBitmap.
36 // 36 //
37 //////////////////////////////////////////////////////////////////////////////// 37 ////////////////////////////////////////////////////////////////////////////////
38 class IconLoader : public base::RefCountedThreadSafe<IconLoader> { 38 class IconLoader : public base::RefCountedThreadSafe<IconLoader> {
39 public: 39 public:
40 enum IconSize { 40 enum IconSize {
41 SMALL = 0, // 16x16 41 SMALL = 0, // 16x16
42 NORMAL, // 32x32 42 NORMAL, // 32x32
43 LARGE 43 LARGE,
Robert Sesek 2011/06/08 12:57:31 Do you happen to know what 'large' means? 48? Can
sail 2011/06/08 19:23:42 Done.
44 ALL, // All sizes available
44 }; 45 };
45 46
46 class Delegate { 47 class Delegate {
47 public: 48 public:
48 // Invoked when an icon has been read. |source| is the IconLoader. If the 49 // Invoked when an icon has been read. |source| is the IconLoader. If the
49 // icon has been successfully loaded, result is non-null. This method must 50 // icon has been successfully loaded, result is non-null. This method must
50 // return true if it is taking ownership of the returned bitmap. 51 // return true if it is taking ownership of the returned bitmap.
51 virtual bool OnImageLoaded(IconLoader* source, gfx::Image* result) = 0; 52 virtual bool OnImageLoaded(IconLoader* source, gfx::Image* result) = 0;
52 53
53 protected: 54 protected:
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // on the main thread. 86 // on the main thread.
86 void ParseIcon(); 87 void ParseIcon();
87 FilePath filename_; 88 FilePath filename_;
88 std::string icon_data_; 89 std::string icon_data_;
89 #endif 90 #endif
90 91
91 DISALLOW_COPY_AND_ASSIGN(IconLoader); 92 DISALLOW_COPY_AND_ASSIGN(IconLoader);
92 }; 93 };
93 94
94 #endif // CHROME_BROWSER_ICON_LOADER_H_ 95 #endif // CHROME_BROWSER_ICON_LOADER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/icon_loader_linux.cc » ('j') | chrome/browser/icon_loader_mac.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698