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/ui/views/create_application_shortcut_view.h" | 5 #include "chrome/browser/ui/views/create_application_shortcut_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
12 #include "base/win/windows_version.h" | 12 #include "base/win/windows_version.h" |
13 #include "chrome/browser/extensions/extension_tab_helper.h" | 13 #include "chrome/browser/extensions/extension_tab_helper.h" |
14 #include "chrome/browser/favicon/favicon_tab_helper.h" | 14 #include "chrome/browser/favicon/favicon_tab_helper.h" |
15 #include "chrome/browser/prefs/pref_service.h" | 15 #include "chrome/browser/prefs/pref_service.h" |
16 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
17 #include "chrome/browser/ui/tab_contents/tab_contents.h" | 17 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
18 #include "chrome/browser/ui/web_applications/web_app_ui.h" | 18 #include "chrome/browser/ui/web_applications/web_app_ui.h" |
19 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" | 19 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" |
20 #include "chrome/common/chrome_constants.h" | 20 #include "chrome/common/chrome_constants.h" |
21 #include "chrome/common/extensions/extension.h" | 21 #include "chrome/common/extensions/extension.h" |
22 #include "chrome/common/extensions/extension_resource.h" | 22 #include "chrome/common/extensions/extension_resource.h" |
23 #include "chrome/common/pref_names.h" | 23 #include "chrome/common/pref_names.h" |
24 #include "content/public/browser/web_contents.h" | 24 #include "content/public/browser/web_contents.h" |
25 #include "content/public/browser/web_contents_delegate.h" | 25 #include "content/public/browser/web_contents_delegate.h" |
26 #include "grit/generated_resources.h" | 26 #include "grit/generated_resources.h" |
27 #include "grit/locale_settings.h" | 27 #include "grit/locale_settings.h" |
28 #include "grit/theme_resources.h" | 28 #include "grit/theme_resources_standard.h" |
29 #include "net/base/load_flags.h" | 29 #include "net/base/load_flags.h" |
30 #include "net/url_request/url_request.h" | 30 #include "net/url_request/url_request.h" |
31 #include "third_party/skia/include/core/SkBitmap.h" | 31 #include "third_party/skia/include/core/SkBitmap.h" |
32 #include "third_party/skia/include/core/SkPaint.h" | 32 #include "third_party/skia/include/core/SkPaint.h" |
33 #include "third_party/skia/include/core/SkRect.h" | 33 #include "third_party/skia/include/core/SkRect.h" |
34 #include "ui/base/l10n/l10n_util.h" | 34 #include "ui/base/l10n/l10n_util.h" |
35 #include "ui/base/resource/resource_bundle.h" | 35 #include "ui/base/resource/resource_bundle.h" |
36 #include "ui/gfx/canvas.h" | 36 #include "ui/gfx/canvas.h" |
37 #include "ui/gfx/codec/png_codec.h" | 37 #include "ui/gfx/codec/png_codec.h" |
38 #include "ui/views/controls/button/checkbox.h" | 38 #include "ui/views/controls/button/checkbox.h" |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 if (image.IsEmpty()) { | 534 if (image.IsEmpty()) { |
535 shortcut_info_.favicon = ui::ResourceBundle::GetSharedInstance(). | 535 shortcut_info_.favicon = ui::ResourceBundle::GetSharedInstance(). |
536 GetImageNamed(IDR_APP_DEFAULT_ICON); | 536 GetImageNamed(IDR_APP_DEFAULT_ICON); |
537 } else { | 537 } else { |
538 shortcut_info_.favicon = image; | 538 shortcut_info_.favicon = image; |
539 } | 539 } |
540 | 540 |
541 CHECK(app_info_); | 541 CHECK(app_info_); |
542 static_cast<AppInfoView*>(app_info_)->UpdateIcon(shortcut_info_.favicon); | 542 static_cast<AppInfoView*>(app_info_)->UpdateIcon(shortcut_info_.favicon); |
543 } | 543 } |
OLD | NEW |