Index: mojo/examples/pepper_container_app/pepper_container_app.cc |
diff --git a/mojo/examples/pepper_container_app/pepper_container_app.cc b/mojo/examples/pepper_container_app/pepper_container_app.cc |
index db2fad4a05969d1ac956d5c3b70bbecb676c64e7..2fb2a84746408daba1f573dfeabe88ecb5e6ee4a 100644 |
--- a/mojo/examples/pepper_container_app/pepper_container_app.cc |
+++ b/mojo/examples/pepper_container_app/pepper_container_app.cc |
@@ -11,7 +11,6 @@ |
#include "mojo/examples/pepper_container_app/plugin_instance.h" |
#include "mojo/examples/pepper_container_app/plugin_module.h" |
#include "mojo/examples/pepper_container_app/type_converters.h" |
-#include "mojo/public/cpp/bindings/allocation_scope.h" |
#include "mojo/public/cpp/environment/environment.h" |
#include "mojo/public/cpp/gles2/gles2.h" |
#include "mojo/public/cpp/shell/application.h" |
@@ -42,21 +41,17 @@ class PepperContainerApp: public Application, |
: Application(shell_handle), |
ppapi_globals_(this), |
plugin_module_(new PluginModule) { |
- mojo::AllocationScope scope; |
- |
ConnectTo("mojo:mojo_native_viewport_service", &viewport_); |
viewport_->SetClient(this); |
- Rect::Builder rect; |
- Point::Builder point; |
- point.set_x(10); |
- point.set_y(10); |
- rect.set_position(point.Finish()); |
- Size::Builder size; |
- size.set_width(800); |
- size.set_height(600); |
- rect.set_size(size.Finish()); |
- viewport_->Create(rect.Finish()); |
+ RectPtr rect(Rect::New()); |
+ rect->position = Point::New(); |
+ rect->position->x = 10; |
+ rect->position->y = 10; |
+ rect->size = Size::New(); |
+ rect->size->width = 800; |
+ rect->size->height = 600; |
+ viewport_->Create(rect.Pass()); |
viewport_->Show(); |
} |
@@ -82,16 +77,16 @@ class PepperContainerApp: public Application, |
base::MessageLoop::current()->Quit(); |
} |
- virtual void OnBoundsChanged(const Rect& bounds) OVERRIDE { |
+ virtual void OnBoundsChanged(RectPtr bounds) OVERRIDE { |
ppapi::ProxyAutoLock lock; |
if (plugin_instance_) |
- plugin_instance_->DidChangeView(bounds); |
+ plugin_instance_->DidChangeView(bounds.To<PP_Rect>()); |
} |
- virtual void OnEvent(const Event& event, |
+ virtual void OnEvent(EventPtr event, |
const mojo::Callback<void()>& callback) OVERRIDE { |
- if (!event.location().is_null()) { |
+ if (!event->location.is_null()) { |
ppapi::ProxyAutoLock lock; |
// TODO(yzshen): Handle events. |