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

Side by Side Diff: components/arc/clipboard/arc_clipboard_bridge.h

Issue 2496973002: arc: Partially migrate mojo types (Closed)
Patch Set: Fixed nit Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « components/arc/BUILD.gn ('k') | components/arc/clipboard/arc_clipboard_bridge.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_ARC_CLIPBOARD_ARC_CLIPBOARD_BRIDGE_H_ 5 #ifndef COMPONENTS_ARC_CLIPBOARD_ARC_CLIPBOARD_BRIDGE_H_
6 #define COMPONENTS_ARC_CLIPBOARD_ARC_CLIPBOARD_BRIDGE_H_ 6 #define COMPONENTS_ARC_CLIPBOARD_ARC_CLIPBOARD_BRIDGE_H_
7 7
8 #include <string>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "components/arc/arc_service.h" 11 #include "components/arc/arc_service.h"
10 #include "components/arc/common/clipboard.mojom.h" 12 #include "components/arc/common/clipboard.mojom.h"
11 #include "components/arc/instance_holder.h" 13 #include "components/arc/instance_holder.h"
12 #include "mojo/public/cpp/bindings/binding.h" 14 #include "mojo/public/cpp/bindings/binding.h"
13 #include "mojo/public/cpp/bindings/string.h"
14 15
15 namespace arc { 16 namespace arc {
16 17
17 class ArcClipboardBridge 18 class ArcClipboardBridge
18 : public ArcService, 19 : public ArcService,
19 public InstanceHolder<mojom::ClipboardInstance>::Observer, 20 public InstanceHolder<mojom::ClipboardInstance>::Observer,
20 public mojom::ClipboardHost { 21 public mojom::ClipboardHost {
21 public: 22 public:
22 explicit ArcClipboardBridge(ArcBridgeService* bridge_service); 23 explicit ArcClipboardBridge(ArcBridgeService* bridge_service);
23 ~ArcClipboardBridge() override; 24 ~ArcClipboardBridge() override;
24 25
25 // InstanceHolder<mojom::ClipboardInstance>::Observer overrides. 26 // InstanceHolder<mojom::ClipboardInstance>::Observer overrides.
26 void OnInstanceReady() override; 27 void OnInstanceReady() override;
27 28
28 // mojom::ClipboardHost overrides. 29 // mojom::ClipboardHost overrides.
29 void SetTextContent(const mojo::String& text) override; 30 void SetTextContent(const std::string& text) override;
30 void GetTextContent() override; 31 void GetTextContent() override;
31 32
32 private: 33 private:
33 bool CalledOnValidThread(); 34 bool CalledOnValidThread();
34 35
35 mojo::Binding<mojom::ClipboardHost> binding_; 36 mojo::Binding<mojom::ClipboardHost> binding_;
36 37
37 base::ThreadChecker thread_checker_; 38 base::ThreadChecker thread_checker_;
38 39
39 DISALLOW_COPY_AND_ASSIGN(ArcClipboardBridge); 40 DISALLOW_COPY_AND_ASSIGN(ArcClipboardBridge);
40 }; 41 };
41 42
42 } // namespace arc 43 } // namespace arc
43 44
44 #endif // COMPONENTS_ARC_CLIPBOARD_ARC_CLIPBOARD_BRIDGE_H_ 45 #endif // COMPONENTS_ARC_CLIPBOARD_ARC_CLIPBOARD_BRIDGE_H_
OLDNEW
« no previous file with comments | « components/arc/BUILD.gn ('k') | components/arc/clipboard/arc_clipboard_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698