| Index: services/native_viewport/native_viewport_impl.cc
|
| diff --git a/services/native_viewport/native_viewport_impl.cc b/services/native_viewport/native_viewport_impl.cc
|
| index 1fcb20f701312e71437af1a1c8bfb199877c0ec0..ce258332a8acf7acecf63e12da964b1bd735fb9a 100644
|
| --- a/services/native_viewport/native_viewport_impl.cc
|
| +++ b/services/native_viewport/native_viewport_impl.cc
|
| @@ -11,6 +11,7 @@
|
| #include "base/time/time.h"
|
| #include "mojo/converters/geometry/geometry_type_converters.h"
|
| #include "mojo/converters/native_viewport/surface_configuration_type_converters.h"
|
| +#include "mojo/public/cpp/application/application_impl.h"
|
| #include "mojo/public/cpp/application/interface_factory.h"
|
| #include "services/gles2/gpu_state.h"
|
| #include "services/native_viewport/platform_viewport_headless.h"
|
| @@ -20,16 +21,17 @@
|
| namespace native_viewport {
|
|
|
| NativeViewportImpl::NativeViewportImpl(
|
| + mojo::ApplicationImpl* application,
|
| bool is_headless,
|
| const scoped_refptr<gles2::GpuState>& gpu_state,
|
| mojo::InterfaceRequest<mojo::NativeViewport> request)
|
| - : is_headless_(is_headless),
|
| + : application_(application),
|
| + is_headless_(is_headless),
|
| context_provider_(gpu_state),
|
| sent_metrics_(false),
|
| metrics_(mojo::ViewportMetrics::New()),
|
| binding_(this, request.Pass()),
|
| - weak_factory_(this) {
|
| -}
|
| + weak_factory_(this) {}
|
|
|
| NativeViewportImpl::~NativeViewportImpl() {
|
| // Destroy the NativeViewport early on as it may call us back during
|
| @@ -51,7 +53,7 @@ void NativeViewportImpl::Create(
|
| if (is_headless_)
|
| platform_viewport_ = PlatformViewportHeadless::Create(this);
|
| else
|
| - platform_viewport_ = PlatformViewport::Create(this);
|
| + platform_viewport_ = PlatformViewport::Create(application_, this);
|
| platform_viewport_->Init(gfx::Rect(size.To<gfx::Size>()));
|
| }
|
|
|
|
|