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 PPAPI_CPP_DEV_MESSAGE_LOOP_DEV_H_ | |
| 6 #define PPAPI_CPP_DEV_MESSAGE_LOOP_DEV_H_ | |
| 7 | |
| 8 #include "ppapi/cpp/resource.h" | |
| 9 | |
| 10 namespace pp { | |
| 11 | |
| 12 class CompletionCallback; | |
| 13 class Instance; | |
| 14 | |
| 15 class MessageLoop_Dev : public Resource { | |
| 16 public: | |
| 17 // Creates an is_null() MessageLoop resource. | |
| 18 MessageLoop_Dev(); | |
| 19 | |
| 20 // Creates a message loop associated with the given instance. The resource | |
| 21 // will be is_null() on failure. | |
| 22 MessageLoop_Dev(Instance* instance); | |
| 23 | |
| 24 // Constructors from an existing resource. | |
| 25 MessageLoop_Dev(const MessageLoop_Dev& other); | |
| 26 MessageLoop_Dev(PP_Resource pp_message_loop); | |
|
dmichael (off chromium)
2012/01/18 21:16:53
Is it worth noting that the MessageLoop_Dev takes
| |
| 27 | |
| 28 static MessageLoop_Dev GetForMainThread(); | |
| 29 static MessageLoop_Dev GetCurrent(); | |
| 30 | |
| 31 int32_t AttachToCurrentThread(); | |
| 32 int32_t Run(); | |
| 33 int32_t PostWork(const CompletionCallback& callback, | |
| 34 int64_t delay_ms = 0); | |
| 35 int32_t PostQuit(bool should_destroy); | |
|
dmichael (off chromium)
2012/01/18 21:16:53
you should adapt the comments from the C file, onc
| |
| 36 }; | |
| 37 | |
| 38 } // namespace pp | |
| 39 | |
| 40 #endif // PPAPI_CPP_DEV_MESSAGE_LOOP_DEV_H_ | |
| OLD | NEW |