Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Side by Side Diff: ppapi/proxy/ppb_message_loop_proxy.cc

Issue 46433002: Support using TrackedCallbacks as hints to determine the handling thread of resource reply messages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/ppb_message_loop_proxy.h ('k') | ppapi/proxy/printing_resource_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_message_loop_proxy.h ('k') | ppapi/proxy/printing_resource_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698