OLD | NEW |
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_standard.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; | 20 using extensions::Extension; |
21 | 21 |
22 namespace { | 22 namespace { |
23 // Allow tests to disable shortcut creation, to prevent developers' desktops | 23 // Allow tests to disable shortcut creation, to prevent developers' desktops |
24 // becoming overrun with shortcuts. | 24 // becoming overrun with shortcuts. |
25 bool disable_shortcut_creation_for_tests = false; | 25 bool disable_shortcut_creation_for_tests = false; |
26 | 26 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 } | 115 } |
116 info_list.push_back( | 116 info_list.push_back( |
117 ImageLoadingTracker::ImageInfo(resource, gfx::Size(size, size))); | 117 ImageLoadingTracker::ImageInfo(resource, gfx::Size(size, size))); |
118 } | 118 } |
119 | 119 |
120 // |icon_resources| may still be empty at this point, in which case LoadImage | 120 // |icon_resources| may still be empty at this point, in which case LoadImage |
121 // will call the OnImageLoaded callback with an empty image and exit | 121 // will call the OnImageLoaded callback with an empty image and exit |
122 // immediately. | 122 // immediately. |
123 tracker_.LoadImages(extension, info_list, ImageLoadingTracker::DONT_CACHE); | 123 tracker_.LoadImages(extension, info_list, ImageLoadingTracker::DONT_CACHE); |
124 } | 124 } |
OLD | NEW |