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_file_proxy.h" | 5 #include "ppapi/proxy/ppb_flash_file_proxy.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 static_cast<const PPB_Flash_File_ModuleLocal*>( | 518 static_cast<const PPB_Flash_File_ModuleLocal*>( |
519 dispatcher->local_get_interface()( | 519 dispatcher->local_get_interface()( |
520 PPB_FLASH_FILE_MODULELOCAL_INTERFACE)); | 520 PPB_FLASH_FILE_MODULELOCAL_INTERFACE)); |
521 } | 521 } |
522 } | 522 } |
523 | 523 |
524 PPB_Flash_File_ModuleLocal_Proxy::~PPB_Flash_File_ModuleLocal_Proxy() { | 524 PPB_Flash_File_ModuleLocal_Proxy::~PPB_Flash_File_ModuleLocal_Proxy() { |
525 } | 525 } |
526 | 526 |
527 // static | 527 // static |
528 const InterfaceProxy::Info* PPB_Flash_File_ModuleLocal_Proxy::GetInfo() { | 528 const PPB_Flash_File_ModuleLocal* |
529 static const Info info = { | 529 PPB_Flash_File_ModuleLocal_Proxy::GetInterface() { |
530 &flash_file_modulelocal_interface, | 530 return &flash_file_modulelocal_interface; |
531 PPB_FLASH_FILE_MODULELOCAL_INTERFACE, | |
532 API_ID_PPB_FLASH_FILE_MODULELOCAL, | |
533 true, | |
534 &CreateFlashFileModuleLocalProxy, | |
535 }; | |
536 return &info; | |
537 } | 531 } |
538 | 532 |
539 bool PPB_Flash_File_ModuleLocal_Proxy::OnMessageReceived( | 533 bool PPB_Flash_File_ModuleLocal_Proxy::OnMessageReceived( |
540 const IPC::Message& msg) { | 534 const IPC::Message& msg) { |
541 bool handled = true; | 535 bool handled = true; |
542 IPC_BEGIN_MESSAGE_MAP(PPB_Flash_File_ModuleLocal_Proxy, msg) | 536 IPC_BEGIN_MESSAGE_MAP(PPB_Flash_File_ModuleLocal_Proxy, msg) |
543 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFlashFile_ModuleLocal_OpenFile, | 537 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFlashFile_ModuleLocal_OpenFile, |
544 OnMsgOpenFile) | 538 OnMsgOpenFile) |
545 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFlashFile_ModuleLocal_RenameFile, | 539 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFlashFile_ModuleLocal_RenameFile, |
546 OnMsgRenameFile) | 540 OnMsgRenameFile) |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
685 if (!dispatcher->IsPlugin()) { | 679 if (!dispatcher->IsPlugin()) { |
686 ppb_flash_file_fileref_impl_ = static_cast<const PPB_Flash_File_FileRef*>( | 680 ppb_flash_file_fileref_impl_ = static_cast<const PPB_Flash_File_FileRef*>( |
687 dispatcher->local_get_interface()(PPB_FLASH_FILE_FILEREF_INTERFACE)); | 681 dispatcher->local_get_interface()(PPB_FLASH_FILE_FILEREF_INTERFACE)); |
688 } | 682 } |
689 } | 683 } |
690 | 684 |
691 PPB_Flash_File_FileRef_Proxy::~PPB_Flash_File_FileRef_Proxy() { | 685 PPB_Flash_File_FileRef_Proxy::~PPB_Flash_File_FileRef_Proxy() { |
692 } | 686 } |
693 | 687 |
694 // static | 688 // static |
695 const InterfaceProxy::Info* PPB_Flash_File_FileRef_Proxy::GetInfo() { | 689 const PPB_Flash_File_FileRef* PPB_Flash_File_FileRef_Proxy::GetInterface() { |
696 static const Info info = { | 690 return &flash_file_fileref_interface; |
697 &flash_file_fileref_interface, | |
698 PPB_FLASH_FILE_FILEREF_INTERFACE, | |
699 API_ID_PPB_FLASH_FILE_FILEREF, | |
700 true, | |
701 &CreateFlashFileFileRefProxy, | |
702 }; | |
703 return &info; | |
704 } | 691 } |
705 | 692 |
706 bool PPB_Flash_File_FileRef_Proxy::OnMessageReceived( | 693 bool PPB_Flash_File_FileRef_Proxy::OnMessageReceived( |
707 const IPC::Message& msg) { | 694 const IPC::Message& msg) { |
708 bool handled = true; | 695 bool handled = true; |
709 IPC_BEGIN_MESSAGE_MAP(PPB_Flash_File_FileRef_Proxy, msg) | 696 IPC_BEGIN_MESSAGE_MAP(PPB_Flash_File_FileRef_Proxy, msg) |
710 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFlashFile_FileRef_OpenFile, | 697 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFlashFile_FileRef_OpenFile, |
711 OnMsgOpenFile) | 698 OnMsgOpenFile) |
712 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFlashFile_FileRef_QueryFile, | 699 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFlashFile_FileRef_QueryFile, |
713 OnMsgQueryFile) | 700 OnMsgQueryFile) |
(...skipping 18 matching lines...) Expand all Loading... |
732 void PPB_Flash_File_FileRef_Proxy::OnMsgQueryFile( | 719 void PPB_Flash_File_FileRef_Proxy::OnMsgQueryFile( |
733 const HostResource& host_resource, | 720 const HostResource& host_resource, |
734 PP_FileInfo* info, | 721 PP_FileInfo* info, |
735 int32_t* result) { | 722 int32_t* result) { |
736 *result = ppb_flash_file_fileref_impl_->QueryFile( | 723 *result = ppb_flash_file_fileref_impl_->QueryFile( |
737 host_resource.host_resource(), info); | 724 host_resource.host_resource(), info); |
738 } | 725 } |
739 | 726 |
740 } // namespace proxy | 727 } // namespace proxy |
741 } // namespace ppapi | 728 } // namespace ppapi |
OLD | NEW |