OLD | NEW |
(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/platform_view.h" |
| 6 #include "base/bind.h" |
| 7 #include "base/location.h" |
| 8 #include "sky/shell/shell.h" |
| 9 #include "base/single_thread_task_runner.h" |
| 10 |
| 11 namespace sky { |
| 12 namespace shell { |
| 13 |
| 14 PlatformView::PlatformView(const PlatformView::Config& config) |
| 15 : config_(config), window_(0) { |
| 16 } |
| 17 |
| 18 PlatformView::~PlatformView() { |
| 19 } |
| 20 |
| 21 void PlatformView::ConnectToViewportObserver( |
| 22 mojo::InterfaceRequest<ViewportObserver> request) { |
| 23 config_.ui_task_runner->PostTask( |
| 24 FROM_HERE, base::Bind(&UIDelegate::ConnectToViewportObserver, |
| 25 config_.ui_delegate, base::Passed(&request))); |
| 26 } |
| 27 |
| 28 void PlatformView::SurfaceWasCreated() { |
| 29 config_.ui_task_runner->PostTask( |
| 30 FROM_HERE, base::Bind(&UIDelegate::OnAcceleratedWidgetAvailable, |
| 31 config_.ui_delegate, window_)); |
| 32 } |
| 33 |
| 34 void PlatformView::SurfaceWasDestroyed() { |
| 35 config_.ui_task_runner->PostTask( |
| 36 FROM_HERE, |
| 37 base::Bind(&UIDelegate::OnOutputSurfaceDestroyed, config_.ui_delegate)); |
| 38 } |
| 39 |
| 40 } // namespace shell |
| 41 } // namespace sky |
OLD | NEW |