| 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 #include "components/clipboard/clipboard_standalone_impl.h" | 5 #include "components/clipboard/clipboard_standalone_impl.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include "third_party/mojo/src/mojo/public/cpp/bindings/array.h" | 9 #include "mojo/public/cpp/bindings/array.h" |
| 10 #include "third_party/mojo/src/mojo/public/cpp/bindings/callback.h" | 10 #include "mojo/public/cpp/bindings/callback.h" |
| 11 #include "third_party/mojo/src/mojo/public/cpp/bindings/string.h" | 11 #include "mojo/public/cpp/bindings/string.h" |
| 12 | 12 |
| 13 using mojo::Array; | 13 using mojo::Array; |
| 14 using mojo::Map; | 14 using mojo::Map; |
| 15 using mojo::String; | 15 using mojo::String; |
| 16 | 16 |
| 17 namespace clipboard { | 17 namespace clipboard { |
| 18 | 18 |
| 19 // ClipboardData contains data copied to the Clipboard for a variety of formats. | 19 // ClipboardData contains data copied to the Clipboard for a variety of formats. |
| 20 // It mostly just provides APIs to cleanly access and manipulate this data. | 20 // It mostly just provides APIs to cleanly access and manipulate this data. |
| 21 class ClipboardStandaloneImpl::ClipboardData { | 21 class ClipboardStandaloneImpl::ClipboardData { |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 } | 80 } |
| 81 | 81 |
| 82 void ClipboardStandaloneImpl::WriteClipboardData( | 82 void ClipboardStandaloneImpl::WriteClipboardData( |
| 83 Clipboard::Type clipboard_type, | 83 Clipboard::Type clipboard_type, |
| 84 Map<String, Array<uint8_t>> data) { | 84 Map<String, Array<uint8_t>> data) { |
| 85 sequence_number_[clipboard_type]++; | 85 sequence_number_[clipboard_type]++; |
| 86 clipboard_state_[clipboard_type]->SetData(data.Pass()); | 86 clipboard_state_[clipboard_type]->SetData(data.Pass()); |
| 87 } | 87 } |
| 88 | 88 |
| 89 } // namespace clipboard | 89 } // namespace clipboard |
| OLD | NEW |