mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium revision 149431.
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@730 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -91,6 +91,15 @@ base::StringPiece CefContentClient::GetDataResource(
|
||||
return value;
|
||||
}
|
||||
|
||||
gfx::Image& CefContentClient::GetNativeImageNamed(int resource_id) const {
|
||||
gfx::Image& value =
|
||||
ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id);
|
||||
if (value.IsEmpty())
|
||||
LOG(ERROR) << "No native image available for id " << resource_id;
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
FilePath CefContentClient::GetPathForResourcePack(
|
||||
const FilePath& pack_path,
|
||||
ui::ScaleFactor scale_factor) {
|
||||
|
@@ -33,6 +33,7 @@ class CefContentClient : public content::ContentClient,
|
||||
virtual base::StringPiece GetDataResource(
|
||||
int resource_id,
|
||||
ui::ScaleFactor scale_factor) const OVERRIDE;
|
||||
virtual gfx::Image& GetNativeImageNamed(int resource_id) const OVERRIDE;
|
||||
|
||||
CefRefPtr<CefApp> application() const { return application_; }
|
||||
|
||||
|
@@ -411,7 +411,7 @@ void CefMainDelegate::InitializeResourceBundle() {
|
||||
|
||||
if (file_util::PathExists(pak_file)) {
|
||||
content_client_.set_allow_pack_file_load(true);
|
||||
ResourceBundle::GetSharedInstance().AddDataPack(
|
||||
ResourceBundle::GetSharedInstance().AddDataPackFromPath(
|
||||
pak_file, ui::SCALE_FACTOR_NONE);
|
||||
content_client_.set_allow_pack_file_load(false);
|
||||
} else {
|
||||
|
@@ -155,7 +155,7 @@ void CefRequestImpl::Set(net::URLRequest* request) {
|
||||
GetHeaderMap(headers, headermap_);
|
||||
|
||||
// Transfer post data, if any
|
||||
net::UploadData* data = request->get_upload();
|
||||
const net::UploadData* data = request->get_upload();
|
||||
if (data) {
|
||||
postdata_ = CefPostData::Create();
|
||||
static_cast<CefPostDataImpl*>(postdata_.get())->Set(*data);
|
||||
@@ -401,13 +401,13 @@ void CefPostDataImpl::RemoveElements() {
|
||||
elements_.clear();
|
||||
}
|
||||
|
||||
void CefPostDataImpl::Set(net::UploadData& data) {
|
||||
void CefPostDataImpl::Set(const net::UploadData& data) {
|
||||
AutoLock lock_scope(this);
|
||||
CHECK_READONLY_RETURN_VOID();
|
||||
|
||||
CefRefPtr<CefPostDataElement> postelem;
|
||||
|
||||
std::vector<net::UploadData::Element>* elements = data.elements();
|
||||
const std::vector<net::UploadData::Element>* elements = data.elements();
|
||||
std::vector<net::UploadData::Element>::const_iterator it = elements->begin();
|
||||
for (; it != elements->end(); ++it) {
|
||||
postelem = CefPostDataElement::Create();
|
||||
|
@@ -94,7 +94,7 @@ class CefPostDataImpl : public CefPostData {
|
||||
virtual bool AddElement(CefRefPtr<CefPostDataElement> element) OVERRIDE;
|
||||
virtual void RemoveElements();
|
||||
|
||||
void Set(net::UploadData& data);
|
||||
void Set(const net::UploadData& data);
|
||||
void Get(net::UploadData& data);
|
||||
void Set(const WebKit::WebHTTPBody& data);
|
||||
void Get(WebKit::WebHTTPBody& data);
|
||||
|
@@ -96,11 +96,13 @@ bool CefPostDelayedTask(CefThreadId threadId, CefRefPtr<CefTask> task,
|
||||
if (id >= 0) {
|
||||
// Browser process.
|
||||
return CEF_POST_DELAYED_TASK(static_cast<BrowserThread::ID>(id),
|
||||
base::Bind(&CefTask::Execute, task, threadId), delay_ms);
|
||||
base::Bind(&CefTask::Execute, task, threadId),
|
||||
base::TimeDelta::FromMilliseconds(delay_ms));
|
||||
} else if (id == kRenderThreadId) {
|
||||
// Renderer process.
|
||||
return CEF_POST_DELAYED_TASK_RT(
|
||||
base::Bind(&CefTask::Execute, task, threadId), delay_ms);
|
||||
base::Bind(&CefTask::Execute, task, threadId),
|
||||
base::TimeDelta::FromMilliseconds(delay_ms));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@@ -226,7 +226,7 @@ bool CefDictionaryValueImpl::Remove(const CefString& key) {
|
||||
CefValueType CefDictionaryValueImpl::GetType(const CefString& key) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, VTYPE_INVALID);
|
||||
|
||||
base::Value* out_value = NULL;
|
||||
const base::Value* out_value = NULL;
|
||||
if (const_value().GetWithoutPathExpansion(key, &out_value)) {
|
||||
switch (out_value->GetType()) {
|
||||
case base::Value::TYPE_NULL:
|
||||
@@ -254,7 +254,7 @@ CefValueType CefDictionaryValueImpl::GetType(const CefString& key) {
|
||||
bool CefDictionaryValueImpl::GetBool(const CefString& key) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, false);
|
||||
|
||||
base::Value* out_value = NULL;
|
||||
const base::Value* out_value = NULL;
|
||||
bool ret_value = false;
|
||||
|
||||
if (const_value().GetWithoutPathExpansion(key, &out_value))
|
||||
@@ -266,7 +266,7 @@ bool CefDictionaryValueImpl::GetBool(const CefString& key) {
|
||||
int CefDictionaryValueImpl::GetInt(const CefString& key) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, 0);
|
||||
|
||||
base::Value* out_value = NULL;
|
||||
const base::Value* out_value = NULL;
|
||||
int ret_value = 0;
|
||||
|
||||
if (const_value().GetWithoutPathExpansion(key, &out_value))
|
||||
@@ -278,7 +278,7 @@ int CefDictionaryValueImpl::GetInt(const CefString& key) {
|
||||
double CefDictionaryValueImpl::GetDouble(const CefString& key) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, 0);
|
||||
|
||||
base::Value* out_value = NULL;
|
||||
const base::Value* out_value = NULL;
|
||||
double ret_value = 0;
|
||||
|
||||
if (const_value().GetWithoutPathExpansion(key, &out_value))
|
||||
@@ -290,7 +290,7 @@ double CefDictionaryValueImpl::GetDouble(const CefString& key) {
|
||||
CefString CefDictionaryValueImpl::GetString(const CefString& key) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, CefString());
|
||||
|
||||
base::Value* out_value = NULL;
|
||||
const base::Value* out_value = NULL;
|
||||
string16 ret_value;
|
||||
|
||||
if (const_value().GetWithoutPathExpansion(key, &out_value))
|
||||
@@ -303,12 +303,12 @@ CefRefPtr<CefBinaryValue> CefDictionaryValueImpl::GetBinary(
|
||||
const CefString& key) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, NULL);
|
||||
|
||||
base::Value* out_value = NULL;
|
||||
const base::Value* out_value = NULL;
|
||||
|
||||
if (const_value().GetWithoutPathExpansion(key, &out_value) &&
|
||||
out_value->IsType(base::Value::TYPE_BINARY)) {
|
||||
base::BinaryValue* binary_value =
|
||||
static_cast<base::BinaryValue*>(out_value);
|
||||
static_cast<base::BinaryValue*>(const_cast<base::Value*>(out_value));
|
||||
return CefBinaryValueImpl::GetOrCreateRef(binary_value,
|
||||
const_cast<base::DictionaryValue*>(&const_value()), controller());
|
||||
}
|
||||
@@ -320,12 +320,13 @@ CefRefPtr<CefDictionaryValue> CefDictionaryValueImpl::GetDictionary(
|
||||
const CefString& key) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, NULL);
|
||||
|
||||
base::Value* out_value = NULL;
|
||||
const base::Value* out_value = NULL;
|
||||
|
||||
if (const_value().GetWithoutPathExpansion(key, &out_value) &&
|
||||
out_value->IsType(base::Value::TYPE_DICTIONARY)) {
|
||||
base::DictionaryValue* dict_value =
|
||||
static_cast<base::DictionaryValue*>(out_value);
|
||||
static_cast<base::DictionaryValue*>(
|
||||
const_cast<base::Value*>(out_value));
|
||||
return CefDictionaryValueImpl::GetOrCreateRef(
|
||||
dict_value,
|
||||
const_cast<base::DictionaryValue*>(&const_value()),
|
||||
@@ -339,11 +340,12 @@ CefRefPtr<CefDictionaryValue> CefDictionaryValueImpl::GetDictionary(
|
||||
CefRefPtr<CefListValue> CefDictionaryValueImpl::GetList(const CefString& key) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, NULL);
|
||||
|
||||
base::Value* out_value = NULL;
|
||||
const base::Value* out_value = NULL;
|
||||
|
||||
if (const_value().GetWithoutPathExpansion(key, &out_value) &&
|
||||
out_value->IsType(base::Value::TYPE_LIST)) {
|
||||
base::ListValue* list_value = static_cast<base::ListValue*>(out_value);
|
||||
base::ListValue* list_value =
|
||||
static_cast<base::ListValue*>(const_cast<base::Value*>(out_value));
|
||||
return CefListValueImpl::GetOrCreateRef(
|
||||
list_value,
|
||||
const_cast<base::DictionaryValue*>(&const_value()),
|
||||
|
Reference in New Issue
Block a user