OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/viewer/document_view.h" | 5 #include "services/sky/document_view.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
11 #include "base/thread_task_runner_handle.h" | 11 #include "base/thread_task_runner_handle.h" |
12 #include "mojo/converters/geometry/geometry_type_converters.h" | 12 #include "mojo/converters/geometry/geometry_type_converters.h" |
13 #include "mojo/converters/input_events/input_events_type_converters.h" | 13 #include "mojo/converters/input_events/input_events_type_converters.h" |
14 #include "mojo/public/cpp/application/connect.h" | 14 #include "mojo/public/cpp/application/connect.h" |
15 #include "mojo/public/cpp/system/data_pipe.h" | 15 #include "mojo/public/cpp/system/data_pipe.h" |
16 #include "mojo/public/interfaces/application/shell.mojom.h" | 16 #include "mojo/public/interfaces/application/shell.mojom.h" |
17 #include "mojo/services/view_manager/public/cpp/view.h" | 17 #include "mojo/services/view_manager/public/cpp/view.h" |
18 #include "mojo/services/view_manager/public/cpp/view_manager.h" | 18 #include "mojo/services/view_manager/public/cpp/view_manager.h" |
19 #include "mojo/services/view_manager/public/interfaces/view_manager.mojom.h" | 19 #include "mojo/services/view_manager/public/interfaces/view_manager.mojom.h" |
| 20 #include "services/sky/compositor/layer.h" |
| 21 #include "services/sky/compositor/layer_host.h" |
| 22 #include "services/sky/compositor/rasterizer_bitmap.h" |
| 23 #include "services/sky/compositor/rasterizer_ganesh.h" |
| 24 #include "services/sky/converters/input_event_types.h" |
| 25 #include "services/sky/dart_library_provider_impl.h" |
| 26 #include "services/sky/internals.h" |
| 27 #include "services/sky/runtime_flags.h" |
20 #include "skia/ext/refptr.h" | 28 #include "skia/ext/refptr.h" |
21 #include "sky/engine/public/platform/Platform.h" | 29 #include "sky/engine/public/platform/Platform.h" |
22 #include "sky/engine/public/platform/WebHTTPHeaderVisitor.h" | 30 #include "sky/engine/public/platform/WebHTTPHeaderVisitor.h" |
23 #include "sky/engine/public/platform/WebInputEvent.h" | 31 #include "sky/engine/public/platform/WebInputEvent.h" |
24 #include "sky/engine/public/platform/WebScreenInfo.h" | 32 #include "sky/engine/public/platform/WebScreenInfo.h" |
25 #include "sky/engine/public/web/Sky.h" | 33 #include "sky/engine/public/web/Sky.h" |
26 #include "sky/services/platform/url_request_types.h" | 34 #include "sky/services/platform/url_request_types.h" |
27 #include "sky/viewer/compositor/layer.h" | |
28 #include "sky/viewer/compositor/layer_host.h" | |
29 #include "sky/viewer/compositor/rasterizer_bitmap.h" | |
30 #include "sky/viewer/compositor/rasterizer_ganesh.h" | |
31 #include "sky/viewer/converters/input_event_types.h" | |
32 #include "sky/viewer/dart_library_provider_impl.h" | |
33 #include "sky/viewer/internals.h" | |
34 #include "sky/viewer/runtime_flags.h" | |
35 #include "third_party/skia/include/core/SkCanvas.h" | 35 #include "third_party/skia/include/core/SkCanvas.h" |
36 #include "third_party/skia/include/core/SkColor.h" | 36 #include "third_party/skia/include/core/SkColor.h" |
37 #include "third_party/skia/include/core/SkDevice.h" | 37 #include "third_party/skia/include/core/SkDevice.h" |
38 #include "ui/events/gestures/gesture_recognizer.h" | 38 #include "ui/events/gestures/gesture_recognizer.h" |
39 | 39 |
40 namespace sky { | 40 namespace sky { |
41 namespace { | 41 namespace { |
42 | 42 |
43 ui::EventType ConvertEventTypeToUIEventType(blink::WebInputEvent::Type type) { | 43 ui::EventType ConvertEventTypeToUIEventType(blink::WebInputEvent::Type type) { |
44 if (type == blink::WebInputEvent::PointerDown) | 44 if (type == blink::WebInputEvent::PointerDown) |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 new mojo::StrongBinding<mojo::ServiceProvider>(sp_impl, &sp)); | 312 new mojo::StrongBinding<mojo::ServiceProvider>(sp_impl, &sp)); |
313 service_registry_->AddServices(interface_names.Pass(), sp.Pass()); | 313 service_registry_->AddServices(interface_names.Pass(), sp.Pass()); |
314 } | 314 } |
315 | 315 |
316 void DocumentView::ScheduleFrame() { | 316 void DocumentView::ScheduleFrame() { |
317 DCHECK(sky_view_); | 317 DCHECK(sky_view_); |
318 layer_host_->SetNeedsAnimate(); | 318 layer_host_->SetNeedsAnimate(); |
319 } | 319 } |
320 | 320 |
321 } // namespace sky | 321 } // namespace sky |
OLD | NEW |