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

Unified Diff: blimp/client/core/dummy_blimp_client_context.h

Issue 2132163002: Add BlimpClientContext and factory with real and dummy implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move-blimp-client-core-public-to-blimp-client
Patch Set: git merge origin/master before CQ for good measure Created 4 years, 5 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
« no previous file with comments | « blimp/client/core/blimp_contents_impl.h ('k') | blimp/client/core/dummy_blimp_client_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/client/core/dummy_blimp_client_context.h
diff --git a/blimp/client/core/dummy_blimp_client_context.h b/blimp/client/core/dummy_blimp_client_context.h
new file mode 100644
index 0000000000000000000000000000000000000000..ffba41cd0ff47730595ebfc8720a94de59db418b
--- /dev/null
+++ b/blimp/client/core/dummy_blimp_client_context.h
@@ -0,0 +1,49 @@
+// 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.
+
+#ifndef BLIMP_CLIENT_CORE_DUMMY_BLIMP_CLIENT_CONTEXT_H_
+#define BLIMP_CLIENT_CORE_DUMMY_BLIMP_CLIENT_CONTEXT_H_
+
+#include "base/macros.h"
+#include "base/supports_user_data.h"
+#include "blimp/client/public/blimp_client_context.h"
+#include "blimp/client/public/blimp_contents.h"
+
+#if defined(OS_ANDROID)
+#include "base/android/jni_android.h"
+#endif // defined(OS_ANDROID)
+
+namespace blimp {
+namespace client {
+
+#if defined(OS_ANDROID)
+class DummyBlimpClientContextAndroid;
+#endif // defined(OS_ANDROID)
+
+// A dummy implementation of the BlimpClientContext.
+class DummyBlimpClientContext : public BlimpClientContext,
+ base::SupportsUserData {
+ public:
+ DummyBlimpClientContext();
+ ~DummyBlimpClientContext() override;
+
+#if defined(OS_ANDROID)
+ DummyBlimpClientContextAndroid* GetDummyBlimpClientContextAndroid();
+#endif // defined(OS_ANDROID)
+
+// BlimpClientContext implementation.
+#if defined(OS_ANDROID)
+ base::android::ScopedJavaLocalRef<jobject> GetJavaObject() override;
+#endif // defined(OS_ANDROID)
+ void SetDelegate(BlimpClientContextDelegate* delegate) override;
+ std::unique_ptr<BlimpContents> CreateBlimpContents() override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(DummyBlimpClientContext);
+};
+
+} // namespace client
+} // namespace blimp
+
+#endif // BLIMP_CLIENT_CORE_DUMMY_BLIMP_CLIENT_CONTEXT_H_
« no previous file with comments | « blimp/client/core/blimp_contents_impl.h ('k') | blimp/client/core/dummy_blimp_client_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698