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

Unified Diff: sky/viewer/document_view.cc

Issue 659043004: Fix build. (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
« no previous file with comments | « sky/viewer/document_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/viewer/document_view.cc
diff --git a/sky/viewer/document_view.cc b/sky/viewer/document_view.cc
index b014f261965144ae07a04a78d9882042d80505ca..2265ae1930a9005ad7ee26a8a32b260e8c7b4481 100644
--- a/sky/viewer/document_view.cc
+++ b/sky/viewer/document_view.cc
@@ -10,6 +10,7 @@
#include "base/single_thread_task_runner.h"
#include "base/strings/string_util.h"
#include "base/thread_task_runner_handle.h"
+#include "mojo/converters/geometry/geometry_type_converters.h"
#include "mojo/public/cpp/application/connect.h"
#include "mojo/public/cpp/application/service_provider_impl.h"
#include "mojo/public/cpp/system/data_pipe.h"
@@ -104,8 +105,9 @@ void DocumentView::OnEmbed(
Load(response_.Pass());
- web_view_->resize(root_->bounds().size());
- web_layer_tree_view_impl_->setViewportSize(root_->bounds().size());
+ gfx::Size size = root_->bounds().To<gfx::Rect>().size();
+ web_view_->resize(size);
+ web_layer_tree_view_impl_->setViewportSize(size);
web_layer_tree_view_impl_->set_view(root_);
root_->AddObserver(this);
}
@@ -179,11 +181,12 @@ void DocumentView::didCreateScriptContext(blink::WebLocalFrame* frame,
}
void DocumentView::OnViewBoundsChanged(mojo::View* view,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) {
+ const mojo::Rect& old_bounds,
+ const mojo::Rect& new_bounds) {
DCHECK_EQ(view, root_);
- web_view_->resize(new_bounds.size());
- web_layer_tree_view_impl_->setViewportSize(new_bounds.size());
+ gfx::Size size = new_bounds.To<gfx::Rect>().size();
+ web_view_->resize(size);
+ web_layer_tree_view_impl_->setViewportSize(size);
}
void DocumentView::OnViewDestroyed(mojo::View* view) {
« no previous file with comments | « sky/viewer/document_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698