OLD | NEW |
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_REMOTE_WINDOW_TREE_HOST_WIN_H_ | 5 #ifndef UI_AURA_REMOTE_WINDOW_TREE_HOST_WIN_H_ |
6 #define UI_AURA_REMOTE_WINDOW_TREE_HOST_WIN_H_ | 6 #define UI_AURA_REMOTE_WINDOW_TREE_HOST_WIN_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 class Sender; | 33 class Sender; |
34 } | 34 } |
35 | 35 |
36 namespace aura { | 36 namespace aura { |
37 | 37 |
38 // WindowTreeHost implementaton that receives events from a different | 38 // WindowTreeHost implementaton that receives events from a different |
39 // process. In the case of Windows this is the Windows 8 (aka Metro) | 39 // process. In the case of Windows this is the Windows 8 (aka Metro) |
40 // frontend process, which forwards input events to this class. | 40 // frontend process, which forwards input events to this class. |
41 class AURA_EXPORT RemoteWindowTreeHostWin | 41 class AURA_EXPORT RemoteWindowTreeHostWin |
42 : public WindowTreeHost, | 42 : public WindowTreeHost, |
43 public ui::EventSource, | |
44 public ui::internal::RemoteInputMethodDelegateWin { | 43 public ui::internal::RemoteInputMethodDelegateWin { |
45 public: | 44 public: |
46 // Returns the current RemoteWindowTreeHostWin. This does *not* create a | 45 // Returns the current RemoteWindowTreeHostWin. This does *not* create a |
47 // RemoteWindowTreeHostWin. | 46 // RemoteWindowTreeHostWin. |
48 static RemoteWindowTreeHostWin* Instance(); | 47 static RemoteWindowTreeHostWin* Instance(); |
49 | 48 |
50 // Returns true if there is a RemoteWindowTreeHostWin and it has a valid | 49 // Returns true if there is a RemoteWindowTreeHostWin and it has a valid |
51 // HWND. A return value of false typically indicates we're not in metro mode. | 50 // HWND. A return value of false typically indicates we're not in metro mode. |
52 static bool IsValid(); | 51 static bool IsValid(); |
53 | 52 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 void HideImpl() override; | 121 void HideImpl() override; |
123 gfx::Rect GetBounds() const override; | 122 gfx::Rect GetBounds() const override; |
124 void SetBounds(const gfx::Rect& bounds) override; | 123 void SetBounds(const gfx::Rect& bounds) override; |
125 gfx::Point GetLocationOnNativeScreen() const override; | 124 gfx::Point GetLocationOnNativeScreen() const override; |
126 void SetCapture() override; | 125 void SetCapture() override; |
127 void ReleaseCapture() override; | 126 void ReleaseCapture() override; |
128 void SetCursorNative(gfx::NativeCursor cursor) override; | 127 void SetCursorNative(gfx::NativeCursor cursor) override; |
129 void MoveCursorToNative(const gfx::Point& location) override; | 128 void MoveCursorToNative(const gfx::Point& location) override; |
130 void OnCursorVisibilityChangedNative(bool show) override; | 129 void OnCursorVisibilityChangedNative(bool show) override; |
131 | 130 |
132 // ui::EventSource: | |
133 ui::EventProcessor* GetEventProcessor() override; | |
134 | |
135 // ui::internal::RemoteInputMethodDelegateWin overrides: | 131 // ui::internal::RemoteInputMethodDelegateWin overrides: |
136 void CancelComposition() override; | 132 void CancelComposition() override; |
137 void OnTextInputClientUpdated( | 133 void OnTextInputClientUpdated( |
138 const std::vector<int32>& input_scopes, | 134 const std::vector<int32>& input_scopes, |
139 const std::vector<gfx::Rect>& composition_character_bounds) override; | 135 const std::vector<gfx::Rect>& composition_character_bounds) override; |
140 | 136 |
141 // Helper function to dispatch a keyboard message to the desired target. | 137 // Helper function to dispatch a keyboard message to the desired target. |
142 // The default target is the WindowEventDispatcher. For nested message loop | 138 // The default target is the WindowEventDispatcher. For nested message loop |
143 // invocations we post a synthetic keyboard message directly into the message | 139 // invocations we post a synthetic keyboard message directly into the message |
144 // loop. The dispatcher for the nested loop would then decide how this | 140 // loop. The dispatcher for the nested loop would then decide how this |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 | 179 |
184 // Current size of this root window. | 180 // Current size of this root window. |
185 gfx::Size window_size_; | 181 gfx::Size window_size_; |
186 | 182 |
187 DISALLOW_COPY_AND_ASSIGN(RemoteWindowTreeHostWin); | 183 DISALLOW_COPY_AND_ASSIGN(RemoteWindowTreeHostWin); |
188 }; | 184 }; |
189 | 185 |
190 } // namespace aura | 186 } // namespace aura |
191 | 187 |
192 #endif // UI_AURA_REMOTE_WINDOW_TREE_HOST_WIN_H_ | 188 #endif // UI_AURA_REMOTE_WINDOW_TREE_HOST_WIN_H_ |
OLD | NEW |