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

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

Issue 2320923002: Add a full Blimp integration test. (Closed)
Patch Set: Fix build break with chrome embedder Created 4 years, 3 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_impl_aura.cc
diff --git a/blimp/client/core/contents/blimp_contents_view_impl_aura.cc b/blimp/client/core/contents/blimp_contents_view_impl_aura.cc
new file mode 100644
index 0000000000000000000000000000000000000000..0e0582c0cc81f860f21a4a2fd8f166f37b04aff1
--- /dev/null
+++ b/blimp/client/core/contents/blimp_contents_view_impl_aura.cc
@@ -0,0 +1,53 @@
+// 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_impl_aura.h"
+
+#include "base/memory/ptr_util.h"
+#include "cc/layers/layer.h"
+
+namespace blimp {
+namespace client {
+
+namespace {
+class AuraImeDelegate : public ImeFeature::Delegate {
+ public:
+ ~AuraImeDelegate() override = default;
+ void OnShowImeRequested(
+ ui::TextInputType input_type,
+ const std::string& text,
+ const ImeFeature::ShowImeCallback& callback) override {
+ callback.Run("");
+ }
+
+ void OnHideImeRequested() override {}
+};
+} // namespace
+
+// static
+std::unique_ptr<BlimpContentsViewImpl> BlimpContentsViewImpl::Create(
+ BlimpContentsImpl* blimp_contents,
+ scoped_refptr<cc::Layer> contents_layer) {
+ return base::MakeUnique<BlimpContentsViewImplAura>(blimp_contents,
+ contents_layer);
+}
+
+BlimpContentsViewImplAura::BlimpContentsViewImplAura(
+ BlimpContentsImpl* blimp_contents,
+ scoped_refptr<cc::Layer> contents_layer)
+ : BlimpContentsViewImpl(blimp_contents, contents_layer),
+ ime_delegate_(base::MakeUnique<AuraImeDelegate>()) {}
+
+BlimpContentsViewImplAura::~BlimpContentsViewImplAura() = default;
+
+gfx::NativeView BlimpContentsViewImplAura::GetNativeView() {
+ return nullptr;
+}
+
+ImeFeature::Delegate* BlimpContentsViewImplAura::GetImeDelegate() {
+ return ime_delegate_.get();
+}
+
+} // namespace client
+} // namespace blimp

Powered by Google App Engine
This is Rietveld 408576698