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

Side by Side Diff: ui/base/x/selection_requestor.cc

Issue 154203002: Remove unnecessary uses of aura::Env::GetDispatcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 10 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/base/x/selection_requestor.h" 5 #include "ui/base/x/selection_requestor.h"
6 6
7 #include "base/message_loop/message_pump_x11.h" 7 #include "base/message_loop/message_pump_x11.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "ui/base/x/selection_utils.h" 9 #include "ui/base/x/selection_utils.h"
10 #include "ui/base/x/x11_util.h" 10 #include "ui/base/x/x11_util.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 selection_name_, 46 selection_name_,
47 target, 47 target,
48 property_to_set, 48 property_to_set,
49 x_window_, 49 x_window_,
50 CurrentTime); 50 CurrentTime);
51 51
52 // Now that we've thrown our message off to the X11 server, we block waiting 52 // Now that we've thrown our message off to the X11 server, we block waiting
53 // for a response. 53 // for a response.
54 base::MessageLoopForUI* loop = base::MessageLoopForUI::current(); 54 base::MessageLoopForUI* loop = base::MessageLoopForUI::current();
55 base::MessageLoop::ScopedNestableTaskAllower allow_nested(loop); 55 base::MessageLoop::ScopedNestableTaskAllower allow_nested(loop);
56 base::RunLoop run_loop(base::MessagePumpX11::Current()); 56 base::RunLoop run_loop;
57 57
58 PendingRequest pending_request(target, run_loop.QuitClosure()); 58 PendingRequest pending_request(target, run_loop.QuitClosure());
59 pending_requests_.push_back(&pending_request); 59 pending_requests_.push_back(&pending_request);
60 run_loop.Run(); 60 run_loop.Run();
61 DCHECK(!pending_requests_.empty()); 61 DCHECK(!pending_requests_.empty());
62 DCHECK_EQ(&pending_request, pending_requests_.back()); 62 DCHECK_EQ(&pending_request, pending_requests_.back());
63 pending_requests_.pop_back(); 63 pending_requests_.pop_back();
64 64
65 if (pending_request.returned_property != property_to_set) 65 if (pending_request.returned_property != property_to_set)
66 return false; 66 return false;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 : target(target), 124 : target(target),
125 quit_closure(quit_closure), 125 quit_closure(quit_closure),
126 returned_property(None), 126 returned_property(None),
127 returned(false) { 127 returned(false) {
128 } 128 }
129 129
130 SelectionRequestor::PendingRequest::~PendingRequest() { 130 SelectionRequestor::PendingRequest::~PendingRequest() {
131 } 131 }
132 132
133 } // namespace ui 133 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698