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

Unified Diff: mojo/services/window_manager/window_manager_app.cc

Issue 658923003: Remove dependency on ui from view_manager. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebase 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/services/window_manager/window_manager_app.cc
diff --git a/mojo/services/window_manager/window_manager_app.cc b/mojo/services/window_manager/window_manager_app.cc
index 4f4545f33d3fd3b8eeacf0b463789806c78738c7..e9e77476571b6297ae86f2287025da728ae78d2c 100644
--- a/mojo/services/window_manager/window_manager_app.cc
+++ b/mojo/services/window_manager/window_manager_app.cc
@@ -7,6 +7,7 @@
#include "base/message_loop/message_loop.h"
#include "base/stl_util.h"
#include "mojo/aura/aura_init.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/cpp/application/application_impl.h"
@@ -199,7 +200,7 @@ void WindowManagerApp::OnEmbed(ViewManager* view_manager,
root_ = root;
window_tree_host_.reset(new WindowTreeHostMojo(shell_, root_));
- window_tree_host_->window()->SetBounds(root->bounds());
+ window_tree_host_->window()->SetBounds(root->bounds().To<gfx::Rect>());
window_tree_host_->window()->Show();
RegisterSubtree(root_, window_tree_host_->window());
@@ -272,10 +273,10 @@ void WindowManagerApp::OnViewDestroying(View* view) {
}
void WindowManagerApp::OnViewBoundsChanged(View* view,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) {
+ const Rect& old_bounds,
+ const Rect& new_bounds) {
aura::Window* window = GetWindowForViewId(view->id());
- window->SetBounds(new_bounds);
+ window->SetBounds(new_bounds.To<gfx::Rect>());
}
////////////////////////////////////////////////////////////////////////////////
@@ -336,7 +337,7 @@ void WindowManagerApp::RegisterSubtree(View* view, aura::Window* parent) {
if (view == root_)
window->AddPreTargetHandler(this);
parent->AddChild(window);
- window->SetBounds(view->bounds());
+ window->SetBounds(view->bounds().To<gfx::Rect>());
window->Show();
view_id_to_window_map_[view->id()] = window;
View::Children::const_iterator it = view->children().begin();

Powered by Google App Engine
This is Rietveld 408576698