mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2024-12-11 09:08:06 +01:00
801ff3ca43
- Move to the new DOM storage backend. Persistent localStorage support will need to be re-implemented (issue #603). - Add CefV8Value::CreateUInt method and indicate that integer types are 32bit via usage of int32 and uint32 types (issue #331). - Add CefV8Context::Eval method for synchronous JavaScript execution that returns a value or exception (issue #444). - Move exception handling from an ExecuteFunction argument to a CefV8Value attribute (issue #546). - Make user data an attribute for all CefV8Value object types and not just CreateObject (issue #547). - Un-fork SQLitePersistentCookieStore by adding stub implementations for sqlite_diagnostics and browser_thread. - Update tools/cef_parser.py to match the CEF3 version. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@644 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
69 lines
1.8 KiB
C++
69 lines
1.8 KiB
C++
// Copyright (c) 2012 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 "content/public/browser/browser_thread.h"
|
|
#include "libcef/cef_thread.h"
|
|
|
|
// Stub implementations to convert BrowserThread calls to CefThread.
|
|
|
|
namespace content {
|
|
|
|
namespace {
|
|
|
|
int GetCefId(BrowserThread::ID browser_id) {
|
|
switch (browser_id) {
|
|
case BrowserThread::UI:
|
|
return CefThread::UI;
|
|
case BrowserThread::IO:
|
|
return CefThread::IO;
|
|
case BrowserThread::DB:
|
|
case BrowserThread::FILE:
|
|
return CefThread::FILE;
|
|
default:
|
|
break;
|
|
}
|
|
|
|
// The specified BrowserThread ID is not supported.
|
|
NOTREACHED();
|
|
return -1;
|
|
}
|
|
|
|
} // namespace
|
|
|
|
// static
|
|
bool BrowserThread::PostTask(ID identifier,
|
|
const tracked_objects::Location& from_here,
|
|
const base::Closure& task) {
|
|
int cef_id = GetCefId(identifier);
|
|
if (cef_id < 0)
|
|
return false;
|
|
|
|
return CefThread::PostTask(static_cast<CefThread::ID>(cef_id), from_here,
|
|
task);
|
|
}
|
|
|
|
// static
|
|
bool BrowserThread::PostDelayedTask(ID identifier,
|
|
const tracked_objects::Location& from_here,
|
|
const base::Closure& task,
|
|
base::TimeDelta delay) {
|
|
int cef_id = GetCefId(identifier);
|
|
if (cef_id < 0)
|
|
return false;
|
|
|
|
return CefThread::PostDelayedTask(static_cast<CefThread::ID>(cef_id),
|
|
from_here, task, delay);
|
|
}
|
|
|
|
// static
|
|
bool BrowserThread::CurrentlyOn(ID identifier) {
|
|
int cef_id = GetCefId(identifier);
|
|
if (cef_id < 0)
|
|
return false;
|
|
|
|
return CefThread::CurrentlyOn(static_cast<CefThread::ID>(cef_id));
|
|
}
|
|
|
|
} // namespace content
|