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