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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 | 124 |
125 - (NSString*)skyInitialLoadURL { | 125 - (NSString*)skyInitialLoadURL { |
126 return [NSBundle mainBundle].infoDictionary[@"com.google.sky.load_url"]; | 126 return [NSBundle mainBundle].infoDictionary[@"com.google.sky.load_url"]; |
127 } | 127 } |
128 | 128 |
129 - (void)connectToViewportObserverAndLoad { | 129 - (void)connectToViewportObserverAndLoad { |
130 auto interface_request = mojo::GetProxy(&_viewport_observer); | 130 auto interface_request = mojo::GetProxy(&_viewport_observer); |
131 self.platformView->ConnectToViewportObserver(interface_request.Pass()); | 131 self.platformView->ConnectToViewportObserver(interface_request.Pass()); |
132 | 132 |
133 mojo::String string(self.skyInitialLoadURL.UTF8String); | 133 mojo::String string(self.skyInitialLoadURL.UTF8String); |
134 _viewport_observer->LoadURL(string); | 134 _viewport_observer->RunFromNetwork(string); |
135 } | 135 } |
136 | 136 |
137 - (void)notifySurfaceDestruction { | 137 - (void)notifySurfaceDestruction { |
138 self.platformView->SurfaceDestroyed(); | 138 self.platformView->SurfaceDestroyed(); |
139 } | 139 } |
140 | 140 |
141 #pragma mark - UIResponder overrides for raw touches | 141 #pragma mark - UIResponder overrides for raw touches |
142 | 142 |
143 - (void)dispatchTouches:(NSSet*)touches phase:(UITouchPhase)phase { | 143 - (void)dispatchTouches:(NSSet*)touches phase:(UITouchPhase)phase { |
144 auto eventType = EventTypeFromUITouchPhase(phase); | 144 auto eventType = EventTypeFromUITouchPhase(phase); |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 + (Class)layerClass { | 287 + (Class)layerClass { |
288 return [CAEAGLLayer class]; | 288 return [CAEAGLLayer class]; |
289 } | 289 } |
290 | 290 |
291 - (void)dealloc { | 291 - (void)dealloc { |
292 [self notifySurfaceDestruction]; | 292 [self notifySurfaceDestruction]; |
293 [super dealloc]; | 293 [super dealloc]; |
294 } | 294 } |
295 | 295 |
296 @end | 296 @end |
OLD | NEW |