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

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

Issue 819223002: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 12 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/ui_base_switches_util.cc ('k') | ui/compositor/compositor.cc » ('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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 relaunch_command, 137 relaunch_command,
138 display_name, 138 display_name,
139 hwnd); 139 hwnd);
140 } 140 }
141 141
142 bool IsAeroGlassEnabled() { 142 bool IsAeroGlassEnabled() {
143 // For testing in Win8 (where it is not possible to disable composition) the 143 // For testing in Win8 (where it is not possible to disable composition) the
144 // user can specify this command line switch to mimic the behavior. In this 144 // user can specify this command line switch to mimic the behavior. In this
145 // mode, cross-HWND transparency is not supported and various types of 145 // mode, cross-HWND transparency is not supported and various types of
146 // widgets fallback to more simplified rendering behavior. 146 // widgets fallback to more simplified rendering behavior.
147 if (CommandLine::ForCurrentProcess()->HasSwitch( 147 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
148 switches::kDisableDwmComposition)) 148 switches::kDisableDwmComposition))
149 return false; 149 return false;
150 150
151 // Technically Aero glass works in Vista but we want to put XP and Vista 151 // Technically Aero glass works in Vista but we want to put XP and Vista
152 // at the same feature level. See bug 426573. 152 // at the same feature level. See bug 426573.
153 if (base::win::GetVersion() < base::win::VERSION_WIN7) 153 if (base::win::GetVersion() < base::win::VERSION_WIN7)
154 return false; 154 return false;
155 // If composition is not enabled, we behave like on XP. 155 // If composition is not enabled, we behave like on XP.
156 BOOL enabled = FALSE; 156 BOOL enabled = FALSE;
157 return SUCCEEDED(DwmIsCompositionEnabled(&enabled)) && enabled; 157 return SUCCEEDED(DwmIsCompositionEnabled(&enabled)) && enabled;
158 } 158 }
159 159
160 } // namespace win 160 } // namespace win
161 } // namespace ui 161 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/ui_base_switches_util.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698