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

Side by Side Diff: chrome/browser/ui/app_list/arc/arc_app_icon.h

Issue 2915963002: [Merge M60] arg: Support non-standard display scale factors. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/arc/arc_app_icon.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_APP_LIST_ARC_ARC_APP_ICON_H_ 5 #ifndef CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_ICON_H_
6 #define CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_ICON_H_ 6 #define CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_ICON_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // that new icon is available and corresponding item should invoke 84 // that new icon is available and corresponding item should invoke
85 // LoadImageForScaleFactor again. 85 // LoadImageForScaleFactor again.
86 void LoadForScaleFactor(ui::ScaleFactor scale_factor); 86 void LoadForScaleFactor(ui::ScaleFactor scale_factor);
87 87
88 void MaybeRequestIcon(ui::ScaleFactor scale_factor); 88 void MaybeRequestIcon(ui::ScaleFactor scale_factor);
89 static std::unique_ptr<ArcAppIcon::ReadResult> ReadOnFileThread( 89 static std::unique_ptr<ArcAppIcon::ReadResult> ReadOnFileThread(
90 ui::ScaleFactor scale_factor, 90 ui::ScaleFactor scale_factor,
91 const base::FilePath& path, 91 const base::FilePath& path,
92 const base::FilePath& default_app_path); 92 const base::FilePath& default_app_path);
93 void OnIconRead(std::unique_ptr<ArcAppIcon::ReadResult> read_result); 93 void OnIconRead(std::unique_ptr<ArcAppIcon::ReadResult> read_result);
94 void Update(const gfx::ImageSkia* image); 94 void Update(ui::ScaleFactor scale_factor, const SkBitmap& bitmap);
95 void DiscardDecodeRequest(DecodeRequest* request); 95 void DiscardDecodeRequest(DecodeRequest* request);
96 96
97 content::BrowserContext* const context_; 97 content::BrowserContext* const context_;
98 const std::string app_id_; 98 const std::string app_id_;
99 // Contains app id that is actually used to read an icon resource to support 99 // Contains app id that is actually used to read an icon resource to support
100 // shelf group mapping to shortcut. 100 // shelf group mapping to shortcut.
101 const std::string mapped_app_id_; 101 const std::string mapped_app_id_;
102 const int resource_size_in_dip_; 102 const int resource_size_in_dip_;
103 Observer* const observer_; 103 Observer* const observer_;
104 104
105 Source* source_ = nullptr; // Owned by ImageSkia storage. 105 Source* source_ = nullptr; // Owned by ImageSkia storage.
106 gfx::ImageSkia image_skia_; 106 gfx::ImageSkia image_skia_;
107 107
108 // Contains pending image decode requests. 108 // Contains pending image decode requests.
109 std::vector<std::unique_ptr<DecodeRequest>> decode_requests_; 109 std::vector<std::unique_ptr<DecodeRequest>> decode_requests_;
110 110
111 base::WeakPtrFactory<ArcAppIcon> weak_ptr_factory_; 111 base::WeakPtrFactory<ArcAppIcon> weak_ptr_factory_;
112 112
113 DISALLOW_COPY_AND_ASSIGN(ArcAppIcon); 113 DISALLOW_COPY_AND_ASSIGN(ArcAppIcon);
114 }; 114 };
115 115
116 #endif // CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_ICON_H_ 116 #endif // CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_ICON_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/arc/arc_app_icon.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698