Disable content detection tests on Android
[chromium-blink-merge.git] / webkit / plugins / ppapi / ppb_flash_message_loop_impl.h
blob1349a52eafcd79b7b28f2cef4f3a7f644eacca64
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 WEBKIT_PLUGINS_PPAPI_PPB_FLASH_MESSAGE_LOOP_IMPL_H_
6 #define WEBKIT_PLUGINS_PPAPI_PPB_FLASH_MESSAGE_LOOP_IMPL_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "base/memory/ref_counted.h"
11 #include "ppapi/shared_impl/resource.h"
12 #include "ppapi/thunk/ppb_flash_message_loop_api.h"
14 namespace webkit {
15 namespace ppapi {
17 class PPB_Flash_MessageLoop_Impl
18 : public ::ppapi::Resource,
19 public ::ppapi::thunk::PPB_Flash_MessageLoop_API {
20 public:
21 virtual ~PPB_Flash_MessageLoop_Impl();
23 static PP_Resource Create(PP_Instance instance);
25 // Resource.
26 virtual ::ppapi::thunk::PPB_Flash_MessageLoop_API*
27 AsPPB_Flash_MessageLoop_API() OVERRIDE;
29 // PPB_Flash_MessageLoop_API implementation.
30 virtual int32_t Run() OVERRIDE;
31 virtual void Quit() OVERRIDE;
32 virtual void RunFromHostProxy(
33 const RunFromHostProxyCallback& callback) OVERRIDE;
35 private:
36 class State;
38 explicit PPB_Flash_MessageLoop_Impl(PP_Instance instance);
40 // If |callback| is valid, it will be called when the message loop is signaled
41 // to quit, and the result passed into it will be the same value as what this
42 // method returns.
43 // Please note that |callback| happens before this method returns.
44 int32_t InternalRun(const RunFromHostProxyCallback& callback);
45 void InternalQuit(int32_t result);
47 scoped_refptr<State> state_;
49 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_MessageLoop_Impl);
52 } // namespace ppapi
53 } // namespace webkit
55 #endif // WEBKIT_PLUGINS_PPAPI_PPB_FLASH_MESSAGE_LOOP_IMPL_H_