OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 // This file declares the ScopedClipboardWriter class, a wrapper around | 5 // This file declares the ScopedClipboardWriter class, a wrapper around |
6 // the Clipboard class which simplifies writing data to the system clipboard. | 6 // the Clipboard class which simplifies writing data to the system clipboard. |
7 // Upon deletion the class atomically writes all data to |clipboard_|, | 7 // Upon deletion the class atomically writes all data to |clipboard_|, |
8 // avoiding any potential race condition with other processes that are also | 8 // avoiding any potential race condition with other processes that are also |
9 // writing to the system clipboard. | 9 // writing to the system clipboard. |
10 #ifndef BASE_SCOPED_CLIPBOARD_WRITER_H_ | 10 |
11 #define BASE_SCOPED_CLIPBOARD_WRITER_H_ | 11 #ifndef APP_CLIPBOARD_SCOPED_CLIPBOARD_WRITER_H_ |
| 12 #define APP_CLIPBOARD_SCOPED_CLIPBOARD_WRITER_H_ |
12 | 13 |
13 #include <string> | 14 #include <string> |
14 #include <vector> | 15 #include <vector> |
15 | 16 |
16 #include "base/clipboard.h" | 17 #include "app/clipboard/clipboard.h" |
17 #include "base/file_path.h" | 18 #include "base/file_path.h" |
18 #include "base/string16.h" | 19 #include "base/string16.h" |
19 | 20 |
20 class Pickle; | 21 class Pickle; |
21 | 22 |
22 // This class is a wrapper for |Clipboard| that handles packing data | 23 // This class is a wrapper for |Clipboard| that handles packing data |
23 // into a Clipboard::ObjectMap. | 24 // into a Clipboard::ObjectMap. |
24 // NB: You should probably NOT be using this class if you include | 25 // NB: You should probably NOT be using this class if you include |
25 // webkit_glue.h. Use ScopedClipboardWriterGlue instead. | 26 // webkit_glue.h. Use ScopedClipboardWriterGlue instead. |
26 class ScopedClipboardWriter { | 27 class ScopedClipboardWriter { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 Clipboard* clipboard_; | 75 Clipboard* clipboard_; |
75 | 76 |
76 // We keep around the UTF-8 text of the URL in order to pass it to | 77 // We keep around the UTF-8 text of the URL in order to pass it to |
77 // Clipboard::DidWriteURL(). | 78 // Clipboard::DidWriteURL(). |
78 std::string url_text_; | 79 std::string url_text_; |
79 | 80 |
80 private: | 81 private: |
81 DISALLOW_COPY_AND_ASSIGN(ScopedClipboardWriter); | 82 DISALLOW_COPY_AND_ASSIGN(ScopedClipboardWriter); |
82 }; | 83 }; |
83 | 84 |
84 #endif // BASE_SCOPED_CLIPBOARD_WRITER_H_ | 85 #endif // APP_CLIPBOARD_SCOPED_CLIPBOARD_WRITER_H_ |
OLD | NEW |