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

Side by Side Diff: components/mus/public/cpp/lib/window_tree_client_impl.h

Issue 1423133003: Routes calls to WM through WS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no braces Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_PUBLIC_CPP_LIB_WINDOW_TREE_CLIENT_IMPL_H_ 5 #ifndef COMPONENTS_MUS_PUBLIC_CPP_LIB_WINDOW_TREE_CLIENT_IMPL_H_
6 #define COMPONENTS_MUS_PUBLIC_CPP_LIB_WINDOW_TREE_CLIENT_IMPL_H_ 6 #define COMPONENTS_MUS_PUBLIC_CPP_LIB_WINDOW_TREE_CLIENT_IMPL_H_
7 7
8 #include "components/mus/public/cpp/types.h" 8 #include "components/mus/public/cpp/types.h"
9 #include "components/mus/public/cpp/window.h" 9 #include "components/mus/public/cpp/window.h"
10 #include "components/mus/public/cpp/window_tree_connection.h" 10 #include "components/mus/public/cpp/window_tree_connection.h"
11 #include "components/mus/public/interfaces/window_tree.mojom.h" 11 #include "components/mus/public/interfaces/window_tree.mojom.h"
12 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h" 12 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h"
13 13
14 namespace gfx {
15 class Rect;
16 class Size;
17 }
18
14 namespace mus { 19 namespace mus {
15 class WindowTreeConnection; 20 class WindowTreeConnection;
16 class WindowTreeDelegate; 21 class WindowTreeDelegate;
17 22
18 // Manages the connection with the Window Server service. 23 // Manages the connection with the Window Server service.
19 class WindowTreeClientImpl : public WindowTreeConnection, 24 class WindowTreeClientImpl : public WindowTreeConnection,
20 public mus::mojom::WindowTreeClient { 25 public mus::mojom::WindowTreeClient {
21 public: 26 public:
22 WindowTreeClientImpl( 27 WindowTreeClientImpl(
23 WindowTreeDelegate* delegate, 28 WindowTreeDelegate* delegate,
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 void AddWindow(Window* window); 83 void AddWindow(Window* window);
79 void RemoveWindow(Id window_id); 84 void RemoveWindow(Id window_id);
80 85
81 bool is_embed_root() const { return is_embed_root_; } 86 bool is_embed_root() const { return is_embed_root_; }
82 87
83 // Called after the root window's observers have been notified of destruction 88 // Called after the root window's observers have been notified of destruction
84 // (as the last step of ~Window). This ordering ensures that the Window Server 89 // (as the last step of ~Window). This ordering ensures that the Window Server
85 // is torn down after the root. 90 // is torn down after the root.
86 void OnRootDestroyed(Window* root); 91 void OnRootDestroyed(Window* root);
87 92
93 void SetPreferredSize(Id window_id, const gfx::Size& size);
94 void RequestBoundsChange(Id window_id, const gfx::Rect& bounds);
95 void SetShowState(Id window_id, mojom::ShowState show_state);
96
88 private: 97 private:
89 typedef std::map<Id, Window*> IdToWindowMap; 98 typedef std::map<Id, Window*> IdToWindowMap;
90 99
91 Id CreateWindowOnServer(); 100 Id CreateWindowOnServer();
92 101
93 // Overridden from WindowTreeConnection: 102 // Overridden from WindowTreeConnection:
94 Window* GetRoot() override; 103 Window* GetRoot() override;
95 Window* GetWindowById(Id id) override; 104 Window* GetWindowById(Id id) override;
96 Window* GetFocusedWindow() override; 105 Window* GetFocusedWindow() override;
97 Window* NewWindow() override; 106 Window* NewWindow() override;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 bool is_embed_root_; 170 bool is_embed_root_;
162 171
163 bool in_destructor_; 172 bool in_destructor_;
164 173
165 MOJO_DISALLOW_COPY_AND_ASSIGN(WindowTreeClientImpl); 174 MOJO_DISALLOW_COPY_AND_ASSIGN(WindowTreeClientImpl);
166 }; 175 };
167 176
168 } // namespace mus 177 } // namespace mus
169 178
170 #endif // COMPONENTS_MUS_PUBLIC_CPP_LIB_WINDOW_TREE_CLIENT_IMPL_H_ 179 #endif // COMPONENTS_MUS_PUBLIC_CPP_LIB_WINDOW_TREE_CLIENT_IMPL_H_
OLDNEW
« no previous file with comments | « components/mus/public/cpp/lib/window.cc ('k') | components/mus/public/cpp/lib/window_tree_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698