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

Side by Side Diff: components/mus/ws/window_tree_host_impl.h

Issue 1656123002: Moves accelerator registration to WindowManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix mandoline Created 4 years, 10 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 | « components/mus/ws/window_tree_apptest.cc ('k') | components/mus/ws/window_tree_host_impl.cc » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 COMPONENTS_MUS_WS_WINDOW_TREE_HOST_IMPL_H_ 5 #ifndef COMPONENTS_MUS_WS_WINDOW_TREE_HOST_IMPL_H_
6 #define COMPONENTS_MUS_WS_WINDOW_TREE_HOST_IMPL_H_ 6 #define COMPONENTS_MUS_WS_WINDOW_TREE_HOST_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <queue> 10 #include <queue>
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // drawn, otherwise destruction is immediate. 84 // drawn, otherwise destruction is immediate.
85 void ScheduleSurfaceDestruction(ServerWindow* window); 85 void ScheduleSurfaceDestruction(ServerWindow* window);
86 86
87 // Returns the metrics for this viewport. 87 // Returns the metrics for this viewport.
88 const mojom::ViewportMetrics& GetViewportMetrics() const; 88 const mojom::ViewportMetrics& GetViewportMetrics() const;
89 89
90 mojom::Rotation GetRotation() const; 90 mojom::Rotation GetRotation() const;
91 91
92 ConnectionManager* connection_manager() { return connection_manager_; } 92 ConnectionManager* connection_manager() { return connection_manager_; }
93 93
94 EventDispatcher* event_dispatcher() { return &event_dispatcher_; }
95
94 // Returns the root ServerWindow of this viewport. 96 // Returns the root ServerWindow of this viewport.
95 ServerWindow* root_window() { return root_.get(); } 97 ServerWindow* root_window() { return root_.get(); }
96 const ServerWindow* root_window() const { return root_.get(); } 98 const ServerWindow* root_window() const { return root_.get(); }
97 99
98 void SetFocusedWindow(ServerWindow* window); 100 void SetFocusedWindow(ServerWindow* window);
99 ServerWindow* GetFocusedWindow(); 101 ServerWindow* GetFocusedWindow();
100 void DestroyFocusController(); 102 void DestroyFocusController();
101 103
102 void UpdateTextInputState(ServerWindow* window, 104 void UpdateTextInputState(ServerWindow* window,
103 const ui::TextInputState& state); 105 const ui::TextInputState& state);
104 void SetImeVisibility(ServerWindow* window, bool visible); 106 void SetImeVisibility(ServerWindow* window, bool visible);
105 107
106 // Called just before |tree| is destroyed after its connection encounters an 108 // Called just before |tree| is destroyed after its connection encounters an
107 // error. 109 // error.
108 void OnWindowTreeConnectionError(WindowTreeImpl* tree); 110 void OnWindowTreeConnectionError(WindowTreeImpl* tree);
109 111
110 // Called when a client updates a cursor. This will update the cursor on the 112 // Called when a client updates a cursor. This will update the cursor on the
111 // native display if the cursor is currently under |window|. 113 // native display if the cursor is currently under |window|.
112 void OnCursorUpdated(ServerWindow* window); 114 void OnCursorUpdated(ServerWindow* window);
113 115
114 // Called when the window tree when stacking and bounds of a window 116 // Called when the window tree when stacking and bounds of a window
115 // change. This may update the cursor if the ServerWindow under the last 117 // change. This may update the cursor if the ServerWindow under the last
116 // known pointer location changed. 118 // known pointer location changed.
117 void MaybeChangeCursorOnWindowTreeChange(); 119 void MaybeChangeCursorOnWindowTreeChange();
118 120
119 // WindowTreeHost: 121 // WindowTreeHost:
120 void SetSize(mojo::SizePtr size) override; 122 void SetSize(mojo::SizePtr size) override;
121 void SetTitle(const mojo::String& title) override; 123 void SetTitle(const mojo::String& title) override;
122 void AddAccelerator(uint32_t id,
123 mojom::EventMatcherPtr event_matcher,
124 const AddAcceleratorCallback& callback) override;
125 void RemoveAccelerator(uint32_t id) override;
126 void AddActivationParent(Id transport_window_id) override; 124 void AddActivationParent(Id transport_window_id) override;
127 void RemoveActivationParent(Id transport_window_id) override; 125 void RemoveActivationParent(Id transport_window_id) override;
128 void ActivateNextWindow() override; 126 void ActivateNextWindow() override;
129 void SetUnderlaySurfaceOffsetAndExtendedHitArea( 127 void SetUnderlaySurfaceOffsetAndExtendedHitArea(
130 Id window_id, 128 Id window_id,
131 int32_t x_offset, 129 int32_t x_offset,
132 int32_t y_offset, 130 int32_t y_offset,
133 mojo::InsetsPtr hit_area) override; 131 mojo::InsetsPtr hit_area) override;
134 132
135 void OnEventAck(mojom::WindowTree* tree); 133 void OnEventAck(mojom::WindowTree* tree);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 231
234 mojom::FrameDecorationValuesPtr frame_decoration_values_; 232 mojom::FrameDecorationValuesPtr frame_decoration_values_;
235 233
236 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostImpl); 234 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostImpl);
237 }; 235 };
238 236
239 } // namespace ws 237 } // namespace ws
240 } // namespace mus 238 } // namespace mus
241 239
242 #endif // COMPONENTS_MUS_WS_WINDOW_TREE_HOST_IMPL_H_ 240 #endif // COMPONENTS_MUS_WS_WINDOW_TREE_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « components/mus/ws/window_tree_apptest.cc ('k') | components/mus/ws/window_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698