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

Unified Diff: blimp/client/core/contents/blimp_contents_view_android.cc

Issue 2279403003: blimp: Hook up the layer holding the tab content into Chrome. (Closed)
Patch Set: Addressed comments Created 4 years, 4 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: blimp/client/core/contents/blimp_contents_view_android.cc
diff --git a/blimp/client/core/contents/blimp_contents_view_android.cc b/blimp/client/core/contents/blimp_contents_view_android.cc
new file mode 100644
index 0000000000000000000000000000000000000000..ce32fc5369d61da8493629cc329c3a53c4d34cf8
--- /dev/null
+++ b/blimp/client/core/contents/blimp_contents_view_android.cc
@@ -0,0 +1,36 @@
+// Copyright 2016 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 "blimp/client/core/contents/blimp_contents_view_android.h"
+
+#include "base/memory/ptr_util.h"
+#include "blimp/client/core/contents/android/blimp_contents_impl_android.h"
+#include "cc/layers/layer.h"
+
+namespace blimp {
+namespace client {
+
+// static
+std::unique_ptr<BlimpContentsView> BlimpContentsView::Create(
+ BlimpContentsImpl* blimp_contents) {
+ return base::MakeUnique<BlimpContentsViewAndroid>(
+ blimp_contents->GetBlimpContentsImplAndroid());
+}
+
+BlimpContentsViewAndroid::BlimpContentsViewAndroid(
+ BlimpContentsImplAndroid* blimp_contents) {
+ // TODO(khushalsagar): Get the ViewAndroidDelegate from java after it has a
+ // BlimpView. Also get the WindowAndroid so this view can add itself as a
+ // child to it.
+ // TODO(dtrainor): Use the layer from the compositor manager here instead when
+ // it goes in the BlimpContents.
+ view_.SetLayer(cc::Layer::Create());
+}
+
+gfx::NativeView BlimpContentsViewAndroid::GetNativeView() {
+ return &view_;
+}
+
+} // namespace client
+} // namespace blimp
« no previous file with comments | « blimp/client/core/contents/blimp_contents_view_android.h ('k') | blimp/client/core/contents/blimp_contents_view_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698