| OLD | NEW |
| 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 "sky/shell/ui/engine.h" | 5 #include "sky/shell/ui/engine.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/trace_event/trace_event.h" | 8 #include "base/trace_event/trace_event.h" |
| 9 #include "mojo/public/cpp/application/connect.h" | 9 #include "mojo/public/cpp/application/connect.h" |
| 10 #include "sky/engine/public/platform/WebInputEvent.h" | 10 #include "sky/engine/public/platform/WebInputEvent.h" |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 void Engine::scheduleVisualUpdate() { | 201 void Engine::scheduleVisualUpdate() { |
| 202 animator_->RequestFrame(); | 202 animator_->RequestFrame(); |
| 203 } | 203 } |
| 204 | 204 |
| 205 void Engine::didCreateIsolate(blink::WebLocalFrame* frame, | 205 void Engine::didCreateIsolate(blink::WebLocalFrame* frame, |
| 206 Dart_Isolate isolate) { | 206 Dart_Isolate isolate) { |
| 207 Internals::Create(isolate, | 207 Internals::Create(isolate, |
| 208 CreateServiceProvider(config_.service_provider_context)); | 208 CreateServiceProvider(config_.service_provider_context)); |
| 209 } | 209 } |
| 210 | 210 |
| 211 void Engine::DidCreateIsolate(Dart_Isolate isolate) { |
| 212 Internals::Create(isolate, |
| 213 CreateServiceProvider(config_.service_provider_context)); |
| 214 } |
| 215 |
| 211 void Engine::ScheduleFrame() { | 216 void Engine::ScheduleFrame() { |
| 212 animator_->RequestFrame(); | 217 animator_->RequestFrame(); |
| 213 } | 218 } |
| 214 | 219 |
| 215 blink::ServiceProvider* Engine::services() { | 220 blink::ServiceProvider* Engine::services() { |
| 216 return this; | 221 return this; |
| 217 } | 222 } |
| 218 | 223 |
| 219 mojo::NavigatorHost* Engine::NavigatorHost() { | 224 mojo::NavigatorHost* Engine::NavigatorHost() { |
| 220 return this; | 225 return this; |
| 221 } | 226 } |
| 222 | 227 |
| 223 void Engine::RequestNavigate(mojo::Target target, | 228 void Engine::RequestNavigate(mojo::Target target, |
| 224 mojo::URLRequestPtr request) { | 229 mojo::URLRequestPtr request) { |
| 225 // Ignoring target for now. | 230 // Ignoring target for now. |
| 226 base::MessageLoop::current()->PostTask(FROM_HERE, | 231 base::MessageLoop::current()->PostTask(FROM_HERE, |
| 227 base::Bind(&Engine::LoadURL, GetWeakPtr(), request->url)); | 232 base::Bind(&Engine::LoadURL, GetWeakPtr(), request->url)); |
| 228 } | 233 } |
| 229 | 234 |
| 230 void Engine::DidNavigateLocally(const mojo::String& url) { | 235 void Engine::DidNavigateLocally(const mojo::String& url) { |
| 231 } | 236 } |
| 232 | 237 |
| 233 void Engine::RequestNavigateHistory(int32_t delta) { | 238 void Engine::RequestNavigateHistory(int32_t delta) { |
| 234 NOTIMPLEMENTED(); | 239 NOTIMPLEMENTED(); |
| 235 } | 240 } |
| 236 | 241 |
| 237 } // namespace shell | 242 } // namespace shell |
| 238 } // namespace sky | 243 } // namespace sky |
| OLD | NEW |