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

Side by Side Diff: ui/base/win/shell.cc

Issue 2828913003: Replace "nested message loop" with "nested run loop" in comments. (Closed)
Patch Set: rebase Created 3 years, 7 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
« no previous file with comments | « ui/base/clipboard/clipboard_aurax11.cc ('k') | ui/base/x/selection_requestor.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ui/base/win/shell.h" 5 #include "ui/base/win/shell.h"
6 6
7 #include <dwmapi.h> 7 #include <dwmapi.h>
8 #include <shlobj.h> // Must be before propkey. 8 #include <shlobj.h> // Must be before propkey.
9 #include <propkey.h> 9 #include <propkey.h>
10 #include <shellapi.h> 10 #include <shellapi.h>
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 base::win::ScopedComPtr<IPropertyStore> pps; 106 base::win::ScopedComPtr<IPropertyStore> pps;
107 if (FAILED(SHGetPropertyStoreForWindow(hwnd, 107 if (FAILED(SHGetPropertyStoreForWindow(hwnd,
108 IID_PPV_ARGS(pps.Receive())))) 108 IID_PPV_ARGS(pps.Receive()))))
109 return false; 109 return false;
110 110
111 return base::win::SetBooleanValueForPropertyStore( 111 return base::win::SetBooleanValueForPropertyStore(
112 pps.Get(), PKEY_AppUserModel_PreventPinning, true); 112 pps.Get(), PKEY_AppUserModel_PreventPinning, true);
113 } 113 }
114 114
115 // TODO(calamity): investigate moving this out of the UI thread as COM 115 // TODO(calamity): investigate moving this out of the UI thread as COM
116 // operations may spawn nested message loops which can cause issues. 116 // operations may spawn nested run loops which can cause issues.
117 void SetAppDetailsForWindow(const base::string16& app_id, 117 void SetAppDetailsForWindow(const base::string16& app_id,
118 const base::FilePath& app_icon_path, 118 const base::FilePath& app_icon_path,
119 int app_icon_index, 119 int app_icon_index,
120 const base::string16& relaunch_command, 120 const base::string16& relaunch_command,
121 const base::string16& relaunch_display_name, 121 const base::string16& relaunch_display_name,
122 HWND hwnd) { 122 HWND hwnd) {
123 DCHECK(hwnd); 123 DCHECK(hwnd);
124 124
125 // This functionality is only available on Win7+. 125 // This functionality is only available on Win7+.
126 if (base::win::GetVersion() < base::win::VERSION_WIN7) 126 if (base::win::GetVersion() < base::win::VERSION_WIN7)
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 // at the same feature level. See bug 426573. 212 // at the same feature level. See bug 426573.
213 if (base::win::GetVersion() < base::win::VERSION_WIN7) 213 if (base::win::GetVersion() < base::win::VERSION_WIN7)
214 return false; 214 return false;
215 // If composition is not enabled, we behave like on XP. 215 // If composition is not enabled, we behave like on XP.
216 BOOL enabled = FALSE; 216 BOOL enabled = FALSE;
217 return SUCCEEDED(DwmIsCompositionEnabled(&enabled)) && enabled; 217 return SUCCEEDED(DwmIsCompositionEnabled(&enabled)) && enabled;
218 } 218 }
219 219
220 } // namespace win 220 } // namespace win
221 } // namespace ui 221 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/clipboard/clipboard_aurax11.cc ('k') | ui/base/x/selection_requestor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698