| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ppapi/proxy/ppb_flash_clipboard_proxy.h" | 5 #include "ppapi/proxy/ppb_flash_clipboard_proxy.h" |
| 6 | 6 |
| 7 #include "ppapi/c/pp_errors.h" | 7 #include "ppapi/c/pp_errors.h" |
| 8 #include "ppapi/c/private/ppb_flash_clipboard.h" | 8 #include "ppapi/c/private/ppb_flash_clipboard.h" |
| 9 #include "ppapi/proxy/plugin_dispatcher.h" | 9 #include "ppapi/proxy/plugin_dispatcher.h" |
| 10 #include "ppapi/proxy/ppapi_messages.h" | 10 #include "ppapi/proxy/ppapi_messages.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 EnterFlashClipboardNoLock; | 22 EnterFlashClipboardNoLock; |
| 23 | 23 |
| 24 bool IsValidClipboardType(PP_Flash_Clipboard_Type clipboard_type) { | 24 bool IsValidClipboardType(PP_Flash_Clipboard_Type clipboard_type) { |
| 25 return clipboard_type == PP_FLASH_CLIPBOARD_TYPE_STANDARD || | 25 return clipboard_type == PP_FLASH_CLIPBOARD_TYPE_STANDARD || |
| 26 clipboard_type == PP_FLASH_CLIPBOARD_TYPE_SELECTION; | 26 clipboard_type == PP_FLASH_CLIPBOARD_TYPE_SELECTION; |
| 27 } | 27 } |
| 28 | 28 |
| 29 bool IsValidClipboardFormat(PP_Flash_Clipboard_Format format) { | 29 bool IsValidClipboardFormat(PP_Flash_Clipboard_Format format) { |
| 30 // Purposely excludes |PP_FLASH_CLIPBOARD_FORMAT_INVALID|. | 30 // Purposely excludes |PP_FLASH_CLIPBOARD_FORMAT_INVALID|. |
| 31 return format == PP_FLASH_CLIPBOARD_FORMAT_PLAINTEXT || | 31 return format == PP_FLASH_CLIPBOARD_FORMAT_PLAINTEXT || |
| 32 format == PP_FLASH_CLIPBOARD_FORMAT_HTML; | 32 format == PP_FLASH_CLIPBOARD_FORMAT_HTML || |
| 33 format == PP_FLASH_CLIPBOARD_FORMAT_RTF; |
| 33 } | 34 } |
| 34 | 35 |
| 35 } // namespace | 36 } // namespace |
| 36 | 37 |
| 37 PPB_Flash_Clipboard_Proxy::PPB_Flash_Clipboard_Proxy(Dispatcher* dispatcher) | 38 PPB_Flash_Clipboard_Proxy::PPB_Flash_Clipboard_Proxy(Dispatcher* dispatcher) |
| 38 : InterfaceProxy(dispatcher) { | 39 : InterfaceProxy(dispatcher) { |
| 39 } | 40 } |
| 40 | 41 |
| 41 PPB_Flash_Clipboard_Proxy::~PPB_Flash_Clipboard_Proxy() { | 42 PPB_Flash_Clipboard_Proxy::~PPB_Flash_Clipboard_Proxy() { |
| 42 } | 43 } |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 formats_array.get(), | 175 formats_array.get(), |
| 175 data_items_array); | 176 data_items_array); |
| 176 DLOG_IF(WARNING, result != PP_OK) | 177 DLOG_IF(WARNING, result != PP_OK) |
| 177 << "Write to clipboard failed unexpectedly."; | 178 << "Write to clipboard failed unexpectedly."; |
| 178 (void)result; // Prevent warning in release mode. | 179 (void)result; // Prevent warning in release mode. |
| 179 } | 180 } |
| 180 } | 181 } |
| 181 | 182 |
| 182 } // namespace proxy | 183 } // namespace proxy |
| 183 } // namespace ppapi | 184 } // namespace ppapi |
| OLD | NEW |