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

Side by Side Diff: ui/aura/mus/window_port_mus.h

Issue 2470963002: Makes it possible for clients to directly create WindowTreeHostMus (Closed)
Patch Set: nuke comment Created 4 years, 1 month 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 | « ui/aura/mus/window_mus.h ('k') | ui/aura/mus/window_port_mus.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_MUS_WINDOW_PORT_MUS_H_ 5 #ifndef UI_AURA_MUS_WINDOW_PORT_MUS_H_
6 #define UI_AURA_MUS_WINDOW_PORT_MUS_H_ 6 #define UI_AURA_MUS_WINDOW_PORT_MUS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 18 matching lines...) Expand all
29 class WindowTreeClient; 29 class WindowTreeClient;
30 class WindowTreeClientPrivate; 30 class WindowTreeClientPrivate;
31 31
32 // WindowPortMus is a WindowPort that forwards calls to WindowTreeClient 32 // WindowPortMus is a WindowPort that forwards calls to WindowTreeClient
33 // so that changes are propagated to the server. All changes from 33 // so that changes are propagated to the server. All changes from
34 // WindowTreeClient to the underlying Window route through this class (by 34 // WindowTreeClient to the underlying Window route through this class (by
35 // way of WindowMus) and are done in such a way that they don't result in 35 // way of WindowMus) and are done in such a way that they don't result in
36 // calling back to WindowTreeClient. 36 // calling back to WindowTreeClient.
37 class AURA_EXPORT WindowPortMus : public WindowPort, public WindowMus { 37 class AURA_EXPORT WindowPortMus : public WindowPort, public WindowMus {
38 public: 38 public:
39 // See WindowMus's constructor for details on |create_remote_window|. 39 // See WindowMus's constructor for details on |window_mus_type|.
40 explicit WindowPortMus(WindowTreeClient* client, 40 WindowPortMus(WindowTreeClient* client, WindowMusType window_mus_type);
41 bool create_remote_window = true);
42 ~WindowPortMus() override; 41 ~WindowPortMus() override;
43 42
44 static WindowPortMus* Get(Window* window); 43 static WindowPortMus* Get(Window* window);
45 44
46 Window* window() { return window_; } 45 Window* window() { return window_; }
47 const Window* window() const { return window_; } 46 const Window* window() const { return window_; }
48 47
49 void SetTextInputState(mojo::TextInputStatePtr state); 48 void SetTextInputState(mojo::TextInputStatePtr state);
50 void SetImeVisibility(bool visible, mojo::TextInputStatePtr state); 49 void SetImeVisibility(bool visible, mojo::TextInputStatePtr state);
51 50
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 void RemoveTransientChildFromServer(WindowMus* child) override; 182 void RemoveTransientChildFromServer(WindowMus* child) override;
184 ChangeSource OnTransientChildAdded(WindowMus* child) override; 183 ChangeSource OnTransientChildAdded(WindowMus* child) override;
185 ChangeSource OnTransientChildRemoved(WindowMus* child) override; 184 ChangeSource OnTransientChildRemoved(WindowMus* child) override;
186 std::unique_ptr<WindowMusChangeData> PrepareForServerBoundsChange( 185 std::unique_ptr<WindowMusChangeData> PrepareForServerBoundsChange(
187 const gfx::Rect& bounds) override; 186 const gfx::Rect& bounds) override;
188 std::unique_ptr<WindowMusChangeData> PrepareForServerVisibilityChange( 187 std::unique_ptr<WindowMusChangeData> PrepareForServerVisibilityChange(
189 bool value) override; 188 bool value) override;
190 void NotifyEmbeddedAppDisconnected() override; 189 void NotifyEmbeddedAppDisconnected() override;
191 190
192 // WindowPort: 191 // WindowPort:
193 std::unique_ptr<WindowPortInitData> OnPreInit(Window* window) override; 192 void OnPreInit(Window* window) override;
194 void OnPostInit(std::unique_ptr<WindowPortInitData> init_data) override;
195 void OnDeviceScaleFactorChanged(float device_scale_factor) override; 193 void OnDeviceScaleFactorChanged(float device_scale_factor) override;
196 void OnWillAddChild(Window* child) override; 194 void OnWillAddChild(Window* child) override;
197 void OnWillRemoveChild(Window* child) override; 195 void OnWillRemoveChild(Window* child) override;
198 void OnWillMoveChild(size_t current_index, size_t dest_index) override; 196 void OnWillMoveChild(size_t current_index, size_t dest_index) override;
199 void OnVisibilityChanged(bool visible) override; 197 void OnVisibilityChanged(bool visible) override;
200 void OnDidChangeBounds(const gfx::Rect& old_bounds, 198 void OnDidChangeBounds(const gfx::Rect& old_bounds,
201 const gfx::Rect& new_bounds) override; 199 const gfx::Rect& new_bounds) override;
202 std::unique_ptr<WindowPortPropertyData> OnWillChangeProperty( 200 std::unique_ptr<WindowPortPropertyData> OnWillChangeProperty(
203 const void* key) override; 201 const void* key) override;
204 void OnPropertyChanged(const void* key, 202 void OnPropertyChanged(const void* key,
(...skipping 10 matching lines...) Expand all
215 std::unique_ptr<SurfaceInfo> surface_info_; 213 std::unique_ptr<SurfaceInfo> surface_info_;
216 214
217 ui::mojom::Cursor predefined_cursor_ = ui::mojom::Cursor::CURSOR_NULL; 215 ui::mojom::Cursor predefined_cursor_ = ui::mojom::Cursor::CURSOR_NULL;
218 216
219 DISALLOW_COPY_AND_ASSIGN(WindowPortMus); 217 DISALLOW_COPY_AND_ASSIGN(WindowPortMus);
220 }; 218 };
221 219
222 } // namespace aura 220 } // namespace aura
223 221
224 #endif // UI_AURA_MUS_WINDOW_PORT_MUS_H_ 222 #endif // UI_AURA_MUS_WINDOW_PORT_MUS_H_
OLDNEW
« no previous file with comments | « ui/aura/mus/window_mus.h ('k') | ui/aura/mus/window_port_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698