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

Unified Diff: components/arc/clipboard/arc_clipboard_bridge.h

Issue 1495723004: Minimum implementation of ARC clipboard Bridge (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased and address review comments Created 4 years, 11 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 | « components/arc/clipboard/DEPS ('k') | components/arc/clipboard/arc_clipboard_bridge.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/clipboard/arc_clipboard_bridge.h
diff --git a/components/arc/clipboard/arc_clipboard_bridge.h b/components/arc/clipboard/arc_clipboard_bridge.h
new file mode 100644
index 0000000000000000000000000000000000000000..d458f63f07d92ba4f68266dcd220857fb6128b64
--- /dev/null
+++ b/components/arc/clipboard/arc_clipboard_bridge.h
@@ -0,0 +1,43 @@
+// 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 COMPONENTS_ARC_CLIPBOARD_ARC_CLIPBOARD_BRIDGE_H_
+#define COMPONENTS_ARC_CLIPBOARD_ARC_CLIPBOARD_BRIDGE_H_
+
+#include <string>
+
+#include "base/macros.h"
+#include "components/arc/arc_bridge_service.h"
+#include "mojo/public/cpp/bindings/binding.h"
+
+namespace arc {
+
+class ArcClipboardBridge : public ArcBridgeService::Observer,
+ public ClipboardHost {
+ public:
+ explicit ArcClipboardBridge(ArcBridgeService* bridge_service);
+ ~ArcClipboardBridge() override;
+
+ // ArcBridgeService::Observer overrides.
+ void OnClipboardInstanceReady() override;
+
+ // ClipboardHost overrides.
+ void SetTextContent(const mojo::String& text) override;
+ void GetTextContent() override;
+
+ private:
+ bool CalledOnValidThread();
+
+ ArcBridgeService* bridge_service_;
+
+ mojo::Binding<ClipboardHost> binding_;
+
+ base::ThreadChecker thread_checker_;
+
+ DISALLOW_COPY_AND_ASSIGN(ArcClipboardBridge);
+};
+
+} // namespace arc
+
+#endif // COMPONENTS_ARC_CLIPBOARD_ARC_CLIPBOARD_BRIDGE_H_
« no previous file with comments | « components/arc/clipboard/DEPS ('k') | components/arc/clipboard/arc_clipboard_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698