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

Side by Side Diff: chrome/browser/icon_loader_aurax11.cc

Issue 74543002: Rename icon_loader_aurax11 as icon_loader_auralinux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 1 month 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 | « chrome/browser/icon_loader_auralinux.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/icon_loader.h"
6
7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h"
9 #include "base/nix/mime_util_xdg.h"
10 #include "ui/views/linux_ui/linux_ui.h"
11
12 // static
13 IconGroupID IconLoader::ReadGroupIDFromFilepath(
14 const base::FilePath& filepath) {
15 return base::nix::GetFileMimeType(filepath);
16 }
17
18 bool IconLoader::IsIconMutableFromFilepath(const base::FilePath&) {
19 return false;
20 }
21
22 void IconLoader::ReadIcon() {
23 int size_pixels = 0;
24 switch (icon_size_) {
25 case IconLoader::SMALL:
26 size_pixels = 16;
27 break;
28 case IconLoader::NORMAL:
29 size_pixels = 32;
30 break;
31 case IconLoader::LARGE:
32 size_pixels = 48;
33 break;
34 default:
35 NOTREACHED();
36 }
37
38 views::LinuxUI* ui = views::LinuxUI::instance();
39 if (ui) {
40 gfx::Image image = ui->GetIconForContentType(group_, size_pixels);
41 if (!image.IsEmpty())
42 image_.reset(new gfx::Image(image));
43 }
44
45 target_message_loop_->PostTask(
46 FROM_HERE, base::Bind(&IconLoader::NotifyDelegate, this));
47 }
OLDNEW
« no previous file with comments | « chrome/browser/icon_loader_auralinux.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698