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

Unified Diff: mojo/services/view_manager/connection_manager.cc

Issue 692693002: Make it possible to change the viewport size (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Fix style nits Created 6 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
« no previous file with comments | « mojo/services/view_manager/connection_manager.h ('k') | mojo/services/view_manager/display_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/view_manager/connection_manager.cc
diff --git a/mojo/services/view_manager/connection_manager.cc b/mojo/services/view_manager/connection_manager.cc
index 120e491f7dab36e4d01288a29d473798187ca516..36c1e4303ddd97dc3d14ecbfe5b41cea878481fd 100644
--- a/mojo/services/view_manager/connection_manager.cc
+++ b/mojo/services/view_manager/connection_manager.cc
@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "base/stl_util.h"
+#include "mojo/converters/geometry/geometry_type_converters.h"
#include "mojo/converters/input_events/input_events_type_converters.h"
#include "mojo/public/cpp/application/application_connection.h"
#include "mojo/public/interfaces/application/service_provider.mojom.h"
@@ -28,6 +29,10 @@ class WindowManagerInternalClientImpl
real_client_->DispatchInputEventToView(transport_view_id, event.Pass());
}
+ void SetViewportSize(SizePtr size) override {
+ real_client_->SetViewportSize(size.Pass());
+ }
+
// InterfaceImpl:
void OnConnectionError() override { error_handler_->OnConnectionError(); }
@@ -324,6 +329,11 @@ void ConnectionManager::OnViewPropertyChanged(
}
}
+void ConnectionManager::SetViewportSize(SizePtr size) {
+ gfx::Size new_size = size.To<gfx::Size>();
+ display_manager_.SetViewportSize(new_size);
+}
+
void ConnectionManager::DispatchInputEventToView(Id transport_view_id,
EventPtr event) {
const ViewId view_id(ViewIdFromTransportId(transport_view_id));
« no previous file with comments | « mojo/services/view_manager/connection_manager.h ('k') | mojo/services/view_manager/display_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698