| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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" |
| 11 #include "ppapi/proxy/serialized_var.h" | 11 #include "ppapi/proxy/serialized_var.h" |
| 12 | 12 |
| 13 namespace pp { | 13 namespace ppapi { |
| 14 namespace proxy { | 14 namespace proxy { |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 bool IsValidClipboardType(PP_Flash_Clipboard_Type clipboard_type) { | 18 bool IsValidClipboardType(PP_Flash_Clipboard_Type clipboard_type) { |
| 19 return clipboard_type == PP_FLASH_CLIPBOARD_TYPE_STANDARD || | 19 return clipboard_type == PP_FLASH_CLIPBOARD_TYPE_STANDARD || |
| 20 clipboard_type == PP_FLASH_CLIPBOARD_TYPE_SELECTION || | 20 clipboard_type == PP_FLASH_CLIPBOARD_TYPE_SELECTION || |
| 21 clipboard_type == PP_FLASH_CLIPBOARD_TYPE_DRAG; | 21 clipboard_type == PP_FLASH_CLIPBOARD_TYPE_DRAG; |
| 22 } | 22 } |
| 23 | 23 |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 int clipboard_type, | 155 int clipboard_type, |
| 156 SerializedVarReceiveInput text) { | 156 SerializedVarReceiveInput text) { |
| 157 int32_t result = ppb_flash_clipboard_target()->WritePlainText( | 157 int32_t result = ppb_flash_clipboard_target()->WritePlainText( |
| 158 instance_id, | 158 instance_id, |
| 159 static_cast<PP_Flash_Clipboard_Type>(clipboard_type), | 159 static_cast<PP_Flash_Clipboard_Type>(clipboard_type), |
| 160 text.Get(dispatcher())); | 160 text.Get(dispatcher())); |
| 161 LOG_IF(WARNING, result != PP_OK) << "Write to clipboard failed unexpectedly."; | 161 LOG_IF(WARNING, result != PP_OK) << "Write to clipboard failed unexpectedly."; |
| 162 } | 162 } |
| 163 | 163 |
| 164 } // namespace proxy | 164 } // namespace proxy |
| 165 } // namespace pp | 165 } // namespace ppapi |
| OLD | NEW |