Update to Chromium revision ad468e8b (#292352).

- Building Chromium using SVN is no longer supported.
- Remove CefDOMEvent and CefDOMEventListener (issue #933).
- Remove CefRenderHandler::OnScrollOffsetChanged (http://crbug.com/404656).
- Remove UR_FLAG_REPORT_LOAD_TIMING (https://codereview.chromium.org/451623002/).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1816 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2014-09-04 17:53:40 +00:00
parent 3f3ffdedee
commit 0b78461f5b
117 changed files with 1698 additions and 2257 deletions

View File

@@ -6,7 +6,7 @@
#define CEF_LIBCEF_COMMON_BREAKPAD_CLIENT_H_
#include "base/compiler_specific.h"
#include "components/breakpad/app/breakpad_client.h"
#include "components/crash/app/breakpad_client.h"
class CefBreakpadClient : public breakpad::BreakpadClient {
public:

View File

@@ -202,28 +202,6 @@ IPC_MESSAGE_ROUTED1(CefHostMsg_ResponseAck,
int /* request_id */)
// Pepper PDF plugin messages excerpted from chrome/common/render_messages.h.
// Including all of render_messages.h would bring in a number of chrome
// dependencies that are better off avoided.
// The currently displayed PDF has an unsupported feature.
IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_PDFHasUnsupportedFeature)
// Brings up SaveAs... dialog to save specified URL.
IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_PDFSaveURLAs,
GURL /* url */,
content::Referrer /* referrer */)
// Updates the content restrictions, i.e. to disable print/copy.
IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_PDFUpdateContentRestrictions,
int /* restrictions */)
// Brings up a Password... dialog for protected documents.
IPC_SYNC_MESSAGE_ROUTED1_1(ChromeViewHostMsg_PDFModalPromptForPassword,
std::string /* prompt */,
std::string /* actual_value */)
// Singly-included section for struct and custom IPC traits.
#ifndef CEF_LIBCEF_COMMON_CEF_MESSAGES_H_
#define CEF_LIBCEF_COMMON_CEF_MESSAGES_H_

View File

@@ -34,19 +34,19 @@
#if defined(OS_WIN)
#include <Objbase.h> // NOLINT(build/include_order)
#include "components/breakpad/app/breakpad_win.h"
#include "components/crash/app/breakpad_win.h"
#endif
#if defined(OS_MACOSX)
#include "base/mac/os_crash_dumps.h"
#include "base/mac/bundle_locations.h"
#include "base/mac/foundation_util.h"
#include "components/breakpad/app/breakpad_mac.h"
#include "components/crash/app/breakpad_mac.h"
#include "content/public/common/content_paths.h"
#endif
#if defined(OS_POSIX) && !defined(OS_MACOSX)
#include "components/breakpad/app/breakpad_linux.h"
#include "components/crash/app/breakpad_linux.h"
#endif
namespace {
@@ -541,8 +541,10 @@ void CefMainDelegate::InitializeResourceBundle() {
DCHECK(!locale.empty());
const std::string loaded_locale =
ui::ResourceBundle::InitSharedInstanceWithLocale(locale,
&content_client_);
ui::ResourceBundle::InitSharedInstanceWithLocale(
locale,
&content_client_,
ui::ResourceBundle::LOAD_COMMON_RESOURCES);
ResourceBundle& resource_bundle = ResourceBundle::GetSharedInstance();
if (!content_client_.pack_loading_disabled()) {

View File

@@ -12,6 +12,7 @@
#include "base/logging.h"
#include "content/public/browser/resource_request_info.h"
#include "content/public/common/resource_type.h"
#include "net/base/upload_data_stream.h"
#include "net/base/upload_element_reader.h"
#include "net/base/upload_bytes_element_reader.h"
@@ -23,7 +24,6 @@
#include "third_party/WebKit/public/platform/WebURL.h"
#include "third_party/WebKit/public/platform/WebURLError.h"
#include "third_party/WebKit/public/platform/WebURLRequest.h"
#include "webkit/common/resource_type.h"
namespace {
@@ -313,9 +313,6 @@ void CefRequestImpl::Set(const blink::WebURLRequest& request) {
flags_ |= UR_FLAG_REPORT_RAW_HEADERS;
first_party_for_cookies_ = request.firstPartyForCookies().spec().utf16();
resource_type_ = static_cast<cef_resource_type_t>(
::ResourceType::FromTargetType(request.targetType()));
}
void CefRequestImpl::Get(blink::WebURLRequest& request) {
@@ -327,7 +324,6 @@ void CefRequestImpl::Get(blink::WebURLRequest& request) {
std::string method(method_);
request.setHTTPMethod(blink::WebString::fromUTF8(method.c_str()));
request.setTargetType(blink::WebURLRequest::TargetIsMainFrame);
blink::WebHTTPBody body;
if (postdata_.get()) {

View File

@@ -5,12 +5,13 @@
#ifndef CEF_LIBCEF_COMMON_UPLOAD_DATA_H_
#define CEF_LIBCEF_COMMON_UPLOAD_DATA_H_
#include "libcef/common/upload_element.h"
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_vector.h"
#include "base/supports_user_data.h"
#include "net/base/net_export.h"
#include "net/base/upload_element.h"
namespace base {
class FilePath;

View File

@@ -0,0 +1,25 @@
// Copyright (c) 2012 The Chromium 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 "libcef/common/upload_element.h"
#include <algorithm>
#include "net/base/file_stream.h"
#include "net/base/net_errors.h"
namespace net {
UploadElement::UploadElement()
: type_(TYPE_BYTES),
bytes_start_(NULL),
bytes_length_(0),
file_range_offset_(0),
file_range_length_(kuint64max) {
}
UploadElement::~UploadElement() {
}
} // namespace net

View File

@@ -0,0 +1,110 @@
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CEF_LIBCEF_COMMON_UPLOAD_ELEMENT_H_
#define CEF_LIBCEF_COMMON_UPLOAD_ELEMENT_H_
#include <vector>
#include "base/basictypes.h"
#include "base/files/file_path.h"
#include "base/time/time.h"
#include "net/base/net_export.h"
namespace net {
// A class representing an element contained by UploadData.
class NET_EXPORT UploadElement {
public:
enum Type {
TYPE_BYTES,
TYPE_FILE,
};
UploadElement();
~UploadElement();
Type type() const { return type_; }
const char* bytes() const { return bytes_start_ ? bytes_start_ : &buf_[0]; }
uint64 bytes_length() const { return buf_.size() + bytes_length_; }
const base::FilePath& file_path() const { return file_path_; }
uint64 file_range_offset() const { return file_range_offset_; }
uint64 file_range_length() const { return file_range_length_; }
// If NULL time is returned, we do not do the check.
const base::Time& expected_file_modification_time() const {
return expected_file_modification_time_;
}
void SetToBytes(const char* bytes, int bytes_len) {
type_ = TYPE_BYTES;
buf_.assign(bytes, bytes + bytes_len);
}
// This does not copy the given data and the caller should make sure
// the data is secured somewhere else (e.g. by attaching the data
// using SetUserData).
void SetToSharedBytes(const char* bytes, int bytes_len) {
type_ = TYPE_BYTES;
bytes_start_ = bytes;
bytes_length_ = bytes_len;
}
void SetToFilePath(const base::FilePath& path) {
SetToFilePathRange(path, 0, kuint64max, base::Time());
}
// If expected_modification_time is NULL, we do not check for the file
// change. Also note that the granularity for comparison is time_t, not
// the full precision.
void SetToFilePathRange(const base::FilePath& path,
uint64 offset, uint64 length,
const base::Time& expected_modification_time) {
type_ = TYPE_FILE;
file_path_ = path;
file_range_offset_ = offset;
file_range_length_ = length;
expected_file_modification_time_ = expected_modification_time;
}
private:
Type type_;
std::vector<char> buf_;
const char* bytes_start_;
uint64 bytes_length_;
base::FilePath file_path_;
uint64 file_range_offset_;
uint64 file_range_length_;
base::Time expected_file_modification_time_;
DISALLOW_COPY_AND_ASSIGN(UploadElement);
};
#if defined(UNIT_TEST)
inline bool operator==(const UploadElement& a,
const UploadElement& b) {
if (a.type() != b.type())
return false;
if (a.type() == UploadElement::TYPE_BYTES)
return a.bytes_length() == b.bytes_length() &&
memcmp(a.bytes(), b.bytes(), b.bytes_length()) == 0;
if (a.type() == UploadElement::TYPE_FILE) {
return a.file_path() == b.file_path() &&
a.file_range_offset() == b.file_range_offset() &&
a.file_range_length() == b.file_range_length() &&
a.expected_file_modification_time() ==
b.expected_file_modification_time();
}
return false;
}
inline bool operator!=(const UploadElement& a,
const UploadElement& b) {
return !(a == b);
}
#endif // defined(UNIT_TEST)
} // namespace net
#endif // CEF_LIBCEF_COMMON_UPLOAD_ELEMENT_H_

View File

@@ -384,7 +384,7 @@ bool CefDictionaryValueImpl::SetBool(const CefString& key, bool value) {
CEF_VALUE_VERIFY_RETURN(true, false);
RemoveInternal(key);
mutable_value()->SetWithoutPathExpansion(key,
base::Value::CreateBooleanValue(value));
new base::FundamentalValue(value));
return true;
}
@@ -392,7 +392,7 @@ bool CefDictionaryValueImpl::SetInt(const CefString& key, int value) {
CEF_VALUE_VERIFY_RETURN(true, false);
RemoveInternal(key);
mutable_value()->SetWithoutPathExpansion(key,
base::Value::CreateIntegerValue(value));
new base::FundamentalValue(value));
return true;
}
@@ -400,7 +400,7 @@ bool CefDictionaryValueImpl::SetDouble(const CefString& key, double value) {
CEF_VALUE_VERIFY_RETURN(true, false);
RemoveInternal(key);
mutable_value()->SetWithoutPathExpansion(key,
base::Value::CreateDoubleValue(value));
new base::FundamentalValue(value));
return true;
}
@@ -409,7 +409,7 @@ bool CefDictionaryValueImpl::SetString(const CefString& key,
CEF_VALUE_VERIFY_RETURN(true, false);
RemoveInternal(key);
mutable_value()->SetWithoutPathExpansion(key,
base::Value::CreateStringValue(value.ToString()));
new base::StringValue(value.ToString()));
return true;
}
@@ -729,7 +729,7 @@ bool CefListValueImpl::SetNull(int index) {
bool CefListValueImpl::SetBool(int index, bool value) {
CEF_VALUE_VERIFY_RETURN(true, false);
base::Value* new_value = base::Value::CreateBooleanValue(value);
base::Value* new_value = new base::FundamentalValue(value);
if (RemoveInternal(index))
mutable_value()->Insert(index, new_value);
else
@@ -739,7 +739,7 @@ bool CefListValueImpl::SetBool(int index, bool value) {
bool CefListValueImpl::SetInt(int index, int value) {
CEF_VALUE_VERIFY_RETURN(true, false);
base::Value* new_value = base::Value::CreateIntegerValue(value);
base::Value* new_value = new base::FundamentalValue(value);
if (RemoveInternal(index))
mutable_value()->Insert(index, new_value);
else
@@ -749,7 +749,7 @@ bool CefListValueImpl::SetInt(int index, int value) {
bool CefListValueImpl::SetDouble(int index, double value) {
CEF_VALUE_VERIFY_RETURN(true, false);
base::Value* new_value = base::Value::CreateDoubleValue(value);
base::Value* new_value = new base::FundamentalValue(value);
if (RemoveInternal(index))
mutable_value()->Insert(index, new_value);
else
@@ -759,7 +759,7 @@ bool CefListValueImpl::SetDouble(int index, double value) {
bool CefListValueImpl::SetString(int index, const CefString& value) {
CEF_VALUE_VERIFY_RETURN(true, false);
base::Value* new_value = base::Value::CreateStringValue(value.ToString());
base::Value* new_value = new base::StringValue(value.ToString());
if (RemoveInternal(index))
mutable_value()->Insert(index, new_value);
else