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

Unified Diff: mojo/views/native_widget_view_manager.cc

Issue 658923003: Remove dependency on ui from view_manager. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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
Index: mojo/views/native_widget_view_manager.cc
diff --git a/mojo/views/native_widget_view_manager.cc b/mojo/views/native_widget_view_manager.cc
index a9bd40bd50572c6252e9012049e109222b51b204..10c01198eaccc15c1afcbc2e094d09980a1f3569 100644
--- a/mojo/views/native_widget_view_manager.cc
+++ b/mojo/views/native_widget_view_manager.cc
@@ -5,6 +5,7 @@
#include "mojo/views/native_widget_view_manager.h"
#include "mojo/aura/window_tree_host_mojo.h"
+#include "mojo/converters/geometry/geometry_type_converters.h"
#include "mojo/converters/input_events/input_events_type_converters.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/client/default_capture_client.h"
@@ -139,9 +140,10 @@ void NativeWidgetViewManager::OnViewDestroyed(View* view) {
}
void NativeWidgetViewManager::OnViewBoundsChanged(View* view,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) {
- GetWidget()->SetBounds(gfx::Rect(view->bounds().size()));
+ const Rect& old_bounds,
+ const Rect& new_bounds) {
+ gfx::Rect view_rect = view->bounds().Clone().To<gfx::Rect>();
+ GetWidget()->SetBounds(gfx::Rect(view_rect.size()));
}
void NativeWidgetViewManager::OnViewInputEvent(View* view,
« mojo/examples/wm_flow/wm/frame_controller.cc ('K') | « mojo/views/native_widget_view_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698