| 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, | 170 RenderThread::current()->Send(new ClipboardHostMsg_ReadText(buffer, result)); |
| 171 result)); | |
| 172 } | 171 } |
| 173 | 172 |
| 174 void ClipboardReadAsciiText(ui::Clipboard::Buffer buffer, std::string* result) { | 173 void ClipboardReadAsciiText(ui::Clipboard::Buffer buffer, std::string* result) { |
| 175 RenderThread::current()->Send(new ClipboardHostMsg_ReadAsciiText(buffer, | 174 RenderThread::current()->Send( |
| 176 result)); | 175 new ClipboardHostMsg_ReadAsciiText(buffer, result)); |
| 177 } | 176 } |
| 178 | 177 |
| 179 void ClipboardReadHTML(ui::Clipboard::Buffer buffer, string16* markup, | 178 void ClipboardReadHTML(ui::Clipboard::Buffer buffer, string16* markup, |
| 180 GURL* url) { | 179 GURL* url) { |
| 181 RenderThread::current()->Send(new ClipboardHostMsg_ReadHTML(buffer, | 180 RenderThread::current()->Send( |
| 182 markup, url)); | 181 new ClipboardHostMsg_ReadHTML(buffer, markup, url)); |
| 182 } |
| 183 |
| 184 void ClipboardReadImage(ui::Clipboard::Buffer buffer, std::string* data) { |
| 185 RenderThread::current()->Send(new ClipboardHostMsg_ReadImage(buffer, data)); |
| 183 } | 186 } |
| 184 | 187 |
| 185 bool ClipboardReadAvailableTypes(ui::Clipboard::Buffer buffer, | 188 bool ClipboardReadAvailableTypes(ui::Clipboard::Buffer buffer, |
| 186 std::vector<string16>* types, | 189 std::vector<string16>* types, |
| 187 bool* contains_filenames) { | 190 bool* contains_filenames) { |
| 188 bool result = false; | 191 bool result = false; |
| 189 RenderThread::current()->Send(new ClipboardHostMsg_ReadAvailableTypes( | 192 RenderThread::current()->Send(new ClipboardHostMsg_ReadAvailableTypes( |
| 190 buffer, &result, types, contains_filenames)); | 193 buffer, &result, types, contains_filenames)); |
| 191 return result; | 194 return result; |
| 192 } | 195 } |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 } | 309 } |
| 307 | 310 |
| 308 bool GetFontTable(int fd, uint32_t table, uint8_t* output, | 311 bool GetFontTable(int fd, uint32_t table, uint8_t* output, |
| 309 size_t* output_length) { | 312 size_t* output_length) { |
| 310 return renderer_sandbox_support::GetFontTable( | 313 return renderer_sandbox_support::GetFontTable( |
| 311 fd, table, output, output_length); | 314 fd, table, output, output_length); |
| 312 } | 315 } |
| 313 #endif | 316 #endif |
| 314 | 317 |
| 315 } // namespace webkit_glue | 318 } // namespace webkit_glue |
| OLD | NEW |