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

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

Issue 15806016: Update ppapi/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months 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_instance_proxy.cc ('k') | ppapi/proxy/resource_creation_proxy.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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 if (!globals->msg_loop_slot()) 170 if (!globals->msg_loop_slot())
171 return false; // Can't be current if there's nothing in the slot. 171 return false; // Can't be current if there's nothing in the slot.
172 return static_cast<const void*>(globals->msg_loop_slot()->Get()) == 172 return static_cast<const void*>(globals->msg_loop_slot()->Get()) ==
173 static_cast<const void*>(this); 173 static_cast<const void*>(this);
174 } 174 }
175 175
176 void MessageLoopResource::PostClosure( 176 void MessageLoopResource::PostClosure(
177 const tracked_objects::Location& from_here, 177 const tracked_objects::Location& from_here,
178 const base::Closure& closure, 178 const base::Closure& closure,
179 int64 delay_ms) { 179 int64 delay_ms) {
180 if (loop_proxy_) { 180 if (loop_proxy_.get()) {
181 loop_proxy_->PostDelayedTask(from_here, 181 loop_proxy_->PostDelayedTask(
182 closure, 182 from_here, closure, base::TimeDelta::FromMilliseconds(delay_ms));
183 base::TimeDelta::FromMilliseconds(delay_ms));
184 } else { 183 } else {
185 TaskInfo info; 184 TaskInfo info;
186 info.from_here = FROM_HERE; 185 info.from_here = FROM_HERE;
187 info.closure = closure; 186 info.closure = closure;
188 info.delay_ms = delay_ms; 187 info.delay_ms = delay_ms;
189 pending_tasks_.push_back(info); 188 pending_tasks_.push_back(info);
190 } 189 }
191 } 190 }
192 191
193 // static 192 // static
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 PPB_MessageLoop_Proxy::~PPB_MessageLoop_Proxy() { 265 PPB_MessageLoop_Proxy::~PPB_MessageLoop_Proxy() {
267 } 266 }
268 267
269 // static 268 // static
270 const PPB_MessageLoop_1_0* PPB_MessageLoop_Proxy::GetInterface() { 269 const PPB_MessageLoop_1_0* PPB_MessageLoop_Proxy::GetInterface() {
271 return &ppb_message_loop_interface; 270 return &ppb_message_loop_interface;
272 } 271 }
273 272
274 } // namespace proxy 273 } // namespace proxy
275 } // namespace ppapi 274 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_instance_proxy.cc ('k') | ppapi/proxy/resource_creation_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698