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

Unified Diff: mojo/examples/compositor_app/compositor_app.cc

Issue 534843002: Convert view manager to surfaces with uploading shim in client lib (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove overzealous shutdown check in cc/surfaces, add NON_EXPORTED_BASE for windows build, saturate… Created 6 years, 3 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 | « cc/surfaces/surface_manager.cc ('k') | mojo/examples/pepper_container_app/pepper_container_app.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/examples/compositor_app/compositor_app.cc
diff --git a/mojo/examples/compositor_app/compositor_app.cc b/mojo/examples/compositor_app/compositor_app.cc
index bbb7a07f10d41cac298216f0cd79a2155483ee86..98d70754351d08affc50bf48b87220ecfbd1d035 100644
--- a/mojo/examples/compositor_app/compositor_app.cc
+++ b/mojo/examples/compositor_app/compositor_app.cc
@@ -28,7 +28,7 @@ class SampleApp : public ApplicationDelegate, public NativeViewportClient {
virtual void Initialize(ApplicationImpl* app) OVERRIDE {
app->ConnectToService("mojo:mojo_native_viewport_service", &viewport_);
viewport_.set_client(this);
- viewport_->Create(Rect::From(gfx::Rect(10, 10, 800, 600)));
+ viewport_->Create(Size::From(gfx::Size(800, 600)));
viewport_->Show();
// TODO(jamesr): Should be mojo:mojo_gpu_service
@@ -45,9 +45,9 @@ class SampleApp : public ApplicationDelegate, public NativeViewportClient {
virtual void OnDestroyed() OVERRIDE { base::MessageLoop::current()->Quit(); }
- virtual void OnBoundsChanged(RectPtr bounds) OVERRIDE {
+ virtual void OnBoundsChanged(SizePtr bounds) OVERRIDE {
if (host_)
- host_->SetSize(gfx::Size(bounds->width, bounds->height));
+ host_->SetSize(bounds.To<gfx::Size>());
}
virtual void OnEvent(EventPtr event,
« no previous file with comments | « cc/surfaces/surface_manager.cc ('k') | mojo/examples/pepper_container_app/pepper_container_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698