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

Side by Side Diff: sky/engine/public/sky/sky_view.cc

Issue 1153673005: Make Uri.base work in SkyView (Closed) Base URL: git@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/engine/core/script/dom_dart_state.cc ('k') | no next file » | 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 #include "config.h" 5 #include "config.h"
6 #include "sky/engine/public/sky/sky_view.h" 6 #include "sky/engine/public/sky/sky_view.h"
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "sky/engine/core/events/GestureEvent.h" 10 #include "sky/engine/core/events/GestureEvent.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 display_metrics_ = metrics; 46 display_metrics_ = metrics;
47 data_->view_->setDisplayMetrics(display_metrics_); 47 data_->view_->setDisplayMetrics(display_metrics_);
48 } 48 }
49 49
50 void SkyView::Load(const WebURL& url, mojo::URLResponsePtr response) { 50 void SkyView::Load(const WebURL& url, mojo::URLResponsePtr response) {
51 data_->view_ = View::create(base::Bind( 51 data_->view_ = View::create(base::Bind(
52 &SkyView::ScheduleFrame, weak_factory_.GetWeakPtr())); 52 &SkyView::ScheduleFrame, weak_factory_.GetWeakPtr()));
53 data_->view_->setDisplayMetrics(display_metrics_); 53 data_->view_->setDisplayMetrics(display_metrics_);
54 54
55 dart_controller_.reset(new DartController); 55 dart_controller_.reset(new DartController);
56 dart_controller_->CreateIsolateFor(adoptPtr(new DOMDartState(nullptr)), url); 56 dart_controller_->CreateIsolateFor(adoptPtr(new DOMDartState(nullptr, url)));
57 dart_controller_->InstallView(data_->view_.get()); 57 dart_controller_->InstallView(data_->view_.get());
58 58
59 { 59 {
60 Dart_Isolate isolate = dart_controller_->dart_state()->isolate(); 60 Dart_Isolate isolate = dart_controller_->dart_state()->isolate();
61 DartIsolateScope scope(isolate); 61 DartIsolateScope scope(isolate);
62 DartApiScope api_scope; 62 DartApiScope api_scope;
63 client_->DidCreateIsolate(isolate); 63 client_->DidCreateIsolate(isolate);
64 } 64 }
65 65
66 dart_controller_->LoadMainLibrary(url, response.Pass()); 66 dart_controller_->LoadMainLibrary(url, response.Pass());
(...skipping 26 matching lines...) Expand all
93 data_->view_->handleInputEvent(WheelEvent::create(event)); 93 data_->view_->handleInputEvent(WheelEvent::create(event));
94 } 94 }
95 95
96 } 96 }
97 97
98 void SkyView::ScheduleFrame() { 98 void SkyView::ScheduleFrame() {
99 client_->ScheduleFrame(); 99 client_->ScheduleFrame();
100 } 100 }
101 101
102 } // namespace blink 102 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/script/dom_dart_state.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698