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