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

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

Issue 9960042: Refactor screen/monitor so that gfx::Screen returns monitor object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 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 | Annotate | Revision Log
« no previous file with comments | « ui/views/widget/native_widget_aura_unittest.cc ('k') | ui/views/widget/tooltip_manager_aura.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/native_widget_win.h" 5 #include "ui/views/widget/native_widget_win.h"
6 6
7 #include <dwmapi.h> 7 #include <dwmapi.h>
8 #include <shellapi.h> 8 #include <shellapi.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 ::SetFocus(GetNativeView()); 1115 ::SetFocus(GetNativeView());
1116 } 1116 }
1117 1117
1118 void NativeWidgetWin::FocusNativeView(gfx::NativeView native_view) { 1118 void NativeWidgetWin::FocusNativeView(gfx::NativeView native_view) {
1119 // Only reset focus if hwnd is not already focused. 1119 // Only reset focus if hwnd is not already focused.
1120 if (native_view && ::GetFocus() != native_view) 1120 if (native_view && ::GetFocus() != native_view)
1121 ::SetFocus(native_view); 1121 ::SetFocus(native_view);
1122 } 1122 }
1123 1123
1124 gfx::Rect NativeWidgetWin::GetWorkAreaBoundsInScreen() const { 1124 gfx::Rect NativeWidgetWin::GetWorkAreaBoundsInScreen() const {
1125 return gfx::Screen::GetMonitorWorkAreaNearestWindow(GetNativeView()); 1125 return gfx::Screen::GetMonitorNearestWindow(GetNativeView()).work_area();
1126 } 1126 }
1127 1127
1128 void NativeWidgetWin::SetInactiveRenderingDisabled(bool value) { 1128 void NativeWidgetWin::SetInactiveRenderingDisabled(bool value) {
1129 } 1129 }
1130 1130
1131 Widget::MoveLoopResult NativeWidgetWin::RunMoveLoop() { 1131 Widget::MoveLoopResult NativeWidgetWin::RunMoveLoop() {
1132 ReleaseCapture(); 1132 ReleaseCapture();
1133 MoveLoopMouseWatcher watcher(this); 1133 MoveLoopMouseWatcher watcher(this);
1134 SendMessage(hwnd(), WM_SYSCOMMAND, SC_MOVE | 0x0002, GetMessagePos()); 1134 SendMessage(hwnd(), WM_SYSCOMMAND, SC_MOVE | 0x0002, GetMessagePos());
1135 // Windows doesn't appear to offer a way to determine whether the user 1135 // Windows doesn't appear to offer a way to determine whether the user
(...skipping 1510 matching lines...) Expand 10 before | Expand all | Expand 10 after
2646 return (GetKeyState(VK_LBUTTON) & 0x80) || 2646 return (GetKeyState(VK_LBUTTON) & 0x80) ||
2647 (GetKeyState(VK_RBUTTON) & 0x80) || 2647 (GetKeyState(VK_RBUTTON) & 0x80) ||
2648 (GetKeyState(VK_MBUTTON) & 0x80) || 2648 (GetKeyState(VK_MBUTTON) & 0x80) ||
2649 (GetKeyState(VK_XBUTTON1) & 0x80) || 2649 (GetKeyState(VK_XBUTTON1) & 0x80) ||
2650 (GetKeyState(VK_XBUTTON2) & 0x80); 2650 (GetKeyState(VK_XBUTTON2) & 0x80);
2651 } 2651 }
2652 2652
2653 } // namespace internal 2653 } // namespace internal
2654 2654
2655 } // namespace views 2655 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_aura_unittest.cc ('k') | ui/views/widget/tooltip_manager_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698