| 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/jumplist_win.h" | 5 #include "chrome/browser/jumplist_win.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <shobjidl.h> | 8 #include <shobjidl.h> |
| 9 #include <propkey.h> | 9 #include <propkey.h> |
| 10 #include <propvarutil.h> | 10 #include <propvarutil.h> |
| 11 | 11 |
| 12 #include <string> | 12 #include <string> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/bind.h" | 15 #include "base/bind.h" |
| 16 #include "base/bind_helpers.h" | 16 #include "base/bind_helpers.h" |
| 17 #include "base/command_line.h" | 17 #include "base/command_line.h" |
| 18 #include "base/file_util.h" | 18 #include "base/file_util.h" |
| 19 #include "base/path_service.h" | 19 #include "base/path_service.h" |
| 20 #include "base/strings/string_util.h" | 20 #include "base/strings/string_util.h" |
| 21 #include "base/strings/utf_string_conversions.h" | 21 #include "base/strings/utf_string_conversions.h" |
| 22 #include "base/threading/thread.h" | 22 #include "base/threading/thread.h" |
| 23 #include "base/win/scoped_comptr.h" | 23 #include "base/win/scoped_comptr.h" |
| 24 #include "base/win/scoped_propvariant.h" | 24 #include "base/win/scoped_propvariant.h" |
| 25 #include "base/win/windows_version.h" | 25 #include "base/win/windows_version.h" |
| 26 #include "chrome/browser/favicon/favicon_service.h" | 26 #include "chrome/browser/favicon/favicon_service.h" |
| 27 #include "chrome/browser/favicon/favicon_service_factory.h" | 27 #include "chrome/browser/favicon/favicon_service_factory.h" |
| 28 #include "chrome/browser/favicon/favicon_types.h" | |
| 29 #include "chrome/browser/history/history_service.h" | 28 #include "chrome/browser/history/history_service.h" |
| 30 #include "chrome/browser/history/page_usage_data.h" | 29 #include "chrome/browser/history/page_usage_data.h" |
| 31 #include "chrome/browser/history/top_sites.h" | 30 #include "chrome/browser/history/top_sites.h" |
| 32 #include "chrome/browser/profiles/profile.h" | 31 #include "chrome/browser/profiles/profile.h" |
| 33 #include "chrome/browser/sessions/session_types.h" | 32 #include "chrome/browser/sessions/session_types.h" |
| 34 #include "chrome/browser/sessions/tab_restore_service.h" | 33 #include "chrome/browser/sessions/tab_restore_service.h" |
| 35 #include "chrome/browser/sessions/tab_restore_service_factory.h" | 34 #include "chrome/browser/sessions/tab_restore_service_factory.h" |
| 36 #include "chrome/browser/shell_integration.h" | 35 #include "chrome/browser/shell_integration.h" |
| 37 #include "chrome/common/chrome_constants.h" | 36 #include "chrome/common/chrome_constants.h" |
| 38 #include "chrome/common/chrome_notification_types.h" | 37 #include "chrome/common/chrome_notification_types.h" |
| 39 #include "chrome/common/chrome_switches.h" | 38 #include "chrome/common/chrome_switches.h" |
| 39 #include "chrome/common/favicon/favicon_types.h" |
| 40 #include "chrome/common/url_constants.h" | 40 #include "chrome/common/url_constants.h" |
| 41 #include "content/public/browser/browser_thread.h" | 41 #include "content/public/browser/browser_thread.h" |
| 42 #include "content/public/browser/notification_source.h" | 42 #include "content/public/browser/notification_source.h" |
| 43 #include "grit/chromium_strings.h" | 43 #include "grit/chromium_strings.h" |
| 44 #include "grit/generated_resources.h" | 44 #include "grit/generated_resources.h" |
| 45 #include "third_party/skia/include/core/SkBitmap.h" | 45 #include "third_party/skia/include/core/SkBitmap.h" |
| 46 #include "ui/base/l10n/l10n_util.h" | 46 #include "ui/base/l10n/l10n_util.h" |
| 47 #include "ui/gfx/codec/png_codec.h" | 47 #include "ui/gfx/codec/png_codec.h" |
| 48 #include "ui/gfx/favicon_size.h" | 48 #include "ui/gfx/favicon_size.h" |
| 49 #include "ui/gfx/icon_util.h" | 49 #include "ui/gfx/icon_util.h" |
| (...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 } | 755 } |
| 756 | 756 |
| 757 void JumpList::CreateIconFiles(const ShellLinkItemList& item_list) { | 757 void JumpList::CreateIconFiles(const ShellLinkItemList& item_list) { |
| 758 for (ShellLinkItemList::const_iterator item = item_list.begin(); | 758 for (ShellLinkItemList::const_iterator item = item_list.begin(); |
| 759 item != item_list.end(); ++item) { | 759 item != item_list.end(); ++item) { |
| 760 base::FilePath icon_path; | 760 base::FilePath icon_path; |
| 761 if (CreateIconFile((*item)->data(), icon_dir_, &icon_path)) | 761 if (CreateIconFile((*item)->data(), icon_dir_, &icon_path)) |
| 762 (*item)->SetIcon(icon_path.value(), 0, true); | 762 (*item)->SetIcon(icon_path.value(), 0, true); |
| 763 } | 763 } |
| 764 } | 764 } |
| OLD | NEW |