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

Side by Side Diff: webkit/support/webkit_support.cc

Issue 3298003: webkit_support: Add PostDelayedTask(). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 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 | « webkit/support/webkit_support.h ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/support/webkit_support.h" 5 #include "webkit/support/webkit_support.h"
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug_util.h" 9 #include "base/debug_util.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 } 355 }
356 356
357 void PostTaskFromHere(Task* task) { 357 void PostTaskFromHere(Task* task) {
358 MessageLoop::current()->PostTask(FROM_HERE, task); 358 MessageLoop::current()->PostTask(FROM_HERE, task);
359 } 359 }
360 360
361 void PostDelayedTaskFromHere(Task* task, int64 delay_ms) { 361 void PostDelayedTaskFromHere(Task* task, int64 delay_ms) {
362 MessageLoop::current()->PostDelayedTask(FROM_HERE, task, delay_ms); 362 MessageLoop::current()->PostDelayedTask(FROM_HERE, task, delay_ms);
363 } 363 }
364 364
365 void PostDelayedTask(void (*func)(void*), void* context, int64 delay_ms) {
366 MessageLoop::current()->PostDelayedTask(
367 FROM_HERE, NewRunnableFunction(func, context), delay_ms);
368 }
369
365 // Wrappers for FilePath and file_util 370 // Wrappers for FilePath and file_util
366 371
367 WebString GetAbsoluteWebStringFromUTF8Path(const std::string& utf8_path) { 372 WebString GetAbsoluteWebStringFromUTF8Path(const std::string& utf8_path) {
368 #if defined(OS_WIN) 373 #if defined(OS_WIN)
369 FilePath path(UTF8ToWide(utf8_path)); 374 FilePath path(UTF8ToWide(utf8_path));
370 file_util::AbsolutePath(&path); 375 file_util::AbsolutePath(&path);
371 return WebString(path.value()); 376 return WebString(path.value());
372 #else 377 #else
373 FilePath path(base::SysWideToNativeMB(base::SysUTF8ToWide(utf8_path))); 378 FilePath path(base::SysWideToNativeMB(base::SysUTF8ToWide(utf8_path)));
374 file_util::AbsolutePath(&path); 379 file_util::AbsolutePath(&path);
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 if (!webkit_glue::GetExeDirectory(&dirExe)) { 512 if (!webkit_glue::GetExeDirectory(&dirExe)) {
508 DCHECK(false); 513 DCHECK(false);
509 return WebURL(); 514 return WebURL();
510 } 515 }
511 FilePath devToolsPath = dirExe.AppendASCII( 516 FilePath devToolsPath = dirExe.AppendASCII(
512 "resources/inspector/devtools.html"); 517 "resources/inspector/devtools.html");
513 return net::FilePathToFileURL(devToolsPath); 518 return net::FilePathToFileURL(devToolsPath);
514 } 519 }
515 520
516 } // namespace webkit_support 521 } // namespace webkit_support
OLDNEW
« no previous file with comments | « webkit/support/webkit_support.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698