OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CLIPBOARD_CLIPBOARD_STANDALONE_IMPL_H_ | 5 #ifndef COMPONENTS_CLIPBOARD_CLIPBOARD_STANDALONE_IMPL_H_ |
6 #define COMPONENTS_CLIPBOARD_CLIPBOARD_STANDALONE_IMPL_H_ | 6 #define COMPONENTS_CLIPBOARD_CLIPBOARD_STANDALONE_IMPL_H_ |
7 | 7 |
8 #include <base/memory/scoped_ptr.h> | 8 #include <base/memory/scoped_ptr.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "components/clipboard/public/interfaces/clipboard.mojom.h" | 11 #include "components/clipboard/public/interfaces/clipboard.mojom.h" |
12 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h" | 12 #include "mojo/public/cpp/bindings/strong_binding.h" |
13 | 13 |
14 namespace clipboard { | 14 namespace clipboard { |
15 | 15 |
16 // Stub clipboard implementation. | 16 // Stub clipboard implementation. |
17 // | 17 // |
18 // Eventually, we'll actually want to interact with the system clipboard, but | 18 // Eventually, we'll actually want to interact with the system clipboard, but |
19 // that's hard today because the system clipboard is asynchronous (on X11), the | 19 // that's hard today because the system clipboard is asynchronous (on X11), the |
20 // ui::Clipboard interface is synchronous (which is what we'd use), mojo is | 20 // ui::Clipboard interface is synchronous (which is what we'd use), mojo is |
21 // asynchronous across processes, and the WebClipboard interface is synchronous | 21 // asynchronous across processes, and the WebClipboard interface is synchronous |
22 // (which is at least tractable). | 22 // (which is at least tractable). |
(...skipping 30 matching lines...) Expand all Loading... |
53 // The current clipboard state. This is what is read from. | 53 // The current clipboard state. This is what is read from. |
54 scoped_ptr<ClipboardData> clipboard_state_[kNumClipboards]; | 54 scoped_ptr<ClipboardData> clipboard_state_[kNumClipboards]; |
55 mojo::StrongBinding<mojo::Clipboard> binding_; | 55 mojo::StrongBinding<mojo::Clipboard> binding_; |
56 | 56 |
57 DISALLOW_COPY_AND_ASSIGN(ClipboardStandaloneImpl); | 57 DISALLOW_COPY_AND_ASSIGN(ClipboardStandaloneImpl); |
58 }; | 58 }; |
59 | 59 |
60 } // namespace clipboard | 60 } // namespace clipboard |
61 | 61 |
62 #endif // COMPONENTS_CLIPBOARD_CLIPBOARD_STANDALONE_IMPL_H_ | 62 #endif // COMPONENTS_CLIPBOARD_CLIPBOARD_STANDALONE_IMPL_H_ |
OLD | NEW |