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

Side by Side Diff: ui/views/test/ui_controls_factory_desktop_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 | « ui/platform_window/x11/x11_window_base.cc ('k') | ui/views/test/x11_property_change_waiter.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 // X macro fail. 8 // X macro fail.
9 #if defined(RootWindow) 9 #if defined(RootWindow)
10 #undef RootWindow 10 #undef RootWindow
(...skipping 27 matching lines...) Expand all
38 using ui_controls::MouseButton; 38 using ui_controls::MouseButton;
39 using ui_controls::RIGHT; 39 using ui_controls::RIGHT;
40 using ui_controls::UIControlsAura; 40 using ui_controls::UIControlsAura;
41 using ui_controls::UP; 41 using ui_controls::UP;
42 42
43 // Mask of the buttons currently down. 43 // Mask of the buttons currently down.
44 unsigned button_down_mask = 0; 44 unsigned button_down_mask = 0;
45 45
46 // Returns atom that indidates that the XEvent is marker event. 46 // Returns atom that indidates that the XEvent is marker event.
47 Atom MarkerEventAtom() { 47 Atom MarkerEventAtom() {
48 return XInternAtom(gfx::GetXDisplay(), "marker_event", False); 48 return ui::GetAtom("marker_event");
49 } 49 }
50 50
51 // Returns true when the event is a marker event. 51 // Returns true when the event is a marker event.
52 bool Matcher(const base::NativeEvent& event) { 52 bool Matcher(const base::NativeEvent& event) {
53 return event->xany.type == ClientMessage && 53 return event->xany.type == ClientMessage &&
54 event->xclient.message_type == MarkerEventAtom(); 54 event->xclient.message_type == MarkerEventAtom();
55 } 55 }
56 56
57 class UIControlsDesktopX11 : public UIControlsAura { 57 class UIControlsDesktopX11 : public UIControlsAura {
58 public: 58 public:
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 285
286 UIControlsAura* CreateUIControlsDesktopAura() { 286 UIControlsAura* CreateUIControlsDesktopAura() {
287 // The constructor of UIControlsDesktopX11 needs X11 connection to be 287 // The constructor of UIControlsDesktopX11 needs X11 connection to be
288 // initialized. 288 // initialized.
289 gfx::InitializeThreadedX11(); 289 gfx::InitializeThreadedX11();
290 return new UIControlsDesktopX11(); 290 return new UIControlsDesktopX11();
291 } 291 }
292 292
293 } // namespace test 293 } // namespace test
294 } // namespace views 294 } // namespace views
OLDNEW
« no previous file with comments | « ui/platform_window/x11/x11_window_base.cc ('k') | ui/views/test/x11_property_change_waiter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698