Delete unused downloads page asset.
[chromium-blink-merge.git] / ppapi / proxy / ppb_flash_message_loop_proxy.h
bloba28bbda06135f6e4292dbb7be88628e6dd95df71
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_PPB_FLASH_MESSAGE_LOOP_PROXY_H_
6 #define PPAPI_PPB_FLASH_MESSAGE_LOOP_PROXY_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "base/memory/weak_ptr.h"
12 #include "ppapi/c/pp_instance.h"
13 #include "ppapi/c/pp_resource.h"
14 #include "ppapi/proxy/interface_proxy.h"
16 namespace IPC {
17 class Message;
20 namespace ppapi {
22 class HostResource;
24 namespace proxy {
26 class PPB_Flash_MessageLoop_Proxy
27 : public InterfaceProxy,
28 public base::SupportsWeakPtr<PPB_Flash_MessageLoop_Proxy> {
29 public:
30 explicit PPB_Flash_MessageLoop_Proxy(Dispatcher* dispatcher);
31 ~PPB_Flash_MessageLoop_Proxy() override;
33 static PP_Resource CreateProxyResource(PP_Instance instance);
35 // InterfaceProxy implementation.
36 bool OnMessageReceived(const IPC::Message& msg) override;
38 static const ApiID kApiID = API_ID_PPB_FLASH_MESSAGELOOP;
40 private:
41 void OnMsgCreate(PP_Instance instance, ppapi::HostResource* resource);
42 void OnMsgRun(const ppapi::HostResource& flash_message_loop,
43 IPC::Message* reply);
44 void OnMsgQuit(const ppapi::HostResource& flash_message_loop);
46 void WillQuitSoon(scoped_ptr<IPC::Message> reply_message, int32_t result);
48 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_MessageLoop_Proxy);
51 } // namespace proxy
52 } // namespace ppapi
54 #endif // PPAPI_PPB_FLASH_MESSAGE_LOOP_PROXY_H_