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

Side by Side Diff: webkit/plugins/ppapi/plugin_module.cc

Issue 9572035: Convert uses of int ms to TimeDelta in content/browser, ipc, and webkit/plugins. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 9 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
« no previous file with comments | « ipc/ipc_sync_channel_unittest.cc ('k') | no next file » | 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 "webkit/plugins/ppapi/plugin_module.h" 5 #include "webkit/plugins/ppapi/plugin_module.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 return TimeTicksToPPTimeTicks(base::TimeTicks::Now()); 176 return TimeTicksToPPTimeTicks(base::TimeTicks::Now());
177 } 177 }
178 178
179 void CallOnMainThread(int delay_in_msec, 179 void CallOnMainThread(int delay_in_msec,
180 PP_CompletionCallback callback, 180 PP_CompletionCallback callback,
181 int32_t result) { 181 int32_t result) {
182 if (callback.func) { 182 if (callback.func) {
183 GetMainThreadMessageLoop()->PostDelayedTask( 183 GetMainThreadMessageLoop()->PostDelayedTask(
184 FROM_HERE, 184 FROM_HERE,
185 base::Bind(callback.func, callback.user_data, result), 185 base::Bind(callback.func, callback.user_data, result),
186 delay_in_msec); 186 base::TimeDelta::FromMilliseconds(delay_in_msec));
187 } 187 }
188 } 188 }
189 189
190 PP_Bool IsMainThread() { 190 PP_Bool IsMainThread() {
191 return BoolToPPBool(GetMainThreadMessageLoop()->BelongsToCurrentThread()); 191 return BoolToPPBool(GetMainThreadMessageLoop()->BelongsToCurrentThread());
192 } 192 }
193 193
194 const PPB_Core core_interface = { 194 const PPB_Core core_interface = {
195 &AddRefResource, 195 &AddRefResource,
196 &ReleaseResource, 196 &ReleaseResource,
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 int retval = entry_points.initialize_module(pp_module(), &GetInterface); 623 int retval = entry_points.initialize_module(pp_module(), &GetInterface);
624 if (retval != 0) { 624 if (retval != 0) {
625 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; 625 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval;
626 return false; 626 return false;
627 } 627 }
628 return true; 628 return true;
629 } 629 }
630 630
631 } // namespace ppapi 631 } // namespace ppapi
632 } // namespace webkit 632 } // namespace webkit
OLDNEW
« no previous file with comments | « ipc/ipc_sync_channel_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698