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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 from_here, closure, base::TimeDelta::FromMilliseconds(delay_ms)); | 182 from_here, closure, base::TimeDelta::FromMilliseconds(delay_ms)); |
183 } else { | 183 } else { |
184 TaskInfo info; | 184 TaskInfo info; |
185 info.from_here = FROM_HERE; | 185 info.from_here = FROM_HERE; |
186 info.closure = closure; | 186 info.closure = closure; |
187 info.delay_ms = delay_ms; | 187 info.delay_ms = delay_ms; |
188 pending_tasks_.push_back(info); | 188 pending_tasks_.push_back(info); |
189 } | 189 } |
190 } | 190 } |
191 | 191 |
| 192 base::MessageLoopProxy* MessageLoopResource::GetMessageLoopProxy() { |
| 193 return loop_proxy_.get(); |
| 194 } |
| 195 |
192 // static | 196 // static |
193 void MessageLoopResource::ReleaseMessageLoop(void* value) { | 197 void MessageLoopResource::ReleaseMessageLoop(void* value) { |
194 static_cast<MessageLoopResource*>(value)->DetachFromThread(); | 198 static_cast<MessageLoopResource*>(value)->DetachFromThread(); |
195 } | 199 } |
196 | 200 |
197 // ----------------------------------------------------------------------------- | 201 // ----------------------------------------------------------------------------- |
198 | 202 |
199 PP_Resource Create(PP_Instance instance) { | 203 PP_Resource Create(PP_Instance instance) { |
200 ProxyAutoLock lock; | 204 ProxyAutoLock lock; |
201 // Validate the instance. | 205 // Validate the instance. |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 PPB_MessageLoop_Proxy::~PPB_MessageLoop_Proxy() { | 269 PPB_MessageLoop_Proxy::~PPB_MessageLoop_Proxy() { |
266 } | 270 } |
267 | 271 |
268 // static | 272 // static |
269 const PPB_MessageLoop_1_0* PPB_MessageLoop_Proxy::GetInterface() { | 273 const PPB_MessageLoop_1_0* PPB_MessageLoop_Proxy::GetInterface() { |
270 return &ppb_message_loop_interface; | 274 return &ppb_message_loop_interface; |
271 } | 275 } |
272 | 276 |
273 } // namespace proxy | 277 } // namespace proxy |
274 } // namespace ppapi | 278 } // namespace ppapi |
OLD | NEW |