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

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

Issue 2902153002: arc: Support non-standard display scale factors. (Closed)
Patch Set: rebase + unit test update to match this CL Created 3 years, 7 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* context_; 97 content::BrowserContext* context_;
98 std::string app_id_; 98 std::string app_id_;
99 const int resource_size_in_dip_; 99 const int resource_size_in_dip_;
100 Observer* observer_; 100 Observer* observer_;
101 101
102 Source* source_ = nullptr; // Owned by ImageSkia storage. 102 Source* source_ = nullptr; // Owned by ImageSkia storage.
103 gfx::ImageSkia image_skia_; 103 gfx::ImageSkia image_skia_;
104 104
105 // Contains pending image decode requests. 105 // Contains pending image decode requests.
106 std::vector<std::unique_ptr<DecodeRequest>> decode_requests_; 106 std::vector<std::unique_ptr<DecodeRequest>> decode_requests_;
107 107
108 base::WeakPtrFactory<ArcAppIcon> weak_ptr_factory_; 108 base::WeakPtrFactory<ArcAppIcon> weak_ptr_factory_;
109 109
110 DISALLOW_COPY_AND_ASSIGN(ArcAppIcon); 110 DISALLOW_COPY_AND_ASSIGN(ArcAppIcon);
111 }; 111 };
112 112
113 #endif // CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_ICON_H_ 113 #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