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

Unified Diff: sky/shell/platform_view.cc

Issue 1169983005: sky/shell updates for Android and iOS (Closed) Base URL: https://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 side-by-side diff with in-line comments
Download patch
Index: sky/shell/platform_view.cc
diff --git a/sky/shell/platform_view.cc b/sky/shell/platform_view.cc
new file mode 100644
index 0000000000000000000000000000000000000000..4050aed3101af1fb4cc18a6e8250a75fb672d5e8
--- /dev/null
+++ b/sky/shell/platform_view.cc
@@ -0,0 +1,41 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "sky/shell/platform_view.h"
+#include "base/bind.h"
+#include "base/location.h"
+#include "sky/shell/shell.h"
+#include "base/single_thread_task_runner.h"
+
+namespace sky {
+namespace shell {
+
+PlatformView::PlatformView(const PlatformView::Config& config)
+ : config_(config), window_(0) {
+}
+
+PlatformView::~PlatformView() {
+}
+
+void PlatformView::ConnectToViewportObserver(
+ mojo::InterfaceRequest<ViewportObserver> request) {
+ config_.ui_task_runner->PostTask(
+ FROM_HERE, base::Bind(&UIDelegate::ConnectToViewportObserver,
+ config_.ui_delegate, base::Passed(&request)));
+}
+
+void PlatformView::SurfaceWasCreated() {
+ config_.ui_task_runner->PostTask(
+ FROM_HERE, base::Bind(&UIDelegate::OnAcceleratedWidgetAvailable,
+ config_.ui_delegate, window_));
+}
+
+void PlatformView::SurfaceWasDestroyed() {
+ config_.ui_task_runner->PostTask(
+ FROM_HERE,
+ base::Bind(&UIDelegate::OnOutputSurfaceDestroyed, config_.ui_delegate));
+}
+
+} // namespace shell
+} // namespace sky

Powered by Google App Engine
This is Rietveld 408576698