Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(230)

Side by Side Diff: sky/shell/ios/sky_surface.mm

Issue 1203143004: Make it possible to run Sky apps offline (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: gn check Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/shell/dart/dart_library_provider_network.cc ('k') | sky/shell/linux/main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « sky/shell/dart/dart_library_provider_network.cc ('k') | sky/shell/linux/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698