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

Side by Side Diff: ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc

Issue 135563004: Nukes MessageLoop::Dispatcher (2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 11 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) 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/desktop_aura/x11_whole_screen_move_loop.h" 5 #include "ui/views/widget/desktop_aura/x11_whole_screen_move_loop.h"
6 6
7 #include <X11/Xlib.h> 7 #include <X11/Xlib.h>
8 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. 8 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class.
9 #undef RootWindow 9 #undef RootWindow
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 X11WholeScreenMoveLoopDelegate* delegate) 50 X11WholeScreenMoveLoopDelegate* delegate)
51 : delegate_(delegate), 51 : delegate_(delegate),
52 in_move_loop_(false), 52 in_move_loop_(false),
53 should_reset_mouse_flags_(false), 53 should_reset_mouse_flags_(false),
54 grab_input_window_(None) { 54 grab_input_window_(None) {
55 } 55 }
56 56
57 X11WholeScreenMoveLoop::~X11WholeScreenMoveLoop() {} 57 X11WholeScreenMoveLoop::~X11WholeScreenMoveLoop() {}
58 58
59 //////////////////////////////////////////////////////////////////////////////// 59 ////////////////////////////////////////////////////////////////////////////////
60 // DesktopWindowTreeHostLinux, MessageLoop::Dispatcher implementation: 60 // DesktopWindowTreeHostLinux, MessagePumpDispatcher implementation:
61 61
62 bool X11WholeScreenMoveLoop::Dispatch(const base::NativeEvent& event) { 62 bool X11WholeScreenMoveLoop::Dispatch(const base::NativeEvent& event) {
63 XEvent* xev = event; 63 XEvent* xev = event;
64 64
65 // Note: the escape key is handled in the tab drag controller, which has 65 // Note: the escape key is handled in the tab drag controller, which has
66 // keyboard focus even though we took pointer grab. 66 // keyboard focus even though we took pointer grab.
67 switch (xev->type) { 67 switch (xev->type) {
68 case MotionNotify: { 68 case MotionNotify: {
69 if (drag_widget_.get()) { 69 if (drag_widget_.get()) {
70 gfx::Screen* screen = gfx::Screen::GetNativeScreen(); 70 gfx::Screen* screen = gfx::Screen::GetNativeScreen();
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 image->SetBounds(0, 0, drag_image_.width(), drag_image_.height()); 236 image->SetBounds(0, 0, drag_image_.width(), drag_image_.height());
237 widget->SetContentsView(image); 237 widget->SetContentsView(image);
238 238
239 widget->Show(); 239 widget->Show();
240 widget->GetNativeWindow()->layer()->SetFillsBoundsOpaquely(false); 240 widget->GetNativeWindow()->layer()->SetFillsBoundsOpaquely(false);
241 241
242 drag_widget_.reset(widget); 242 drag_widget_.reset(widget);
243 } 243 }
244 244
245 } // namespace views 245 } // namespace views
OLDNEW
« base/run_loop.h ('K') | « ui/views/widget/desktop_aura/x11_whole_screen_move_loop.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698