| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/frame/browser_window_property_manager_win.h" | 5 #include "chrome/browser/ui/views/frame/browser_window_property_manager_win.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "base/win/windows_version.h" | 9 #include "base/win/windows_version.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 base::CommandLine command_line(base::CommandLine::NO_PROGRAM); | 85 base::CommandLine command_line(base::CommandLine::NO_PROGRAM); |
| 86 shortcut_manager->GetShortcutProperties(profile_path, &command_line, | 86 shortcut_manager->GetShortcutProperties(profile_path, &command_line, |
| 87 &pinned_name, &icon_path); | 87 &pinned_name, &icon_path); |
| 88 command_line_string = command_line.GetCommandLineString(); | 88 command_line_string = command_line.GetCommandLineString(); |
| 89 } | 89 } |
| 90 ui::win::SetAppDetailsForWindow(app_id, icon_path, 0, command_line_string, | 90 ui::win::SetAppDetailsForWindow(app_id, icon_path, 0, command_line_string, |
| 91 pinned_name, hwnd_); | 91 pinned_name, hwnd_); |
| 92 } | 92 } |
| 93 | 93 |
| 94 // static | 94 // static |
| 95 scoped_ptr<BrowserWindowPropertyManager> | 95 std::unique_ptr<BrowserWindowPropertyManager> |
| 96 BrowserWindowPropertyManager::CreateBrowserWindowPropertyManager( | 96 BrowserWindowPropertyManager::CreateBrowserWindowPropertyManager( |
| 97 BrowserView* view, HWND hwnd) { | 97 BrowserView* view, |
| 98 HWND hwnd) { |
| 98 if (base::win::GetVersion() < base::win::VERSION_WIN7) | 99 if (base::win::GetVersion() < base::win::VERSION_WIN7) |
| 99 return nullptr; | 100 return nullptr; |
| 100 | 101 |
| 101 scoped_ptr<BrowserWindowPropertyManager> browser_window_property_manager( | 102 std::unique_ptr<BrowserWindowPropertyManager> browser_window_property_manager( |
| 102 new BrowserWindowPropertyManager(view, hwnd)); | 103 new BrowserWindowPropertyManager(view, hwnd)); |
| 103 browser_window_property_manager->UpdateWindowProperties(); | 104 browser_window_property_manager->UpdateWindowProperties(); |
| 104 return browser_window_property_manager; | 105 return browser_window_property_manager; |
| 105 } | 106 } |
| 106 | 107 |
| 107 void BrowserWindowPropertyManager::OnProfileIconVersionChange() { | 108 void BrowserWindowPropertyManager::OnProfileIconVersionChange() { |
| 108 UpdateWindowProperties(); | 109 UpdateWindowProperties(); |
| 109 } | 110 } |
| OLD | NEW |