Disable flaky AnimatedContentSamplerParameterizedTest.FrameTimestampsConvergeTowardsE...
[chromium-blink-merge.git] / ppapi / proxy / flash_menu_resource.h
blob23b74876236034715a5a8302780b417b403d07bb
1 // Copyright (c) 2012 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.
5 #ifndef PPAPI_PROXY_FLASH_MENU_RESOURCE_H_
6 #define PPAPI_PROXY_FLASH_MENU_RESOURCE_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "ppapi/proxy/plugin_resource.h"
11 #include "ppapi/shared_impl/tracked_callback.h"
12 #include "ppapi/thunk/ppb_flash_menu_api.h"
14 struct PP_Flash_Menu;
16 namespace ppapi {
17 namespace proxy {
19 class FlashMenuResource
20 : public PluginResource,
21 public thunk::PPB_Flash_Menu_API {
22 public:
23 // You must call Initialize after construction.
24 FlashMenuResource(Connection connection, PP_Instance instance);
25 ~FlashMenuResource() override;
27 // Returns true on success. False means that this object can not be used.
28 // This has to be separate from the constructor because the menu data could
29 // be invalid.
30 bool Initialize(const PP_Flash_Menu* menu_data);
32 // Resource overrides.
33 thunk::PPB_Flash_Menu_API* AsPPB_Flash_Menu_API() override;
35 // PPB_Flash_Menu_API.
36 int32_t Show(const PP_Point* location,
37 int32_t* selected_id,
38 scoped_refptr<TrackedCallback> callback) override;
40 private:
41 void OnReplyReceived(const proxy::ResourceMessageReplyParams& params,
42 const IPC::Message& msg) override;
44 void OnShowReply(
45 const proxy::ResourceMessageReplyParams& params,
46 int32_t selected_id);
48 int* selected_id_dest_;
49 scoped_refptr<TrackedCallback> callback_;
51 DISALLOW_COPY_AND_ASSIGN(FlashMenuResource);
54 } // namespace proxy
55 } // namespace ppapi
57 #endif // PPAPI_PROXY_FLASH_MENU_RESOURCE_H_