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

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

Issue 23880006: gtk: Allow building both the X11 and Gtk message-pumps for gtk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge Created 7 years, 3 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/base/x/events_x.cc ('k') | ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.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) 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_aurax11.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"
11 11
12 namespace ui { 12 namespace ui {
13 13
14 namespace { 14 namespace {
15 15
16 const char kChromeSelection[] = "CHROME_SELECTION"; 16 const char kChromeSelection[] = "CHROME_SELECTION";
17 17
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 selection_name_, 49 selection_name_,
50 target, 50 target,
51 property_to_set, 51 property_to_set,
52 x_window_, 52 x_window_,
53 CurrentTime); 53 CurrentTime);
54 54
55 // Now that we've thrown our message off to the X11 server, we block waiting 55 // Now that we've thrown our message off to the X11 server, we block waiting
56 // for a response. 56 // for a response.
57 base::MessageLoopForUI* loop = base::MessageLoopForUI::current(); 57 base::MessageLoopForUI* loop = base::MessageLoopForUI::current();
58 base::MessageLoop::ScopedNestableTaskAllower allow_nested(loop); 58 base::MessageLoop::ScopedNestableTaskAllower allow_nested(loop);
59 base::RunLoop run_loop(base::MessagePumpAuraX11::Current()); 59 base::RunLoop run_loop(base::MessagePumpX11::Current());
60 60
61 current_target_ = target; 61 current_target_ = target;
62 in_nested_loop_ = true; 62 in_nested_loop_ = true;
63 quit_closure_ = run_loop.QuitClosure(); 63 quit_closure_ = run_loop.QuitClosure();
64 run_loop.Run(); 64 run_loop.Run();
65 in_nested_loop_ = false; 65 in_nested_loop_ = false;
66 current_target_ = None; 66 current_target_ = None;
67 67
68 if (returned_property_ != property_to_set) 68 if (returned_property_ != property_to_set)
69 return false; 69 return false;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // I am assuming that if some other client sent us a message after we've 107 // I am assuming that if some other client sent us a message after we've
108 // asked for data, but it's malformed, we should just treat as if they sent 108 // asked for data, but it's malformed, we should just treat as if they sent
109 // us an error message. 109 // us an error message.
110 returned_property_ = None; 110 returned_property_ = None;
111 } 111 }
112 112
113 quit_closure_.Run(); 113 quit_closure_.Run();
114 } 114 }
115 115
116 } // namespace ui 116 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/x/events_x.cc ('k') | ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698