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

Side by Side Diff: ui/aura/test/ui_controls_factory_aurax11.cc

Issue 2914103002: Remove usages of XInternAtom (Closed)
Patch Set: Address sadrul and sergeyu comments Created 3 years, 6 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
« no previous file with comments | « chrome/browser/media/webrtc/window_icon_util_x11.cc ('k') | ui/aura/window_tree_host_x11.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 <X11/keysym.h> 5 #include <X11/keysym.h>
6 #include <X11/Xlib.h> 6 #include <X11/Xlib.h>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 20 matching lines...) Expand all
31 using ui_controls::MouseButton; 31 using ui_controls::MouseButton;
32 using ui_controls::RIGHT; 32 using ui_controls::RIGHT;
33 using ui_controls::UIControlsAura; 33 using ui_controls::UIControlsAura;
34 using ui_controls::UP; 34 using ui_controls::UP;
35 35
36 // Mask of the buttons currently down. 36 // Mask of the buttons currently down.
37 unsigned button_down_mask = 0; 37 unsigned button_down_mask = 0;
38 38
39 // Returns atom that indidates that the XEvent is marker event. 39 // Returns atom that indidates that the XEvent is marker event.
40 Atom MarkerEventAtom() { 40 Atom MarkerEventAtom() {
41 return XInternAtom(gfx::GetXDisplay(), "marker_event", False); 41 return ui::GetAtom("marker_event");
42 } 42 }
43 43
44 // Returns true when the event is a marker event. 44 // Returns true when the event is a marker event.
45 bool Matcher(const base::NativeEvent& event) { 45 bool Matcher(const base::NativeEvent& event) {
46 return event->xany.type == ClientMessage && 46 return event->xany.type == ClientMessage &&
47 event->xclient.message_type == MarkerEventAtom(); 47 event->xclient.message_type == MarkerEventAtom();
48 } 48 }
49 49
50 class UIControlsX11 : public UIControlsAura { 50 class UIControlsX11 : public UIControlsAura {
51 public: 51 public:
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 }; 224 };
225 225
226 } // namespace 226 } // namespace
227 227
228 UIControlsAura* CreateUIControlsAura(WindowTreeHost* host) { 228 UIControlsAura* CreateUIControlsAura(WindowTreeHost* host) {
229 return new UIControlsX11(host); 229 return new UIControlsX11(host);
230 } 230 }
231 231
232 } // namespace test 232 } // namespace test
233 } // namespace aura 233 } // namespace aura
OLDNEW
« no previous file with comments | « chrome/browser/media/webrtc/window_icon_util_x11.cc ('k') | ui/aura/window_tree_host_x11.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698