Fix iOS builds after ShellView refactor on Android

BUG=
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1188633002.
This commit is contained in:
Chinmay Garde
2015-06-15 15:10:48 -07:00
parent a00acffecd
commit 1f1946c798
6 changed files with 15 additions and 4 deletions

View File

@@ -157,6 +157,8 @@ if (is_android) {
"platform_view.h",
"shell.cc",
"shell.h",
"shell_view.cc",
"shell_view.h",
"ui/animator.cc",
"ui/animator.h",
"ui/engine.cc",

View File

@@ -12,6 +12,8 @@ namespace shell {
class PlatformViewIOS : public PlatformView {
public:
explicit PlatformViewIOS(const Config& config);
~PlatformViewIOS() override;
void SurfaceCreated(gfx::AcceleratedWidget widget);
void SurfaceDestroyed(void);

View File

@@ -11,6 +11,13 @@ PlatformView* PlatformView::Create(const Config& config) {
return new PlatformViewIOS(config);
}
PlatformViewIOS::PlatformViewIOS(const Config& config)
: PlatformView(config) {
}
PlatformViewIOS::~PlatformViewIOS() {
}
void PlatformViewIOS::SurfaceCreated(gfx::AcceleratedWidget widget) {
DCHECK(window_ == 0);
window_ = widget;

View File

@@ -3,6 +3,7 @@
// found in the LICENSE file.
#import <UIKit/UIKit.h>
#import "sky/shell/shell_view.h"
@interface SkySurface : UIView

View File

@@ -103,9 +103,8 @@ static inline sky::EventType EventTypeFromUITouchPhase(UITouchPhase phase) {
}
- (void)connectToViewportObserverAndLoad {
auto view = static_cast<sky::shell::PlatformViewIOS*>(_shell_view->view());
auto interface_request = mojo::GetProxy(&_viewport_observer);
view->ConnectToViewportObserver(interface_request.Pass());
self.platformView->ConnectToViewportObserver(interface_request.Pass());
mojo::String string(self.skyInitialLoadURL.UTF8String);
_viewport_observer->LoadURL(string);

View File

@@ -8,13 +8,13 @@
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#include "sky/shell/shell.h"
#include "sky/shell/shell_view.h"
@implementation SkyViewController
- (void)loadView {
ShellView* shell_view = new sky::shell::ShellView(sky::shell::Shell::Shared());
auto shell_view = new sky::shell::ShellView(sky::shell::Shell::Shared());
SkySurface* surface = [[SkySurface alloc] initWithShellView: shell_view];
surface.autoresizingMask =