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

Side by Side Diff: chrome/browser/ui/web_applications/web_app_ui.cc

Issue 12218069: CreateShortcutIcon on Linux now creates icons at all available resolutions, not (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Checking return values and correctly initializing vector. Created 7 years, 10 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 | « chrome/browser/shell_integration_linux.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "chrome/browser/ui/web_applications/web_app_ui.h" 5 #include "chrome/browser/ui/web_applications/web_app_ui.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 28 matching lines...) Expand all
39 #endif 39 #endif
40 40
41 using content::BrowserThread; 41 using content::BrowserThread;
42 using content::NavigationController; 42 using content::NavigationController;
43 using content::WebContents; 43 using content::WebContents;
44 44
45 namespace { 45 namespace {
46 46
47 #if defined(OS_MACOSX) 47 #if defined(OS_MACOSX)
48 const int kDesiredSizes[] = {16, 32, 128, 256, 512}; 48 const int kDesiredSizes[] = {16, 32, 128, 256, 512};
49 #elif defined(OS_LINUX)
50 // Linux supports icons of any size. FreeDesktop Icon Theme Specification states
51 // that "Minimally you should install a 48x48 icon in the hicolor theme."
52 const int kDesiredSizes[] = {16, 32, 48, 128, 256, 512};
49 #else 53 #else
50 const int kDesiredSizes[] = {32}; 54 const int kDesiredSizes[] = {32};
51 #endif 55 #endif
52 56
53 #if defined(OS_WIN) 57 #if defined(OS_WIN)
54 // UpdateShortcutWorker holds all context data needed for update shortcut. 58 // UpdateShortcutWorker holds all context data needed for update shortcut.
55 // It schedules a pre-update check to find all shortcuts that needs to be 59 // It schedules a pre-update check to find all shortcuts that needs to be
56 // updated. If there are such shortcuts, it schedules icon download and 60 // updated. If there are such shortcuts, it schedules icon download and
57 // update them when icons are downloaded. It observes TAB_CLOSING notification 61 // update them when icons are downloaded. It observes TAB_CLOSING notification
58 // and cancels all the work when the underlying tab is closing. 62 // and cancels all the work when the underlying tab is closing.
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 } 445 }
442 446
443 // |info_list| may still be empty at this point, in which case LoadImage 447 // |info_list| may still be empty at this point, in which case LoadImage
444 // will call the OnImageLoaded callback with an empty image and exit 448 // will call the OnImageLoaded callback with an empty image and exit
445 // immediately. 449 // immediately.
446 extensions::ImageLoader::Get(profile)->LoadImagesAsync(&extension, info_list, 450 extensions::ImageLoader::Get(profile)->LoadImagesAsync(&extension, info_list,
447 base::Bind(&OnImageLoaded, shortcut_info, callback)); 451 base::Bind(&OnImageLoaded, shortcut_info, callback));
448 } 452 }
449 453
450 } // namespace web_app 454 } // namespace web_app
OLDNEW
« no previous file with comments | « chrome/browser/shell_integration_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698