mirror of
				https://bitbucket.org/chromiumembedded/cef
				synced 2025-06-05 21:39:12 +02:00 
			
		
		
		
	- Restore CefRenderHandler::OnScrollOffsetChanged. - Add new RT_PING and RT_SERVICE_WORKER resource type values. - The resource type for image sub-resource loads has changed from RT_IMAGE to RT_PREFETCH (this is a regression, see http://crbug.com/415253#c23). - Add a patch to fix a crash in Scheduler::swapQueuesRunPendingTasks* (http://crbug.com/415478). - Add documentation for cef_key_event_type_t values. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1846 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
		
			
				
	
	
		
			39 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
| // Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights
 | |
| // reserved. Use of this source code is governed by a BSD-style license that can
 | |
| // be found in the LICENSE file.
 | |
| 
 | |
| #include "include/cef_task.h"
 | |
| #include "libcef/common/task_runner_impl.h"
 | |
| 
 | |
| #include "base/bind.h"
 | |
| #include "base/location.h"
 | |
| 
 | |
| bool CefCurrentlyOn(CefThreadId threadId) {
 | |
|   scoped_refptr<base::SequencedTaskRunner> task_runner =
 | |
|       CefTaskRunnerImpl::GetTaskRunner(threadId);
 | |
|   if (task_runner.get())
 | |
|     return task_runner->RunsTasksOnCurrentThread();
 | |
|   return false;
 | |
| }
 | |
| 
 | |
| bool CefPostTask(CefThreadId threadId, CefRefPtr<CefTask> task) {
 | |
|   scoped_refptr<base::SequencedTaskRunner> task_runner =
 | |
|       CefTaskRunnerImpl::GetTaskRunner(threadId);
 | |
|   if (task_runner.get()) {
 | |
|     return task_runner->PostTask(FROM_HERE,
 | |
|         base::Bind(&CefTask::Execute, task.get()));
 | |
|   }
 | |
|   return false;
 | |
| }
 | |
| 
 | |
| bool CefPostDelayedTask(CefThreadId threadId, CefRefPtr<CefTask> task, int64 delay_ms) {
 | |
|   scoped_refptr<base::SequencedTaskRunner> task_runner =
 | |
|       CefTaskRunnerImpl::GetTaskRunner(threadId);
 | |
|   if (task_runner.get()) {
 | |
|     return task_runner->PostDelayedTask(FROM_HERE,
 | |
|         base::Bind(&CefTask::Execute, task.get()),
 | |
|         base::TimeDelta::FromMilliseconds(delay_ms));
 | |
|   }
 | |
|   return false;
 | |
| }
 |