OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "webkit/glue/webkit_glue.h" | 5 #include "webkit/glue/webkit_glue.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/string16.h" | 10 #include "base/string16.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 } | 45 } |
46 | 46 |
47 void ClipboardReadHTML(ui::Clipboard::Buffer buffer, string16* markup, | 47 void ClipboardReadHTML(ui::Clipboard::Buffer buffer, string16* markup, |
48 GURL* url) { | 48 GURL* url) { |
49 std::string url_str; | 49 std::string url_str; |
50 ClipboardGetClipboard()->ReadHTML(buffer, markup, url ? &url_str : NULL); | 50 ClipboardGetClipboard()->ReadHTML(buffer, markup, url ? &url_str : NULL); |
51 if (url) | 51 if (url) |
52 *url = GURL(url_str); | 52 *url = GURL(url_str); |
53 } | 53 } |
54 | 54 |
| 55 void ClipboardReadImage(ui::Clipboard::Buffer buffer, std::string* data) { |
| 56 ClipboardGetClipboard()->ReadImage(buffer, data); |
| 57 } |
| 58 |
55 // TODO(dcheng): Implement. | 59 // TODO(dcheng): Implement. |
56 bool ClipboardReadAvailableTypes(ui::Clipboard::Buffer buffer, | 60 bool ClipboardReadAvailableTypes(ui::Clipboard::Buffer buffer, |
57 std::vector<string16>* types, | 61 std::vector<string16>* types, |
58 bool* contains_filenames) { | 62 bool* contains_filenames) { |
59 return false; | 63 return false; |
60 } | 64 } |
61 | 65 |
62 bool ClipboardReadData(ui::Clipboard::Buffer buffer, const string16& type, | 66 bool ClipboardReadData(ui::Clipboard::Buffer buffer, const string16& type, |
63 string16* data, string16* metadata) { | 67 string16* data, string16* metadata) { |
64 return false; | 68 return false; |
65 } | 69 } |
66 | 70 |
67 bool ClipboardReadFilenames(ui::Clipboard::Buffer buffer, | 71 bool ClipboardReadFilenames(ui::Clipboard::Buffer buffer, |
68 std::vector<string16>* filenames) { | 72 std::vector<string16>* filenames) { |
69 return false; | 73 return false; |
70 } | 74 } |
71 | 75 |
72 } // namespace webkit_glue | 76 } // namespace webkit_glue |
OLD | NEW |