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

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

Issue 1596663002: arc-bridge: Introduce the ArcService class (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: Rebased + protected ArcService direct instantiation 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 unified diff | Download patch
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> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "components/arc/arc_bridge_service.h" 11 #include "components/arc/arc_bridge_service.h"
12 #include "components/arc/arc_service.h"
12 #include "mojo/public/cpp/bindings/binding.h" 13 #include "mojo/public/cpp/bindings/binding.h"
13 14
14 namespace arc { 15 namespace arc {
15 16
16 class ArcClipboardBridge : public ArcBridgeService::Observer, 17 class ArcClipboardBridge : public ArcService,
18 public ArcBridgeService::Observer,
17 public ClipboardHost { 19 public ClipboardHost {
18 public: 20 public:
19 explicit ArcClipboardBridge(ArcBridgeService* bridge_service); 21 explicit ArcClipboardBridge(ArcBridgeService* bridge_service);
20 ~ArcClipboardBridge() override; 22 ~ArcClipboardBridge() override;
21 23
22 // ArcBridgeService::Observer overrides. 24 // ArcBridgeService::Observer overrides.
23 void OnClipboardInstanceReady() override; 25 void OnClipboardInstanceReady() override;
24 26
25 // ClipboardHost overrides. 27 // ClipboardHost overrides.
26 void SetTextContent(const mojo::String& text) override; 28 void SetTextContent(const mojo::String& text) override;
27 void GetTextContent() override; 29 void GetTextContent() override;
28 30
29 private: 31 private:
30 bool CalledOnValidThread(); 32 bool CalledOnValidThread();
31 33
32 ArcBridgeService* bridge_service_;
33
34 mojo::Binding<ClipboardHost> binding_; 34 mojo::Binding<ClipboardHost> binding_;
35 35
36 base::ThreadChecker thread_checker_; 36 base::ThreadChecker thread_checker_;
37 37
38 DISALLOW_COPY_AND_ASSIGN(ArcClipboardBridge); 38 DISALLOW_COPY_AND_ASSIGN(ArcClipboardBridge);
39 }; 39 };
40 40
41 } // namespace arc 41 } // namespace arc
42 42
43 #endif // COMPONENTS_ARC_CLIPBOARD_ARC_CLIPBOARD_BRIDGE_H_ 43 #endif // COMPONENTS_ARC_CLIPBOARD_ARC_CLIPBOARD_BRIDGE_H_
OLDNEW
« no previous file with comments | « components/arc/auth/arc_auth_service.h ('k') | components/arc/clipboard/arc_clipboard_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698