OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ppapi/proxy/ppb_message_loop_proxy.h" | 5 #include "ppapi/proxy/ppb_message_loop_proxy.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 79 |
80 // Since we allow tasks to be posted before the message loop is actually | 80 // Since we allow tasks to be posted before the message loop is actually |
81 // created (when it's associated with a thread), we keep tasks posted here | 81 // created (when it's associated with a thread), we keep tasks posted here |
82 // until that happens. Once the loop_ is created, this is unused. | 82 // until that happens. Once the loop_ is created, this is unused. |
83 std::vector<TaskInfo> pending_tasks_; | 83 std::vector<TaskInfo> pending_tasks_; |
84 | 84 |
85 DISALLOW_COPY_AND_ASSIGN(MessageLoopResource); | 85 DISALLOW_COPY_AND_ASSIGN(MessageLoopResource); |
86 }; | 86 }; |
87 | 87 |
88 MessageLoopResource::MessageLoopResource(PP_Instance instance) | 88 MessageLoopResource::MessageLoopResource(PP_Instance instance) |
89 : Resource(HostResource::MakeInstanceOnly(instance)), | 89 : Resource(OBJECT_IS_PROXY, instance), |
90 nested_invocations_(0), | 90 nested_invocations_(0), |
91 destroyed_(false), | 91 destroyed_(false), |
92 should_destroy_(false) { | 92 should_destroy_(false) { |
93 } | 93 } |
94 | 94 |
95 MessageLoopResource::~MessageLoopResource() { | 95 MessageLoopResource::~MessageLoopResource() { |
96 } | 96 } |
97 | 97 |
98 PPB_MessageLoop_API* MessageLoopResource::AsPPB_MessageLoop_API() { | 98 PPB_MessageLoop_API* MessageLoopResource::AsPPB_MessageLoop_API() { |
99 return this; | 99 return this; |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 PPB_MessageLoop_Proxy::~PPB_MessageLoop_Proxy() { | 286 PPB_MessageLoop_Proxy::~PPB_MessageLoop_Proxy() { |
287 } | 287 } |
288 | 288 |
289 // static | 289 // static |
290 const PPB_MessageLoop_Dev_0_1* PPB_MessageLoop_Proxy::GetInterface() { | 290 const PPB_MessageLoop_Dev_0_1* PPB_MessageLoop_Proxy::GetInterface() { |
291 return &ppb_message_loop_interface; | 291 return &ppb_message_loop_interface; |
292 } | 292 } |
293 | 293 |
294 } // namespace proxy | 294 } // namespace proxy |
295 } // namespace ppapi | 295 } // namespace ppapi |
OLD | NEW |