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

Side by Side Diff: sky/shell/ui/engine.cc

Issue 873923003: sky/shell should link with sky/engine (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "sky/shell/ui/engine.h"
6
7 #include "sky/engine/public/web/Sky.h"
8 #include "sky/engine/public/web/WebLocalFrame.h"
9 #include "sky/engine/public/web/WebView.h"
10 #include "sky/shell/ui/platform_impl.h"
11
12 namespace sky {
13 namespace shell {
14
15 Engine::Engine() : web_view_(nullptr), weak_factory_(this) {
16 }
17
18 Engine::~Engine() {
19 if (web_view_)
20 web_view_->close();
21 }
22
23 base::WeakPtr<Engine> Engine::GetWeakPtr() {
24 return weak_factory_.GetWeakPtr();
25 }
26
27 void Engine::Init() {
28 platform_impl_.reset(new PlatformImpl);
29 blink::initialize(platform_impl_.get());
30
31 web_view_ = blink::WebView::create(this);
32 web_view_->setMainFrame(blink::WebLocalFrame::create(this));
33 }
34
35 } // namespace shell
36 } // namespace sky
OLDNEW
« sky/shell/ui/engine.h ('K') | « sky/shell/ui/engine.h ('k') | sky/shell/ui/platform_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698