| 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 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_FLASH_MENU_IMPL_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_FLASH_MENU_IMPL_H_ |
| 6 #define WEBKIT_PLUGINS_PPAPI_PPB_FLASH_MENU_IMPL_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPB_FLASH_MENU_IMPL_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "ppapi/c/pp_point.h" | 12 #include "ppapi/c/pp_point.h" |
| 13 #include "ppapi/c/private/ppb_flash_menu.h" | 13 #include "ppapi/c/private/ppb_flash_menu.h" |
| 14 #include "ppapi/thunk/ppb_flash_menu_api.h" |
| 14 #include "webkit/plugins/ppapi/callbacks.h" | 15 #include "webkit/plugins/ppapi/callbacks.h" |
| 15 #include "webkit/plugins/ppapi/resource.h" | 16 #include "webkit/plugins/ppapi/resource.h" |
| 16 | 17 |
| 17 struct WebMenuItem; | 18 struct WebMenuItem; |
| 18 | 19 |
| 19 namespace webkit { | 20 namespace webkit { |
| 20 namespace ppapi { | 21 namespace ppapi { |
| 21 | 22 |
| 22 class PPB_Flash_Menu_Impl : public Resource { | 23 class PPB_Flash_Menu_Impl : public Resource, |
| 24 public ::ppapi::thunk::PPB_Flash_Menu_API { |
| 23 public: | 25 public: |
| 24 explicit PPB_Flash_Menu_Impl(PluginInstance* instance); | 26 explicit PPB_Flash_Menu_Impl(PluginInstance* instance); |
| 25 virtual ~PPB_Flash_Menu_Impl(); | 27 virtual ~PPB_Flash_Menu_Impl(); |
| 26 | 28 |
| 27 static const PPB_Flash_Menu* GetInterface(); | 29 static PP_Resource Create(PP_Instance instance, |
| 30 const PP_Flash_Menu* menu_data); |
| 28 | 31 |
| 29 bool Init(const PP_Flash_Menu* menu_data); | 32 bool Init(const PP_Flash_Menu* menu_data); |
| 30 | 33 |
| 31 // Resource override. | 34 // ResourceObjectBase. |
| 32 virtual PPB_Flash_Menu_Impl* AsPPB_Flash_Menu_Impl(); | 35 virtual ::ppapi::thunk::PPB_Flash_Menu_API* AsPPB_Flash_Menu_API() OVERRIDE; |
| 33 | 36 |
| 34 // PPB_Flash_Menu implementation. | 37 // PPB_Flash_Menu implementation. |
| 35 int32_t Show(const PP_Point* location, | 38 int32_t Show(const PP_Point* location, |
| 36 int32_t* selected_id_out, | 39 int32_t* selected_id_out, |
| 37 PP_CompletionCallback callback); | 40 PP_CompletionCallback callback); |
| 38 | 41 |
| 39 // Called to complete |Show()|. | 42 // Called to complete |Show()|. |
| 40 void CompleteShow(int32_t result, unsigned action); | 43 void CompleteShow(int32_t result, unsigned action); |
| 41 | 44 |
| 42 typedef std::vector<WebMenuItem> MenuData; | 45 typedef std::vector<WebMenuItem> MenuData; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 56 // Output buffers to be filled in when the callback is completed successfully. | 59 // Output buffers to be filled in when the callback is completed successfully. |
| 57 int32_t* selected_id_out_; | 60 int32_t* selected_id_out_; |
| 58 | 61 |
| 59 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_Menu_Impl); | 62 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_Menu_Impl); |
| 60 }; | 63 }; |
| 61 | 64 |
| 62 } // namespace ppapi | 65 } // namespace ppapi |
| 63 } // namespace webkit | 66 } // namespace webkit |
| 64 | 67 |
| 65 #endif // WEBKIT_PLUGINS_PPAPI_PPB_FLASH_MENU_IMPL_H_ | 68 #endif // WEBKIT_PLUGINS_PPAPI_PPB_FLASH_MENU_IMPL_H_ |
| OLD | NEW |