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

Side by Side Diff: ppapi/proxy/ppb_flash_menu_proxy.h

Issue 6432001: Implement proxy for FlashMenu and Run/QuitMessageLoop (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef PPAPI_PPB_FLASH_MENU_PROXY_H_
6 #define PPAPI_PPB_FLASH_MENU_PROXY_H_
7
8 #include "ppapi/c/pp_point.h"
viettrungluu 2011/02/08 18:18:09 Nit: No need for this include; you can just forwar
piman 2011/02/15 02:11:22 Done.
9 #include "ppapi/proxy/interface_proxy.h"
10 #include "ppapi/proxy/plugin_resource.h"
11 #include "ppapi/proxy/proxy_non_thread_safe_ref_count.h"
12
13 struct PP_Flash_Menu;
14 struct PPB_Flash_Menu;
15
16 namespace pp {
17 namespace proxy {
18
19 class SerializedFlashMenu;
20
21 class PPB_Flash_Menu_Proxy : public InterfaceProxy {
22 public:
23 PPB_Flash_Menu_Proxy(Dispatcher* dispatcher, const void* target_interface);
24 virtual ~PPB_Flash_Menu_Proxy();
25
26 const PPB_Flash_Menu* ppb_flash_menu_target() const {
27 return static_cast<const PPB_Flash_Menu*>(target_interface());
28 }
29
30 // InterfaceProxy implementation.
31 virtual const void* GetSourceInterface() const;
32 virtual InterfaceID GetInterfaceId() const;
33 virtual bool OnMessageReceived(const IPC::Message& msg);
34
35 private:
36 struct ShowRequest;
37
38 void OnMsgCreate(PP_Instance instance_id,
39 const SerializedFlashMenu& menu_data,
40 HostResource* resource);
41 void OnMsgShow(const HostResource& menu,
42 const PP_Point& location);
43 void OnMsgShowACK(const HostResource& menu,
44 int32_t selected_id,
45 int32_t result);
46 void SendShowACKToPlugin(int32_t result, ShowRequest* request);
47
48 CompletionCallbackFactory<PPB_Flash_Menu_Proxy,
49 ProxyNonThreadSafeRefCount> callback_factory_;
50 };
51
52 } // namespace proxy
53 } // namespace pp
54
55 #endif // PPAPI_PPB_FLASH_MENU_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698