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

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

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 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
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 <stddef.h> 7 #include <stddef.h>
8 #include <X11/keysym.h> 8 #include <X11/keysym.h>
9 #include <X11/Xlib.h> 9 #include <X11/Xlib.h>
10 #include <utility> 10 #include <utility>
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 CHECK(capture_client->GetGlobalCaptureWindow() == NULL); 152 CHECK(capture_client->GetGlobalCaptureWindow() == NULL);
153 grabbed_pointer_ = GrabPointer(cursor); 153 grabbed_pointer_ = GrabPointer(cursor);
154 if (!grabbed_pointer_) { 154 if (!grabbed_pointer_) {
155 XDestroyWindow(gfx::GetXDisplay(), grab_input_window_); 155 XDestroyWindow(gfx::GetXDisplay(), grab_input_window_);
156 return false; 156 return false;
157 } 157 }
158 } 158 }
159 159
160 GrabEscKey(); 160 GrabEscKey();
161 161
162 scoped_ptr<ui::ScopedEventDispatcher> old_dispatcher = 162 std::unique_ptr<ui::ScopedEventDispatcher> old_dispatcher =
163 std::move(nested_dispatcher_); 163 std::move(nested_dispatcher_);
164 nested_dispatcher_ = 164 nested_dispatcher_ =
165 ui::PlatformEventSource::GetInstance()->OverrideDispatcher(this); 165 ui::PlatformEventSource::GetInstance()->OverrideDispatcher(this);
166 166
167 // We are handling a mouse drag outside of the aura::Window system. We must 167 // We are handling a mouse drag outside of the aura::Window system. We must
168 // manually make aura think that the mouse button is pressed so that we don't 168 // manually make aura think that the mouse button is pressed so that we don't
169 // draw extraneous tooltips. 169 // draw extraneous tooltips.
170 aura::Env* env = aura::Env::GetInstance(); 170 aura::Env* env = aura::Env::GetInstance();
171 if (!env->IsMouseButtonDown()) { 171 if (!env->IsMouseButtonDown()) {
172 env->set_mouse_button_flags(ui::EF_LEFT_MOUSE_BUTTON); 172 env->set_mouse_button_flags(ui::EF_LEFT_MOUSE_BUTTON);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 DefaultRootWindow(display), 270 DefaultRootWindow(display),
271 -100, -100, 10, 10, 271 -100, -100, 10, 10,
272 0, CopyFromParent, InputOnly, CopyFromParent, 272 0, CopyFromParent, InputOnly, CopyFromParent,
273 attribute_mask, &swa); 273 attribute_mask, &swa);
274 XMapRaised(display, window); 274 XMapRaised(display, window);
275 ui::X11EventSource::GetInstance()->BlockUntilWindowMapped(window); 275 ui::X11EventSource::GetInstance()->BlockUntilWindowMapped(window);
276 return window; 276 return window;
277 } 277 }
278 278
279 } // namespace views 279 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/x11_whole_screen_move_loop.h ('k') | ui/views/widget/native_widget_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698