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

Side by Side Diff: chrome/browser/extensions/app_shortcut_manager.cc

Issue 10375021: Move Extension into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Take 6 Created 8 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
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/extensions/app_shortcut_manager.h" 5 #include "chrome/browser/extensions/app_shortcut_manager.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/web_applications/web_app.h" 10 #include "chrome/browser/web_applications/web_app.h"
11 #include "chrome/common/chrome_notification_types.h" 11 #include "chrome/common/chrome_notification_types.h"
12 #include "chrome/common/chrome_switches.h" 12 #include "chrome/common/chrome_switches.h"
13 #include "chrome/common/extensions/extension_resource.h" 13 #include "chrome/common/extensions/extension_resource.h"
14 #include "content/public/browser/notification_details.h" 14 #include "content/public/browser/notification_details.h"
15 #include "content/public/browser/notification_source.h" 15 #include "content/public/browser/notification_source.h"
16 #include "grit/theme_resources.h" 16 #include "grit/theme_resources.h"
17 #include "skia/ext/image_operations.h" 17 #include "skia/ext/image_operations.h"
18 #include "ui/base/resource/resource_bundle.h" 18 #include "ui/base/resource/resource_bundle.h"
19 19
20 using extensions::Extension;
21
20 namespace { 22 namespace {
21 // Allow tests to disable shortcut creation, to prevent developers' desktops 23 // Allow tests to disable shortcut creation, to prevent developers' desktops
22 // becoming overrun with shortcuts. 24 // becoming overrun with shortcuts.
23 bool disable_shortcut_creation_for_tests = false; 25 bool disable_shortcut_creation_for_tests = false;
24 26
25 #if defined(OS_MACOSX) 27 #if defined(OS_MACOSX)
26 const int kDesiredSizes[] = {16, 32, 128, 256, 512}; 28 const int kDesiredSizes[] = {16, 32, 128, 256, 512};
27 #else 29 #else
28 const int kDesiredSizes[] = {32}; 30 const int kDesiredSizes[] = {32};
29 #endif 31 #endif
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 } 119 }
118 info_list.push_back( 120 info_list.push_back(
119 ImageLoadingTracker::ImageInfo(resource, gfx::Size(size, size))); 121 ImageLoadingTracker::ImageInfo(resource, gfx::Size(size, size)));
120 } 122 }
121 123
122 // |icon_resources| may still be empty at this point, in which case LoadImage 124 // |icon_resources| may still be empty at this point, in which case LoadImage
123 // will call the OnImageLoaded callback with an empty image and exit 125 // will call the OnImageLoaded callback with an empty image and exit
124 // immediately. 126 // immediately.
125 tracker_.LoadImages(extension, info_list, ImageLoadingTracker::DONT_CACHE); 127 tracker_.LoadImages(extension, info_list, ImageLoadingTracker::DONT_CACHE);
126 } 128 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/app_shortcut_manager.h ('k') | chrome/browser/extensions/app_sync_bundle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698