Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Side by Side Diff: ppapi/proxy/ppb_flash_clipboard_proxy.cc

Issue 8359010: Convert the Flash interfaces to no longer use GetInfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comment Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/ppb_flash_clipboard_proxy.h ('k') | ppapi/proxy/ppb_flash_file_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 if (!dispatcher->IsPlugin()) { 100 if (!dispatcher->IsPlugin()) {
101 ppb_flash_clipboard_impl_ = static_cast<const PPB_Flash_Clipboard*>( 101 ppb_flash_clipboard_impl_ = static_cast<const PPB_Flash_Clipboard*>(
102 dispatcher->local_get_interface()(PPB_FLASH_CLIPBOARD_INTERFACE)); 102 dispatcher->local_get_interface()(PPB_FLASH_CLIPBOARD_INTERFACE));
103 } 103 }
104 } 104 }
105 105
106 PPB_Flash_Clipboard_Proxy::~PPB_Flash_Clipboard_Proxy() { 106 PPB_Flash_Clipboard_Proxy::~PPB_Flash_Clipboard_Proxy() {
107 } 107 }
108 108
109 // static 109 // static
110 const InterfaceProxy::Info* PPB_Flash_Clipboard_Proxy::GetInfo() { 110 const PPB_Flash_Clipboard* PPB_Flash_Clipboard_Proxy::GetInterface() {
111 static const Info info = { 111 return &flash_clipboard_interface;
112 &flash_clipboard_interface,
113 PPB_FLASH_CLIPBOARD_INTERFACE,
114 API_ID_PPB_FLASH_CLIPBOARD,
115 false,
116 &CreateFlashClipboardProxy
117 };
118 return &info;
119 } 112 }
120 113
121 bool PPB_Flash_Clipboard_Proxy::OnMessageReceived(const IPC::Message& msg) { 114 bool PPB_Flash_Clipboard_Proxy::OnMessageReceived(const IPC::Message& msg) {
122 bool handled = true; 115 bool handled = true;
123 IPC_BEGIN_MESSAGE_MAP(PPB_Flash_Clipboard_Proxy, msg) 116 IPC_BEGIN_MESSAGE_MAP(PPB_Flash_Clipboard_Proxy, msg)
124 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFlashClipboard_IsFormatAvailable, 117 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFlashClipboard_IsFormatAvailable,
125 OnMsgIsFormatAvailable) 118 OnMsgIsFormatAvailable)
126 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFlashClipboard_ReadPlainText, 119 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFlashClipboard_ReadPlainText,
127 OnMsgReadPlainText) 120 OnMsgReadPlainText)
128 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFlashClipboard_WritePlainText, 121 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFlashClipboard_WritePlainText,
(...skipping 30 matching lines...) Expand all
159 SerializedVarReceiveInput text) { 152 SerializedVarReceiveInput text) {
160 int32_t result = ppb_flash_clipboard_impl_->WritePlainText( 153 int32_t result = ppb_flash_clipboard_impl_->WritePlainText(
161 instance_id, 154 instance_id,
162 static_cast<PP_Flash_Clipboard_Type>(clipboard_type), 155 static_cast<PP_Flash_Clipboard_Type>(clipboard_type),
163 text.Get(dispatcher())); 156 text.Get(dispatcher()));
164 LOG_IF(WARNING, result != PP_OK) << "Write to clipboard failed unexpectedly."; 157 LOG_IF(WARNING, result != PP_OK) << "Write to clipboard failed unexpectedly.";
165 } 158 }
166 159
167 } // namespace proxy 160 } // namespace proxy
168 } // namespace ppapi 161 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_flash_clipboard_proxy.h ('k') | ppapi/proxy/ppb_flash_file_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698