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

Side by Side Diff: sky/shell/platform_view.cc

Issue 1202323002: Port sky_shell to Linux for testing (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/shell/platform_view.h ('k') | sky/shell/service_provider.h » ('j') | 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 "sky/shell/platform_view.h" 5 #include "sky/shell/platform_view.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "sky/shell/shell.h" 8 #include "sky/shell/shell.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 10
11 namespace sky { 11 namespace sky {
12 namespace shell { 12 namespace shell {
13 13
14 PlatformView::Config::Config() {
15 }
16
17 PlatformView::Config::~Config() {
18 }
19
14 PlatformView::PlatformView(const PlatformView::Config& config) 20 PlatformView::PlatformView(const PlatformView::Config& config)
15 : config_(config), window_(0) { 21 : config_(config), window_(0) {
16 } 22 }
17 23
18 PlatformView::~PlatformView() { 24 PlatformView::~PlatformView() {
19 } 25 }
20 26
21 void PlatformView::ConnectToViewportObserver( 27 void PlatformView::ConnectToViewportObserver(
22 mojo::InterfaceRequest<ViewportObserver> request) { 28 mojo::InterfaceRequest<ViewportObserver> request) {
23 config_.ui_task_runner->PostTask( 29 config_.ui_task_runner->PostTask(
24 FROM_HERE, base::Bind(&UIDelegate::ConnectToViewportObserver, 30 FROM_HERE, base::Bind(&UIDelegate::ConnectToViewportObserver,
25 config_.ui_delegate, base::Passed(&request))); 31 config_.ui_delegate, base::Passed(&request)));
26 } 32 }
27 33
28 void PlatformView::SurfaceWasCreated() { 34 void PlatformView::SurfaceWasCreated() {
29 config_.ui_task_runner->PostTask( 35 config_.ui_task_runner->PostTask(
30 FROM_HERE, base::Bind(&UIDelegate::OnAcceleratedWidgetAvailable, 36 FROM_HERE, base::Bind(&UIDelegate::OnAcceleratedWidgetAvailable,
31 config_.ui_delegate, window_)); 37 config_.ui_delegate, window_));
32 } 38 }
33 39
34 void PlatformView::SurfaceWasDestroyed() { 40 void PlatformView::SurfaceWasDestroyed() {
35 config_.ui_task_runner->PostTask( 41 config_.ui_task_runner->PostTask(
36 FROM_HERE, 42 FROM_HERE,
37 base::Bind(&UIDelegate::OnOutputSurfaceDestroyed, config_.ui_delegate)); 43 base::Bind(&UIDelegate::OnOutputSurfaceDestroyed, config_.ui_delegate));
38 } 44 }
39 45
40 } // namespace shell 46 } // namespace shell
41 } // namespace sky 47 } // namespace sky
OLDNEW
« no previous file with comments | « sky/shell/platform_view.h ('k') | sky/shell/service_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698