| 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/prefs/pref_service.h" | 11 #include "base/prefs/pref_service.h" |
| 12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 13 #include "base/win/windows_version.h" | 13 #include "base/win/windows_version.h" |
| 14 #include "chrome/browser/extensions/tab_helper.h" | 14 #include "chrome/browser/extensions/tab_helper.h" |
| 15 #include "chrome/browser/favicon/favicon_util.h" | 15 #include "chrome/browser/favicon/favicon_util.h" |
| 16 #include "chrome/browser/history/select_favicon_frames.h" | 16 #include "chrome/browser/history/select_favicon_frames.h" |
| 17 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
| 18 #include "chrome/browser/ui/browser.h" | 18 #include "chrome/browser/ui/browser.h" |
| 19 #include "chrome/browser/ui/browser_commands.h" | 19 #include "chrome/browser/ui/browser_commands.h" |
| 20 #include "chrome/browser/ui/browser_finder.h" | 20 #include "chrome/browser/ui/browser_finder.h" |
| 21 #include "chrome/browser/ui/views/constrained_window_views.h" | 21 #include "chrome/browser/ui/views/constrained_window_views.h" |
| 22 #include "chrome/browser/ui/web_applications/web_app_ui.h" | 22 #include "chrome/browser/ui/web_applications/web_app_ui.h" |
| 23 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" | 23 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" |
| 24 #include "chrome/common/chrome_constants.h" | 24 #include "chrome/common/chrome_constants.h" |
| 25 #include "chrome/common/extensions/extension.h" | |
| 26 #include "chrome/common/pref_names.h" | 25 #include "chrome/common/pref_names.h" |
| 27 #include "content/public/browser/render_view_host.h" | 26 #include "content/public/browser/render_view_host.h" |
| 28 #include "content/public/browser/render_widget_host_view.h" | 27 #include "content/public/browser/render_widget_host_view.h" |
| 29 #include "content/public/browser/web_contents.h" | 28 #include "content/public/browser/web_contents.h" |
| 29 #include "extensions/common/extension.h" |
| 30 #include "grit/chromium_strings.h" | 30 #include "grit/chromium_strings.h" |
| 31 #include "grit/generated_resources.h" | 31 #include "grit/generated_resources.h" |
| 32 #include "grit/locale_settings.h" | 32 #include "grit/locale_settings.h" |
| 33 #include "grit/theme_resources.h" | 33 #include "grit/theme_resources.h" |
| 34 #include "net/base/load_flags.h" | 34 #include "net/base/load_flags.h" |
| 35 #include "net/url_request/url_request.h" | 35 #include "net/url_request/url_request.h" |
| 36 #include "skia/ext/image_operations.h" | 36 #include "skia/ext/image_operations.h" |
| 37 #include "third_party/skia/include/core/SkBitmap.h" | 37 #include "third_party/skia/include/core/SkBitmap.h" |
| 38 #include "third_party/skia/include/core/SkPaint.h" | 38 #include "third_party/skia/include/core/SkPaint.h" |
| 39 #include "third_party/skia/include/core/SkRect.h" | 39 #include "third_party/skia/include/core/SkRect.h" |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 } | 548 } |
| 549 | 549 |
| 550 // Called when the app's ShortcutInfo (with icon) is loaded. | 550 // Called when the app's ShortcutInfo (with icon) is loaded. |
| 551 void CreateChromeApplicationShortcutView::OnShortcutInfoLoaded( | 551 void CreateChromeApplicationShortcutView::OnShortcutInfoLoaded( |
| 552 const ShellIntegration::ShortcutInfo& shortcut_info) { | 552 const ShellIntegration::ShortcutInfo& shortcut_info) { |
| 553 shortcut_info_ = shortcut_info; | 553 shortcut_info_ = shortcut_info; |
| 554 | 554 |
| 555 CHECK(app_info_); | 555 CHECK(app_info_); |
| 556 static_cast<AppInfoView*>(app_info_)->UpdateIcon(shortcut_info_.favicon); | 556 static_cast<AppInfoView*>(app_info_)->UpdateIcon(shortcut_info_.favicon); |
| 557 } | 557 } |
| OLD | NEW |