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 33398047a915a258b79847aa779e9223d7eed873..58df4d0da231a9d12150e0b69d7a454d9af84cb0 100644 |
--- a/mojo/examples/compositor_app/compositor_app.cc |
+++ b/mojo/examples/compositor_app/compositor_app.cc |
@@ -8,7 +8,6 @@ |
#include "base/macros.h" |
#include "base/message_loop/message_loop.h" |
#include "mojo/examples/compositor_app/compositor_host.h" |
-#include "mojo/public/cpp/bindings/allocation_scope.h" |
#include "mojo/public/cpp/gles2/gles2.h" |
#include "mojo/public/cpp/shell/application.h" |
#include "mojo/public/cpp/system/core.h" |
@@ -33,12 +32,10 @@ namespace examples { |
class SampleApp : public Application, public NativeViewportClient { |
public: |
explicit SampleApp(MojoHandle shell_handle) : Application(shell_handle) { |
- AllocationScope scope; |
- |
ConnectTo("mojo:mojo_native_viewport_service", &viewport_); |
viewport_->SetClient(this); |
- viewport_->Create(gfx::Rect(10, 10, 800, 600)); |
+ viewport_->Create(Rect::From(gfx::Rect(10, 10, 800, 600))); |
viewport_->Show(); |
MessagePipe gles2_pipe; |
@@ -53,11 +50,11 @@ class SampleApp : public Application, public NativeViewportClient { |
base::MessageLoop::current()->Quit(); |
} |
- virtual void OnBoundsChanged(const Rect& bounds) OVERRIDE { |
- host_->SetSize(bounds.size()); |
+ virtual void OnBoundsChanged(RectPtr bounds) OVERRIDE { |
+ host_->SetSize(bounds->size.To<gfx::Size>()); |
} |
- virtual void OnEvent(const Event& event, |
+ virtual void OnEvent(EventPtr event, |
const mojo::Callback<void()>& callback) OVERRIDE { |
callback.Run(); |
} |