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

Side by Side Diff: views/window/window_win.cc

Issue 3823002: Move windows version-related stuff out of base/win_util and into base/win/win... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "views/window/window_win.h" 5 #include "views/window/window_win.h"
6 6
7 #include <dwmapi.h> 7 #include <dwmapi.h>
8 #include <shellapi.h> 8 #include <shellapi.h>
9 9
10 #include "app/keyboard_code_conversion_win.h" 10 #include "app/keyboard_code_conversion_win.h"
11 #include "app/theme_provider.h" 11 #include "app/theme_provider.h"
12 #include "app/win_util.h" 12 #include "app/win_util.h"
13 #include "base/i18n/rtl.h" 13 #include "base/i18n/rtl.h"
14 #include "base/win_util.h" 14 #include "base/win_util.h"
15 #include "base/win/windows_version.h"
15 #include "gfx/canvas_skia_paint.h" 16 #include "gfx/canvas_skia_paint.h"
16 #include "gfx/font.h" 17 #include "gfx/font.h"
17 #include "gfx/icon_util.h" 18 #include "gfx/icon_util.h"
18 #include "gfx/path.h" 19 #include "gfx/path.h"
19 #include "views/accessibility/view_accessibility.h" 20 #include "views/accessibility/view_accessibility.h"
20 #include "views/widget/root_view.h" 21 #include "views/widget/root_view.h"
21 #include "views/window/client_view.h" 22 #include "views/window/client_view.h"
22 #include "views/window/custom_frame_view.h" 23 #include "views/window/custom_frame_view.h"
23 #include "views/window/native_frame_view.h" 24 #include "views/window/native_frame_view.h"
24 #include "views/window/non_client_view.h" 25 #include "views/window/non_client_view.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 } 187 }
187 188
188 namespace { 189 namespace {
189 static BOOL CALLBACK SendDwmCompositionChanged(HWND window, LPARAM param) { 190 static BOOL CALLBACK SendDwmCompositionChanged(HWND window, LPARAM param) {
190 SendMessage(window, WM_DWMCOMPOSITIONCHANGED, 0, 0); 191 SendMessage(window, WM_DWMCOMPOSITIONCHANGED, 0, 0);
191 return TRUE; 192 return TRUE;
192 } 193 }
193 } // namespace 194 } // namespace
194 195
195 void WindowWin::FrameTypeChanged() { 196 void WindowWin::FrameTypeChanged() {
196 if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA) { 197 if (base::win::GetVersion() >= base::win::VERSION_VISTA) {
197 // We need to toggle the rendering policy of the DWM/glass frame as we 198 // We need to toggle the rendering policy of the DWM/glass frame as we
198 // change from opaque to glass. "Non client rendering enabled" means that 199 // change from opaque to glass. "Non client rendering enabled" means that
199 // the DWM's glass non-client rendering is enabled, which is why 200 // the DWM's glass non-client rendering is enabled, which is why
200 // DWMNCRP_ENABLED is used for the native frame case. _DISABLED means the 201 // DWMNCRP_ENABLED is used for the native frame case. _DISABLED means the
201 // DWM doesn't render glass, and so is used in the custom frame case. 202 // DWM doesn't render glass, and so is used in the custom frame case.
202 DWMNCRENDERINGPOLICY policy = 203 DWMNCRENDERINGPOLICY policy =
203 non_client_view_->UseNativeFrame() ? DWMNCRP_ENABLED 204 non_client_view_->UseNativeFrame() ? DWMNCRP_ENABLED
204 : DWMNCRP_DISABLED; 205 : DWMNCRP_DISABLED;
205 DwmSetWindowAttribute(GetNativeView(), DWMWA_NCRENDERING_POLICY, 206 DwmSetWindowAttribute(GetNativeView(), DWMWA_NCRENDERING_POLICY,
206 &policy, sizeof(DWMNCRENDERINGPOLICY)); 207 &policy, sizeof(DWMNCRENDERINGPOLICY));
(...skipping 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after
1523 Window::CloseSecondaryWidget(root_view->GetWidget()); 1524 Window::CloseSecondaryWidget(root_view->GetWidget());
1524 return TRUE; 1525 return TRUE;
1525 } 1526 }
1526 } // namespace 1527 } // namespace
1527 1528
1528 void Window::CloseAllSecondaryWindows() { 1529 void Window::CloseAllSecondaryWindows() {
1529 EnumThreadWindows(GetCurrentThreadId(), WindowCallbackProc, 0); 1530 EnumThreadWindows(GetCurrentThreadId(), WindowCallbackProc, 0);
1530 } 1531 }
1531 1532
1532 } // namespace views 1533 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698