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" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "chrome/browser/ui/web_applications/web_app_ui.h" | 21 #include "chrome/browser/ui/web_applications/web_app_ui.h" |
22 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" | 22 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" |
23 #include "chrome/common/chrome_constants.h" | 23 #include "chrome/common/chrome_constants.h" |
24 #include "chrome/common/extensions/extension.h" | 24 #include "chrome/common/extensions/extension.h" |
25 #include "chrome/common/extensions/extension_resource.h" | 25 #include "chrome/common/extensions/extension_resource.h" |
26 #include "chrome/common/pref_names.h" | 26 #include "chrome/common/pref_names.h" |
27 #include "content/public/browser/web_contents.h" | 27 #include "content/public/browser/web_contents.h" |
28 #include "content/public/browser/web_contents_delegate.h" | 28 #include "content/public/browser/web_contents_delegate.h" |
29 #include "grit/generated_resources.h" | 29 #include "grit/generated_resources.h" |
30 #include "grit/locale_settings.h" | 30 #include "grit/locale_settings.h" |
31 #include "grit/theme_resources_standard.h" | 31 #include "grit/theme_resources.h" |
32 #include "net/base/load_flags.h" | 32 #include "net/base/load_flags.h" |
33 #include "net/url_request/url_request.h" | 33 #include "net/url_request/url_request.h" |
34 #include "third_party/skia/include/core/SkBitmap.h" | 34 #include "third_party/skia/include/core/SkBitmap.h" |
35 #include "third_party/skia/include/core/SkPaint.h" | 35 #include "third_party/skia/include/core/SkPaint.h" |
36 #include "third_party/skia/include/core/SkRect.h" | 36 #include "third_party/skia/include/core/SkRect.h" |
37 #include "ui/base/l10n/l10n_util.h" | 37 #include "ui/base/l10n/l10n_util.h" |
38 #include "ui/base/resource/resource_bundle.h" | 38 #include "ui/base/resource/resource_bundle.h" |
39 #include "ui/gfx/canvas.h" | 39 #include "ui/gfx/canvas.h" |
40 #include "ui/gfx/codec/png_codec.h" | 40 #include "ui/gfx/codec/png_codec.h" |
41 #include "ui/views/controls/button/checkbox.h" | 41 #include "ui/views/controls/button/checkbox.h" |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 if (image.IsEmpty()) { | 538 if (image.IsEmpty()) { |
539 shortcut_info_.favicon = ui::ResourceBundle::GetSharedInstance(). | 539 shortcut_info_.favicon = ui::ResourceBundle::GetSharedInstance(). |
540 GetImageNamed(IDR_APP_DEFAULT_ICON); | 540 GetImageNamed(IDR_APP_DEFAULT_ICON); |
541 } else { | 541 } else { |
542 shortcut_info_.favicon = image; | 542 shortcut_info_.favicon = image; |
543 } | 543 } |
544 | 544 |
545 CHECK(app_info_); | 545 CHECK(app_info_); |
546 static_cast<AppInfoView*>(app_info_)->UpdateIcon(shortcut_info_.favicon); | 546 static_cast<AppInfoView*>(app_info_)->UpdateIcon(shortcut_info_.favicon); |
547 } | 547 } |
OLD | NEW |