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

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

Issue 1188633002: Fix iOS builds after ShellView refactor on Android (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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/ios/sky_surface.h ('k') | sky/shell/ios/sky_view_controller.mm » ('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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « sky/shell/ios/sky_surface.h ('k') | sky/shell/ios/sky_view_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698