OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 provides the embedder's side of random webkit glue functions. | 5 // This file provides the embedder's side of random webkit glue functions. |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
10 #include <windows.h> | 10 #include <windows.h> |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 | 160 |
161 bool ClipboardIsFormatAvailable(const ui::Clipboard::FormatType& format, | 161 bool ClipboardIsFormatAvailable(const ui::Clipboard::FormatType& format, |
162 ui::Clipboard::Buffer buffer) { | 162 ui::Clipboard::Buffer buffer) { |
163 bool result; | 163 bool result; |
164 RenderThread::current()->Send( | 164 RenderThread::current()->Send( |
165 new ClipboardHostMsg_IsFormatAvailable(format, buffer, &result)); | 165 new ClipboardHostMsg_IsFormatAvailable(format, buffer, &result)); |
166 return result; | 166 return result; |
167 } | 167 } |
168 | 168 |
169 void ClipboardReadText(ui::Clipboard::Buffer buffer, string16* result) { | 169 void ClipboardReadText(ui::Clipboard::Buffer buffer, string16* result) { |
170 RenderThread::current()->Send(new ClipboardHostMsg_ReadText(buffer, result)); | 170 RenderThread::current()->Send(new ClipboardHostMsg_ReadText(buffer, |
| 171 result)); |
171 } | 172 } |
172 | 173 |
173 void ClipboardReadAsciiText(ui::Clipboard::Buffer buffer, std::string* result) { | 174 void ClipboardReadAsciiText(ui::Clipboard::Buffer buffer, std::string* result) { |
174 RenderThread::current()->Send( | 175 RenderThread::current()->Send(new ClipboardHostMsg_ReadAsciiText(buffer, |
175 new ClipboardHostMsg_ReadAsciiText(buffer, result)); | 176 result)); |
176 } | 177 } |
177 | 178 |
178 void ClipboardReadHTML(ui::Clipboard::Buffer buffer, string16* markup, | 179 void ClipboardReadHTML(ui::Clipboard::Buffer buffer, string16* markup, |
179 GURL* url) { | 180 GURL* url) { |
180 RenderThread::current()->Send( | 181 RenderThread::current()->Send(new ClipboardHostMsg_ReadHTML(buffer, |
181 new ClipboardHostMsg_ReadHTML(buffer, markup, url)); | 182 markup, url)); |
182 } | |
183 | |
184 void ClipboardReadImage(ui::Clipboard::Buffer buffer, std::string* data) { | |
185 RenderThread::current()->Send(new ClipboardHostMsg_ReadImage(buffer, data)); | |
186 } | 183 } |
187 | 184 |
188 bool ClipboardReadAvailableTypes(ui::Clipboard::Buffer buffer, | 185 bool ClipboardReadAvailableTypes(ui::Clipboard::Buffer buffer, |
189 std::vector<string16>* types, | 186 std::vector<string16>* types, |
190 bool* contains_filenames) { | 187 bool* contains_filenames) { |
191 bool result = false; | 188 bool result = false; |
192 RenderThread::current()->Send(new ClipboardHostMsg_ReadAvailableTypes( | 189 RenderThread::current()->Send(new ClipboardHostMsg_ReadAvailableTypes( |
193 buffer, &result, types, contains_filenames)); | 190 buffer, &result, types, contains_filenames)); |
194 return result; | 191 return result; |
195 } | 192 } |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 } | 306 } |
310 | 307 |
311 bool GetFontTable(int fd, uint32_t table, uint8_t* output, | 308 bool GetFontTable(int fd, uint32_t table, uint8_t* output, |
312 size_t* output_length) { | 309 size_t* output_length) { |
313 return renderer_sandbox_support::GetFontTable( | 310 return renderer_sandbox_support::GetFontTable( |
314 fd, table, output, output_length); | 311 fd, table, output, output_length); |
315 } | 312 } |
316 #endif | 313 #endif |
317 | 314 |
318 } // namespace webkit_glue | 315 } // namespace webkit_glue |
OLD | NEW |