| Index: sky/shell/ios/sky_surface.mm
|
| diff --git a/sky/shell/ios/sky_surface.mm b/sky/shell/ios/sky_surface.mm
|
| index d8056de84be340b5ef24f8ff7d26072376583706..2eea5a89cb747112c48285b37c105c865b45027e 100644
|
| --- a/sky/shell/ios/sky_surface.mm
|
| +++ b/sky/shell/ios/sky_surface.mm
|
| @@ -38,6 +38,14 @@ static inline sky::EventType EventTypeFromUITouchPhase(UITouchPhase phase) {
|
| BOOL _platformViewInitialized;
|
|
|
| sky::ViewportObserverPtr _viewport_observer;
|
| + scoped_ptr<sky::shell::Instance> _instance;
|
| +}
|
| +
|
| +-(instancetype) initWithSkyInstance:(sky::shell::Instance *) instance {
|
| + self = [super init];
|
| + if (self)
|
| + _instance.reset(instance);
|
| + return self;
|
| }
|
|
|
| - (gfx::AcceleratedWidget)acceleratedWidget {
|
| @@ -80,8 +88,7 @@ static inline sky::EventType EventTypeFromUITouchPhase(UITouchPhase phase) {
|
| }
|
|
|
| - (sky::shell::PlatformViewIOS*)platformView {
|
| - auto view = static_cast<sky::shell::PlatformViewIOS*>(
|
| - sky::shell::Shell::Shared().view());
|
| + auto view = static_cast<sky::shell::PlatformViewIOS*>(_instance->view());
|
| DCHECK(view);
|
| return view;
|
| }
|
| @@ -95,7 +102,7 @@ static inline sky::EventType EventTypeFromUITouchPhase(UITouchPhase phase) {
|
| }
|
|
|
| - (void)connectToViewportObserverAndLoad {
|
| - auto view = sky::shell::Shell::Shared().view();
|
| + auto view = static_cast<sky::shell::PlatformViewIOS*>(_instance->view());
|
| auto interface_request = mojo::GetProxy(&_viewport_observer);
|
| view->ConnectToViewportObserver(interface_request.Pass());
|
|
|
|
|