| 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_proxy.h" | 5 #include "ppapi/proxy/ppb_flash_proxy.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/time.h" | 9 #include "base/time.h" |
| 10 #include "ppapi/c/dev/ppb_font_dev.h" | 10 #include "ppapi/c/dev/ppb_font_dev.h" |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 ppb_flash_impl_(NULL) { | 180 ppb_flash_impl_(NULL) { |
| 181 if (!dispatcher->IsPlugin()) | 181 if (!dispatcher->IsPlugin()) |
| 182 ppb_flash_impl_ = static_cast<const PPB_Flash*>( | 182 ppb_flash_impl_ = static_cast<const PPB_Flash*>( |
| 183 dispatcher->local_get_interface()(PPB_FLASH_INTERFACE)); | 183 dispatcher->local_get_interface()(PPB_FLASH_INTERFACE)); |
| 184 } | 184 } |
| 185 | 185 |
| 186 PPB_Flash_Proxy::~PPB_Flash_Proxy() { | 186 PPB_Flash_Proxy::~PPB_Flash_Proxy() { |
| 187 } | 187 } |
| 188 | 188 |
| 189 // static | 189 // static |
| 190 const InterfaceProxy::Info* PPB_Flash_Proxy::GetInfo() { | 190 const PPB_Flash* PPB_Flash_Proxy::GetInterface() { |
| 191 static const Info info = { | 191 return &flash_interface; |
| 192 &flash_interface, | |
| 193 PPB_FLASH_INTERFACE, | |
| 194 API_ID_PPB_FLASH, | |
| 195 true, | |
| 196 &CreateFlashProxy, | |
| 197 }; | |
| 198 return &info; | |
| 199 } | 192 } |
| 200 | 193 |
| 201 bool PPB_Flash_Proxy::OnMessageReceived(const IPC::Message& msg) { | 194 bool PPB_Flash_Proxy::OnMessageReceived(const IPC::Message& msg) { |
| 202 // Prevent the dispatcher from going away during a call to Navigate. | 195 // Prevent the dispatcher from going away during a call to Navigate. |
| 203 // This must happen OUTSIDE of OnMsgNavigate since the handling code use | 196 // This must happen OUTSIDE of OnMsgNavigate since the handling code use |
| 204 // the dispatcher upon return of the function (sending the reply message). | 197 // the dispatcher upon return of the function (sending the reply message). |
| 205 ScopedModuleReference death_grip(dispatcher()); | 198 ScopedModuleReference death_grip(dispatcher()); |
| 206 | 199 |
| 207 bool handled = true; | 200 bool handled = true; |
| 208 IPC_BEGIN_MESSAGE_MAP(PPB_Flash_Proxy, msg) | 201 IPC_BEGIN_MESSAGE_MAP(PPB_Flash_Proxy, msg) |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 } | 299 } |
| 307 | 300 |
| 308 void PPB_Flash_Proxy::OnMsgGetLocalTimeZoneOffset(PP_Instance instance, | 301 void PPB_Flash_Proxy::OnMsgGetLocalTimeZoneOffset(PP_Instance instance, |
| 309 PP_Time t, | 302 PP_Time t, |
| 310 double* result) { | 303 double* result) { |
| 311 *result = ppb_flash_impl_->GetLocalTimeZoneOffset(instance, t); | 304 *result = ppb_flash_impl_->GetLocalTimeZoneOffset(instance, t); |
| 312 } | 305 } |
| 313 | 306 |
| 314 } // namespace proxy | 307 } // namespace proxy |
| 315 } // namespace ppapi | 308 } // namespace ppapi |
| OLD | NEW |