| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "blimp/client/core/render_widget/blimp_document.h" | 5 #include "blimp/client/core/render_widget/blimp_document.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/threading/thread_task_runner_handle.h" | 8 #include "base/threading/thread_task_runner_handle.h" |
| 9 #include "blimp/client/core/compositor/blimp_compositor_dependencies.h" | 9 #include "blimp/client/core/compositor/blimp_compositor_dependencies.h" |
| 10 #include "blimp/client/core/input/blimp_input_manager.h" | 10 #include "blimp/client/core/input/blimp_input_manager.h" |
| 11 #include "blimp/client/core/render_widget/blimp_document_manager.h" | 11 #include "blimp/client/core/render_widget/blimp_document_manager.h" |
| 12 #include "blimp/client/core/switches/blimp_client_switches.h" | 12 #include "blimp/client/core/switches/blimp_client_switches.h" |
| 13 #include "cc/layers/layer.h" | 13 #include "cc/layers/layer.h" |
| 14 | 14 |
| 15 namespace blimp { | 15 namespace blimp { |
| 16 namespace client { | 16 namespace client { |
| 17 | 17 |
| 18 BlimpDocument::BlimpDocument(int document_id, | 18 BlimpDocument::BlimpDocument(int document_id, |
| 19 BlimpCompositorDependencies* compositor_deps, | 19 BlimpCompositorDependencies* compositor_deps, |
| 20 BlimpDocumentManager* document_manager) | 20 BlimpDocumentManager* document_manager) |
| 21 : BlimpDocument(document_id, | 21 : BlimpDocument(document_id, |
| 22 base::MakeUnique<BlimpCompositor>( | 22 BlimpCompositor::Create( |
| 23 compositor_deps, | 23 compositor_deps, |
| 24 this, | 24 this, |
| 25 base::CommandLine::ForCurrentProcess()->HasSwitch( | 25 base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 26 switches::kEnableUpdatedCompositingPath)), | 26 switches::kEnableUpdatedCompositingPath)), |
| 27 compositor_deps, | 27 compositor_deps, |
| 28 document_manager) {} | 28 document_manager) {} |
| 29 | 29 |
| 30 BlimpDocument::BlimpDocument(int document_id, | 30 BlimpDocument::BlimpDocument(int document_id, |
| 31 std::unique_ptr<BlimpCompositor> compositor, | 31 std::unique_ptr<BlimpCompositor> compositor, |
| 32 BlimpCompositorDependencies* compositor_deps, | 32 BlimpCompositorDependencies* compositor_deps, |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 manager_->SendCompositorMessage(document_id_, message); | 65 manager_->SendCompositorMessage(document_id_, message); |
| 66 } | 66 } |
| 67 | 67 |
| 68 void BlimpDocument::SendWebGestureEvent( | 68 void BlimpDocument::SendWebGestureEvent( |
| 69 const blink::WebGestureEvent& gesture_event) { | 69 const blink::WebGestureEvent& gesture_event) { |
| 70 manager_->SendWebGestureEvent(document_id_, gesture_event); | 70 manager_->SendWebGestureEvent(document_id_, gesture_event); |
| 71 } | 71 } |
| 72 | 72 |
| 73 } // namespace client | 73 } // namespace client |
| 74 } // namespace blimp | 74 } // namespace blimp |
| OLD | NEW |