OLD | NEW |
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_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 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 private: | 68 private: |
69 friend class base::RefCountedThreadSafe<IconLoader>; | 69 friend class base::RefCountedThreadSafe<IconLoader>; |
70 | 70 |
71 virtual ~IconLoader(); | 71 virtual ~IconLoader(); |
72 | 72 |
73 // Get the identifying string for the given file. The implementation | 73 // Get the identifying string for the given file. The implementation |
74 // is in icon_loader_[platform].cc. | 74 // is in icon_loader_[platform].cc. |
75 static IconGroupID ReadGroupIDFromFilepath(const base::FilePath& path); | 75 static IconGroupID ReadGroupIDFromFilepath(const base::FilePath& path); |
76 | 76 |
| 77 // Some icons (exe's on windows) can change as they're loaded. |
| 78 static bool IsIconMutableFromFilepath(const base::FilePath& path); |
| 79 |
77 void ReadGroup(); | 80 void ReadGroup(); |
78 void OnReadGroup(); | 81 void OnReadGroup(); |
79 void ReadIcon(); | 82 void ReadIcon(); |
80 | 83 |
81 void NotifyDelegate(); | 84 void NotifyDelegate(); |
82 | 85 |
83 // The message loop object of the thread in which we notify the delegate. | 86 // The message loop object of the thread in which we notify the delegate. |
84 scoped_refptr<base::MessageLoopProxy> target_message_loop_; | 87 scoped_refptr<base::MessageLoopProxy> target_message_loop_; |
85 | 88 |
86 base::FilePath file_path_; | 89 base::FilePath file_path_; |
87 | 90 |
88 IconGroupID group_; | 91 IconGroupID group_; |
89 | 92 |
90 IconSize icon_size_; | 93 IconSize icon_size_; |
91 | 94 |
92 scoped_ptr<gfx::Image> image_; | 95 scoped_ptr<gfx::Image> image_; |
93 | 96 |
94 Delegate* delegate_; | 97 Delegate* delegate_; |
95 | 98 |
96 DISALLOW_COPY_AND_ASSIGN(IconLoader); | 99 DISALLOW_COPY_AND_ASSIGN(IconLoader); |
97 }; | 100 }; |
98 | 101 |
99 #endif // CHROME_BROWSER_ICON_LOADER_H_ | 102 #endif // CHROME_BROWSER_ICON_LOADER_H_ |
OLD | NEW |