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

Side by Side Diff: ui/views/widget/widget_hwnd_utils.cc

Issue 290553002: Refactor menu dependency on aura/wm SetShadowType (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename enum Created 6 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 | Annotate | Revision Log
« no previous file with comments | « ui/views/widget/widget.cc ('k') | ui/views/window/dialog_delegate.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/views/widget/widget_hwnd_utils.h" 5 #include "ui/views/widget/widget_hwnd_utils.h"
6 6
7 #include <dwmapi.h> 7 #include <dwmapi.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/win/windows_version.h" 10 #include "base/win/windows_version.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // 2- The window must have WS_EX_COMPOSITED in the extended style. 59 // 2- The window must have WS_EX_COMPOSITED in the extended style.
60 // 3- The window must have WS_POPUP in its style. 60 // 3- The window must have WS_POPUP in its style.
61 // 4- The windows must not have WM_SIZEBOX, WS_THICKFRAME or WS_CAPTION in its 61 // 4- The windows must not have WM_SIZEBOX, WS_THICKFRAME or WS_CAPTION in its
62 // style. 62 // style.
63 // 5- When the window is created but before it is presented, call 63 // 5- When the window is created but before it is presented, call
64 // DwmExtendFrameIntoClientArea passing -1 as the margins. 64 // DwmExtendFrameIntoClientArea passing -1 as the margins.
65 if (params.opacity == Widget::InitParams::TRANSLUCENT_WINDOW) { 65 if (params.opacity == Widget::InitParams::TRANSLUCENT_WINDOW) {
66 if (ui::win::IsAeroGlassEnabled()) 66 if (ui::win::IsAeroGlassEnabled())
67 *ex_style |= WS_EX_COMPOSITED; 67 *ex_style |= WS_EX_COMPOSITED;
68 } 68 }
69 if (params.has_dropshadow) { 69 if (params.shadow_type == Widget::InitParams::SHADOW_TYPE_DROP) {
70 *class_style |= (base::win::GetVersion() < base::win::VERSION_XP) ? 70 *class_style |= (base::win::GetVersion() < base::win::VERSION_XP) ?
71 0 : CS_DROPSHADOW; 71 0 : CS_DROPSHADOW;
72 } 72 }
73 73
74 // Set type-dependent style attributes. 74 // Set type-dependent style attributes.
75 switch (params.type) { 75 switch (params.type) {
76 case Widget::InitParams::TYPE_PANEL: 76 case Widget::InitParams::TYPE_PANEL:
77 *ex_style |= WS_EX_TOPMOST; 77 *ex_style |= WS_EX_TOPMOST;
78 if (params.remove_standard_frame) { 78 if (params.remove_standard_frame) {
79 *style |= WS_POPUP; 79 *style |= WS_POPUP;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 DWORD class_style = 0; 153 DWORD class_style = 0;
154 CalculateWindowStylesFromInitParams(params, widget_delegate, 154 CalculateWindowStylesFromInitParams(params, widget_delegate,
155 native_widget_delegate, &style, &ex_style, 155 native_widget_delegate, &style, &ex_style,
156 &class_style); 156 &class_style);
157 handler->set_initial_class_style(class_style); 157 handler->set_initial_class_style(class_style);
158 handler->set_window_style(handler->window_style() | style); 158 handler->set_window_style(handler->window_style() | style);
159 handler->set_window_ex_style(handler->window_ex_style() | ex_style); 159 handler->set_window_ex_style(handler->window_ex_style() | ex_style);
160 } 160 }
161 161
162 } // namespace views 162 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/widget.cc ('k') | ui/views/window/dialog_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698