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

Side by Side Diff: ui/aura/window_tree_host_x11.h

Issue 1155013005: Refactoring the ownership of ui::InputMethod. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed. Created 5 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef UI_AURA_WINDOW_TREE_HOST_X11_H_ 5 #ifndef UI_AURA_WINDOW_TREE_HOST_X11_H_
6 #define UI_AURA_WINDOW_TREE_HOST_X11_H_ 6 #define UI_AURA_WINDOW_TREE_HOST_X11_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "ui/aura/aura_export.h" 9 #include "ui/aura/aura_export.h"
10 #include "ui/aura/window_tree_host.h" 10 #include "ui/aura/window_tree_host.h"
(...skipping 12 matching lines...) Expand all
23 class MouseEvent; 23 class MouseEvent;
24 } 24 }
25 25
26 namespace aura { 26 namespace aura {
27 27
28 namespace internal { 28 namespace internal {
29 class TouchEventCalibrate; 29 class TouchEventCalibrate;
30 } 30 }
31 31
32 class AURA_EXPORT WindowTreeHostX11 : public WindowTreeHost, 32 class AURA_EXPORT WindowTreeHostX11 : public WindowTreeHost,
33 public ui::EventSource,
34 public ui::PlatformEventDispatcher { 33 public ui::PlatformEventDispatcher {
35 34
36 public: 35 public:
37 explicit WindowTreeHostX11(const gfx::Rect& bounds); 36 explicit WindowTreeHostX11(const gfx::Rect& bounds);
38 ~WindowTreeHostX11() override; 37 ~WindowTreeHostX11() override;
39 38
40 // ui::PlatformEventDispatcher: 39 // ui::PlatformEventDispatcher:
41 bool CanDispatchEvent(const ui::PlatformEvent& event) override; 40 bool CanDispatchEvent(const ui::PlatformEvent& event) override;
42 uint32_t DispatchEvent(const ui::PlatformEvent& event) override; 41 uint32_t DispatchEvent(const ui::PlatformEvent& event) override;
43 42
44 // WindowTreeHost: 43 // WindowTreeHost:
45 ui::EventSource* GetEventSource() override; 44 ui::EventSource* GetEventSource() override;
46 gfx::AcceleratedWidget GetAcceleratedWidget() override; 45 gfx::AcceleratedWidget GetAcceleratedWidget() override;
47 void Show() override; 46 void Show() override;
48 void Hide() override; 47 void Hide() override;
49 gfx::Rect GetBounds() const override; 48 gfx::Rect GetBounds() const override;
50 void SetBounds(const gfx::Rect& bounds) override; 49 void SetBounds(const gfx::Rect& bounds) override;
51 gfx::Point GetLocationOnNativeScreen() const override; 50 gfx::Point GetLocationOnNativeScreen() const override;
52 void SetCapture() override; 51 void SetCapture() override;
53 void ReleaseCapture() override; 52 void ReleaseCapture() override;
54 void SetCursorNative(gfx::NativeCursor cursor_type) override; 53 void SetCursorNative(gfx::NativeCursor cursor_type) override;
55 void MoveCursorToNative(const gfx::Point& location) override; 54 void MoveCursorToNative(const gfx::Point& location) override;
56 void OnCursorVisibilityChangedNative(bool show) override; 55 void OnCursorVisibilityChangedNative(bool show) override;
57 56
58 // ui::EventSource overrides.
59 ui::EventProcessor* GetEventProcessor() override;
60
61 protected: 57 protected:
62 // Called when X Configure Notify event is recevied. 58 // Called when X Configure Notify event is recevied.
63 virtual void OnConfigureNotify(); 59 virtual void OnConfigureNotify();
64 60
65 // Translates the native mouse location into screen coordinates and 61 // Translates the native mouse location into screen coordinates and
66 // dispatches the event via WindowEventDispatcher. 62 // dispatches the event via WindowEventDispatcher.
67 virtual void TranslateAndDispatchLocatedEvent(ui::LocatedEvent* event); 63 virtual void TranslateAndDispatchLocatedEvent(ui::LocatedEvent* event);
68 64
69 ::Window x_root_window() { return x_root_window_; } 65 ::Window x_root_window() { return x_root_window_; }
70 XDisplay* xdisplay() { return xdisplay_; } 66 XDisplay* xdisplay() { return xdisplay_; }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 namespace test { 103 namespace test {
108 104
109 // Set the default value of the override redirect flag used to 105 // Set the default value of the override redirect flag used to
110 // create a X window for WindowTreeHostX11. 106 // create a X window for WindowTreeHostX11.
111 AURA_EXPORT void SetUseOverrideRedirectWindowByDefault(bool override_redirect); 107 AURA_EXPORT void SetUseOverrideRedirectWindowByDefault(bool override_redirect);
112 108
113 } // namespace test 109 } // namespace test
114 } // namespace aura 110 } // namespace aura
115 111
116 #endif // UI_AURA_WINDOW_TREE_HOST_X11_H_ 112 #endif // UI_AURA_WINDOW_TREE_HOST_X11_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698