| 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 d2aab411c315a191b44b0cacdeab9e26ee6ecb03..0647b6663397b324ede82c572f3872f215fcb256 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_.set_client(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.
|
|
|