OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #import "sky_surface.h" | 5 #import "sky_surface.h" |
6 | 6 |
7 #import <QuartzCore/QuartzCore.h> | 7 #import <QuartzCore/QuartzCore.h> |
8 #import <OpenGLES/EAGL.h> | 8 #import <OpenGLES/EAGL.h> |
9 #import <OpenGLES/EAGLDrawable.h> | 9 #import <OpenGLES/EAGLDrawable.h> |
10 | 10 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 | 96 |
97 - (void)notifySurfaceCreation { | 97 - (void)notifySurfaceCreation { |
98 self.platformView->SurfaceCreated(self.acceleratedWidget); | 98 self.platformView->SurfaceCreated(self.acceleratedWidget); |
99 } | 99 } |
100 | 100 |
101 - (NSString*)skyInitialLoadURL { | 101 - (NSString*)skyInitialLoadURL { |
102 return [NSBundle mainBundle].infoDictionary[@"com.google.sky.load_url"]; | 102 return [NSBundle mainBundle].infoDictionary[@"com.google.sky.load_url"]; |
103 } | 103 } |
104 | 104 |
105 - (void)connectToViewportObserverAndLoad { | 105 - (void)connectToViewportObserverAndLoad { |
106 auto view = static_cast<sky::shell::PlatformViewIOS*>(_shell_view->view()); | |
107 auto interface_request = mojo::GetProxy(&_viewport_observer); | 106 auto interface_request = mojo::GetProxy(&_viewport_observer); |
108 view->ConnectToViewportObserver(interface_request.Pass()); | 107 self.platformView->ConnectToViewportObserver(interface_request.Pass()); |
109 | 108 |
110 mojo::String string(self.skyInitialLoadURL.UTF8String); | 109 mojo::String string(self.skyInitialLoadURL.UTF8String); |
111 _viewport_observer->LoadURL(string); | 110 _viewport_observer->LoadURL(string); |
112 } | 111 } |
113 | 112 |
114 - (void)notifySurfaceDestruction { | 113 - (void)notifySurfaceDestruction { |
115 self.platformView->SurfaceDestroyed(); | 114 self.platformView->SurfaceDestroyed(); |
116 } | 115 } |
117 | 116 |
118 #pragma mark - UIResponder overrides for raw touches | 117 #pragma mark - UIResponder overrides for raw touches |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 + (Class)layerClass { | 160 + (Class)layerClass { |
162 return [CAEAGLLayer class]; | 161 return [CAEAGLLayer class]; |
163 } | 162 } |
164 | 163 |
165 - (void)dealloc { | 164 - (void)dealloc { |
166 [self notifySurfaceDestruction]; | 165 [self notifySurfaceDestruction]; |
167 [super dealloc]; | 166 [super dealloc]; |
168 } | 167 } |
169 | 168 |
170 @end | 169 @end |
OLD | NEW |