Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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. | |
| 4 | |
| 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_FLASH_MESSAGE_LOOP_IMPL_H_ | |
| 6 #define WEBKIT_PLUGINS_PPAPI_PPB_FLASH_MESSAGE_LOOP_IMPL_H_ | |
| 7 | |
| 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" | |
| 13 | |
| 14 namespace webkit { | |
| 15 namespace ppapi { | |
| 16 | |
| 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(); | |
| 22 | |
| 23 static PP_Resource Create(PP_Instance instance); | |
| 24 | |
| 25 // Resource. | |
| 26 virtual ::ppapi::thunk::PPB_Flash_MessageLoop_API* | |
| 27 AsPPB_Flash_MessageLoop_API() OVERRIDE; | |
| 28 | |
| 29 // PPB_Flash_MessageLoop_API implementation. | |
| 30 virtual int32_t Run() OVERRIDE; | |
| 31 virtual void Quit() OVERRIDE; | |
| 32 virtual void RunFromHostProxy(PP_CompletionCallback callback) OVERRIDE; | |
|
viettrungluu
2012/01/17 21:26:06
Would I be wrong in saying that this callback isn'
yzshen1
2012/01/18 07:43:35
:)
It is not strictly a PPAPI completion callback,
| |
| 33 | |
| 34 private: | |
| 35 class State; | |
| 36 | |
| 37 explicit PPB_Flash_MessageLoop_Impl(PP_Instance instance); | |
| 38 | |
| 39 int32_t InternalRun(PP_CompletionCallback callback); | |
| 40 void InternalQuit(int32_t result); | |
| 41 | |
| 42 scoped_refptr<State> state_; | |
| 43 | |
| 44 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_MessageLoop_Impl); | |
| 45 }; | |
| 46 | |
| 47 } // namespace ppapi | |
| 48 } // namespace webkit | |
| 49 | |
| 50 #endif // WEBKIT_PLUGINS_PPAPI_PPB_FLASH_MESSAGE_LOOP_IMPL_H_ | |
| OLD | NEW |