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

Unified Diff: components/mus/public/cpp/lib/window_tree_client_impl.cc

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, 2 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 side-by-side diff with in-line comments
Download patch
Index: components/mus/public/cpp/lib/window_tree_client_impl.cc
diff --git a/components/mus/public/cpp/lib/window_tree_client_impl.cc b/components/mus/public/cpp/lib/window_tree_client_impl.cc
index fce0af9e17ea7a8bac2151dab8aa2973fcaa9fdd..9a5718dc7d090db60b2cc5ec6f7b17dfc3ea97d1 100644
--- a/components/mus/public/cpp/lib/window_tree_client_impl.cc
+++ b/components/mus/public/cpp/lib/window_tree_client_impl.cc
@@ -4,6 +4,7 @@
#include "components/mus/public/cpp/lib/window_tree_client_impl.h"
+#include "base/bind.h"
#include "components/mus/public/cpp/lib/window_private.h"
#include "components/mus/public/cpp/util.h"
#include "components/mus/public/cpp/window_observer.h"
@@ -13,8 +14,16 @@
#include "mojo/application/public/cpp/connect.h"
#include "mojo/application/public/cpp/service_provider_impl.h"
#include "mojo/application/public/interfaces/service_provider.mojom.h"
+#include "mojo/converters/geometry/geometry_type_converters.h"
+#include "ui/gfx/geometry/rect.h"
+#include "ui/gfx/geometry/size.h"
namespace mus {
+namespace {
+
+void WindowManagerCallback(mus::mojom::WindowManagerErrorCode error_code) {}
+
+} // namespace
Id MakeTransportId(ConnectionSpecificId connection_id,
ConnectionSpecificId local_id) {
@@ -238,6 +247,24 @@ void WindowTreeClientImpl::OnRootDestroyed(Window* root) {
delete this;
}
+void WindowTreeClientImpl::SetPreferredSize(Id window_id,
+ const gfx::Size& size) {
+ tree_->SetPreferredSize(window_id, mojo::Size::From(size),
+ base::Bind(&WindowManagerCallback));
+}
+
+void WindowTreeClientImpl::RequestBoundsChange(Id window_id,
+ const gfx::Rect& bounds) {
+ tree_->SetBounds(window_id, mojo::Rect::From(bounds),
+ base::Bind(&WindowManagerCallback));
+}
+
+void WindowTreeClientImpl::SetShowState(Id window_id,
+ mojom::ShowState show_state) {
+ tree_->SetShowState(window_id, show_state,
+ base::Bind(&WindowManagerCallback));
+}
+
////////////////////////////////////////////////////////////////////////////////
// WindowTreeClientImpl, WindowTreeConnection implementation:
« no previous file with comments | « components/mus/public/cpp/lib/window_tree_client_impl.h ('k') | components/mus/public/cpp/lib/window_tree_host_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698