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

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

Issue 10828133: Desktop Aura: Allow tab drags out of window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 8 years, 4 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_win.h ('k') | ui/views/widget/widget.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/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 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1170 ::SetFocus(native_view); 1170 ::SetFocus(native_view);
1171 } 1171 }
1172 1172
1173 gfx::Rect NativeWidgetWin::GetWorkAreaBoundsInScreen() const { 1173 gfx::Rect NativeWidgetWin::GetWorkAreaBoundsInScreen() const {
1174 return gfx::Screen::GetDisplayNearestWindow(GetNativeView()).work_area(); 1174 return gfx::Screen::GetDisplayNearestWindow(GetNativeView()).work_area();
1175 } 1175 }
1176 1176
1177 void NativeWidgetWin::SetInactiveRenderingDisabled(bool value) { 1177 void NativeWidgetWin::SetInactiveRenderingDisabled(bool value) {
1178 } 1178 }
1179 1179
1180 Widget::MoveLoopResult NativeWidgetWin::RunMoveLoop() { 1180 Widget::MoveLoopResult NativeWidgetWin::RunMoveLoop(
1181 const gfx::Point& drag_offset) {
1181 ReleaseCapture(); 1182 ReleaseCapture();
1182 MoveLoopMouseWatcher watcher(this); 1183 MoveLoopMouseWatcher watcher(this);
1183 SendMessage(hwnd(), WM_SYSCOMMAND, SC_MOVE | 0x0002, GetMessagePos()); 1184 SendMessage(hwnd(), WM_SYSCOMMAND, SC_MOVE | 0x0002, GetMessagePos());
1184 // Windows doesn't appear to offer a way to determine whether the user 1185 // Windows doesn't appear to offer a way to determine whether the user
1185 // canceled the move or not. We assume if the user released the mouse it was 1186 // canceled the move or not. We assume if the user released the mouse it was
1186 // successful. 1187 // successful.
1187 return watcher.got_mouse_up() ? Widget::MOVE_LOOP_SUCCESSFUL : 1188 return watcher.got_mouse_up() ? Widget::MOVE_LOOP_SUCCESSFUL :
1188 Widget::MOVE_LOOP_CANCELED; 1189 Widget::MOVE_LOOP_CANCELED;
1189 } 1190 }
1190 1191
(...skipping 1616 matching lines...) Expand 10 before | Expand all | Expand 10 after
2807 // static 2808 // static
2808 bool NativeWidgetPrivate::IsTouchDown() { 2809 bool NativeWidgetPrivate::IsTouchDown() {
2809 // This currently isn't necessary because we're not generating touch events on 2810 // This currently isn't necessary because we're not generating touch events on
2810 // windows. When we do, this will need to be updated. 2811 // windows. When we do, this will need to be updated.
2811 return false; 2812 return false;
2812 } 2813 }
2813 2814
2814 } // namespace internal 2815 } // namespace internal
2815 2816
2816 } // namespace views 2817 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_win.h ('k') | ui/views/widget/widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698