Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(719)

Side by Side Diff: chrome/browser/ui/views/apps/chrome_native_app_window_views_win.cc

Issue 213833005: Prevent SHChangeNotify on app list drag on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/apps/chrome_native_app_window_views_win.h" 5 #include "chrome/browser/ui/views/apps/chrome_native_app_window_views_win.h"
6 6
7 #include "apps/app_window.h" 7 #include "apps/app_window.h"
8 #include "apps/app_window_registry.h" 8 #include "apps/app_window_registry.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 const ShellIntegration::ShortcutInfo& shortcut_info) { 92 const ShellIntegration::ShortcutInfo& shortcut_info) {
93 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 93 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
94 94
95 HWND hwnd = GetNativeAppWindowHWND(); 95 HWND hwnd = GetNativeAppWindowHWND();
96 96
97 // Set window's icon to the one we're about to create/update in the web app 97 // Set window's icon to the one we're about to create/update in the web app
98 // path. The icon cache will refresh on icon creation. 98 // path. The icon cache will refresh on icon creation.
99 base::FilePath web_app_path = web_app::GetWebAppDataDirectory( 99 base::FilePath web_app_path = web_app::GetWebAppDataDirectory(
100 shortcut_info.profile_path, shortcut_info.extension_id, 100 shortcut_info.profile_path, shortcut_info.extension_id,
101 shortcut_info.url); 101 shortcut_info.url);
102 base::FilePath icon_file = web_app_path 102 base::FilePath icon_file =
103 .Append(web_app::internals::GetSanitizedFileName(shortcut_info.title)) 103 web_app::internals::GetIconFilePath(web_app_path, shortcut_info.title);
104 .ReplaceExtension(FILE_PATH_LITERAL(".ico"));
105 104
106 content::BrowserThread::PostBlockingPoolTask( 105 content::BrowserThread::PostBlockingPoolTask(
107 FROM_HERE, 106 FROM_HERE,
108 base::Bind(&CreateIconAndSetRelaunchDetails, 107 base::Bind(&CreateIconAndSetRelaunchDetails,
109 web_app_path, icon_file, shortcut_info, hwnd)); 108 web_app_path, icon_file, shortcut_info, hwnd));
110 } 109 }
111 110
112 HWND ChromeNativeAppWindowViewsWin::GetNativeAppWindowHWND() const { 111 HWND ChromeNativeAppWindowViewsWin::GetNativeAppWindowHWND() const {
113 return views::HWNDForWidget(window()->GetTopLevelWidget()); 112 return views::HWNDForWidget(window()->GetTopLevelWidget());
114 } 113 }
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 link->GetCommandLine()->AppendSwitchASCII(switches::kInstallFromWebstore, 211 link->GetCommandLine()->AppendSwitchASCII(switches::kInstallFromWebstore,
213 extension->id()); 212 extension->id());
214 213
215 ShellLinkItemList items; 214 ShellLinkItemList items;
216 items.push_back(link); 215 items.push_back(link);
217 jumplist_updater.AddTasks(items); 216 jumplist_updater.AddTasks(items);
218 } 217 }
219 218
220 jumplist_updater.CommitUpdate(); 219 jumplist_updater.CommitUpdate();
221 } 220 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/web_applications/web_app_ui.cc » ('j') | chrome/browser/web_applications/web_app_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698