| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |