mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium revision 160122.
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@843 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -17,5 +17,5 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
'chromium_url': 'http://src.chromium.org/svn/trunk/src',
|
'chromium_url': 'http://src.chromium.org/svn/trunk/src',
|
||||||
'chromium_revision': '157509',
|
'chromium_revision': '160122',
|
||||||
}
|
}
|
||||||
|
1
cef.gyp
1
cef.gyp
@@ -852,6 +852,7 @@
|
|||||||
'libcef/browser/zip_reader_impl.h',
|
'libcef/browser/zip_reader_impl.h',
|
||||||
'libcef/common/cef_message_generator.cc',
|
'libcef/common/cef_message_generator.cc',
|
||||||
'libcef/common/cef_message_generator.h',
|
'libcef/common/cef_message_generator.h',
|
||||||
|
'libcef/common/cef_messages.cc',
|
||||||
'libcef/common/cef_messages.h',
|
'libcef/common/cef_messages.h',
|
||||||
'libcef/common/cef_switches.cc',
|
'libcef/common/cef_switches.cc',
|
||||||
'libcef/common/cef_switches.h',
|
'libcef/common/cef_switches.h',
|
||||||
|
@@ -270,10 +270,6 @@ content::SpeechRecognitionPreferences*
|
|||||||
return speech_recognition_preferences_.get();
|
return speech_recognition_preferences_.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CefBrowserContext::DidLastSessionExitCleanly() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
quota::SpecialStoragePolicy* CefBrowserContext::GetSpecialStoragePolicy() {
|
quota::SpecialStoragePolicy* CefBrowserContext::GetSpecialStoragePolicy() {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@@ -45,7 +45,6 @@ class CefBrowserContext : public content::BrowserContext {
|
|||||||
GetGeolocationPermissionContext() OVERRIDE;
|
GetGeolocationPermissionContext() OVERRIDE;
|
||||||
virtual content::SpeechRecognitionPreferences*
|
virtual content::SpeechRecognitionPreferences*
|
||||||
GetSpeechRecognitionPreferences() OVERRIDE;
|
GetSpeechRecognitionPreferences() OVERRIDE;
|
||||||
virtual bool DidLastSessionExitCleanly() OVERRIDE;
|
|
||||||
virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE;
|
virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -73,9 +73,7 @@ void CefBrowserMainParts::PreMainMessageLoopRun() {
|
|||||||
command_line.GetSwitchValueASCII(switches::kRemoteDebuggingPort);
|
command_line.GetSwitchValueASCII(switches::kRemoteDebuggingPort);
|
||||||
int port;
|
int port;
|
||||||
if (base::StringToInt(port_str, &port) && port > 0 && port < 65535) {
|
if (base::StringToInt(port_str, &port) && port > 0 && port < 65535) {
|
||||||
devtools_delegate_ = new CefDevToolsDelegate(
|
devtools_delegate_ = new CefDevToolsDelegate(port);
|
||||||
port,
|
|
||||||
browser_context_->GetRequestContext());
|
|
||||||
} else {
|
} else {
|
||||||
DLOG(WARNING) << "Invalid http debugger port number " << port;
|
DLOG(WARNING) << "Invalid http debugger port number " << port;
|
||||||
}
|
}
|
||||||
|
@@ -349,7 +349,7 @@ bool CefCookieManagerImpl::GetCefCookie(const GURL& url,
|
|||||||
std::string cookie_path = net::CanonicalCookie::CanonPath(url, pc);
|
std::string cookie_path = net::CanonicalCookie::CanonPath(url, pc);
|
||||||
base::Time creation_time = base::Time::Now();
|
base::Time creation_time = base::Time::Now();
|
||||||
base::Time cookie_expires =
|
base::Time cookie_expires =
|
||||||
net::CanonicalCookie::CanonExpiration(pc, creation_time, creation_time);
|
net::CanonicalCookie::CanonExpiration(pc, creation_time);
|
||||||
|
|
||||||
CefString(&cookie.name).FromString(pc.Name());
|
CefString(&cookie.name).FromString(pc.Name());
|
||||||
CefString(&cookie.value).FromString(pc.Value());
|
CefString(&cookie.value).FromString(pc.Value());
|
||||||
|
@@ -21,7 +21,6 @@
|
|||||||
#include "content/public/common/content_switches.h"
|
#include "content/public/common/content_switches.h"
|
||||||
#include "grit/cef_resources.h"
|
#include "grit/cef_resources.h"
|
||||||
#include "net/base/tcp_listen_socket.h"
|
#include "net/base/tcp_listen_socket.h"
|
||||||
#include "net/url_request/url_request_context_getter.h"
|
|
||||||
#include "ui/base/layout.h"
|
#include "ui/base/layout.h"
|
||||||
#include "ui/base/resource/resource_bundle.h"
|
#include "ui/base/resource/resource_bundle.h"
|
||||||
|
|
||||||
@@ -93,13 +92,10 @@ class CefDevToolsBindingHandler
|
|||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
CefDevToolsDelegate::CefDevToolsDelegate(
|
CefDevToolsDelegate::CefDevToolsDelegate(int port) {
|
||||||
int port,
|
|
||||||
net::URLRequestContextGetter* context_getter) {
|
|
||||||
devtools_http_handler_ = content::DevToolsHttpHandler::Start(
|
devtools_http_handler_ = content::DevToolsHttpHandler::Start(
|
||||||
new net::TCPListenSocketFactory("127.0.0.1", port),
|
new net::TCPListenSocketFactory("127.0.0.1", port),
|
||||||
"",
|
"",
|
||||||
context_getter,
|
|
||||||
this);
|
this);
|
||||||
|
|
||||||
binding_.reset(new CefDevToolsBindingHandler());
|
binding_.reset(new CefDevToolsBindingHandler());
|
||||||
@@ -120,11 +116,15 @@ std::string CefDevToolsDelegate::GetDiscoveryPageHTML() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool CefDevToolsDelegate::BundlesFrontendResources() {
|
bool CefDevToolsDelegate::BundlesFrontendResources() {
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CefDevToolsDelegate::GetFrontendResourcesBaseURL() {
|
FilePath CefDevToolsDelegate::GetDebugFrontendDir() {
|
||||||
return kChromeDevToolsURL;
|
return FilePath();
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string CefDevToolsDelegate::GetPageThumbnailData(const GURL& url) {
|
||||||
|
return std::string();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CefDevToolsDelegate::GetDevToolsURL(content::RenderViewHost* rvh,
|
std::string CefDevToolsDelegate::GetDevToolsURL(content::RenderViewHost* rvh,
|
||||||
|
@@ -14,17 +14,13 @@
|
|||||||
#include "content/public/browser/devtools_http_handler.h"
|
#include "content/public/browser/devtools_http_handler.h"
|
||||||
#include "content/public/browser/devtools_http_handler_delegate.h"
|
#include "content/public/browser/devtools_http_handler_delegate.h"
|
||||||
|
|
||||||
namespace net {
|
|
||||||
class URLRequestContextGetter;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace content {
|
namespace content {
|
||||||
class RenderViewHost;
|
class RenderViewHost;
|
||||||
}
|
}
|
||||||
|
|
||||||
class CefDevToolsDelegate : public content::DevToolsHttpHandlerDelegate {
|
class CefDevToolsDelegate : public content::DevToolsHttpHandlerDelegate {
|
||||||
public:
|
public:
|
||||||
CefDevToolsDelegate(int port, net::URLRequestContextGetter* context_getter);
|
explicit CefDevToolsDelegate(int port);
|
||||||
virtual ~CefDevToolsDelegate();
|
virtual ~CefDevToolsDelegate();
|
||||||
|
|
||||||
// Stops http server.
|
// Stops http server.
|
||||||
@@ -33,7 +29,8 @@ class CefDevToolsDelegate : public content::DevToolsHttpHandlerDelegate {
|
|||||||
// DevToolsHttpProtocolHandler::Delegate overrides.
|
// DevToolsHttpProtocolHandler::Delegate overrides.
|
||||||
virtual std::string GetDiscoveryPageHTML() OVERRIDE;
|
virtual std::string GetDiscoveryPageHTML() OVERRIDE;
|
||||||
virtual bool BundlesFrontendResources() OVERRIDE;
|
virtual bool BundlesFrontendResources() OVERRIDE;
|
||||||
virtual std::string GetFrontendResourcesBaseURL() OVERRIDE;
|
virtual FilePath GetDebugFrontendDir() OVERRIDE;
|
||||||
|
virtual std::string GetPageThumbnailData(const GURL& url) OVERRIDE;
|
||||||
|
|
||||||
// Returns the DevTools URL for the specified RenderViewHost.
|
// Returns the DevTools URL for the specified RenderViewHost.
|
||||||
std::string GetDevToolsURL(content::RenderViewHost* rvh, bool http_scheme);
|
std::string GetDevToolsURL(content::RenderViewHost* rvh, bool http_scheme);
|
||||||
|
@@ -131,8 +131,8 @@ class CefBeforeDownloadCallbackImpl : public CefBeforeDownloadCallback {
|
|||||||
if (!manager)
|
if (!manager)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
DownloadItem* item = manager->GetActiveDownloadItem(download_id);
|
DownloadItem* item = manager->GetDownload(download_id);
|
||||||
if (!item)
|
if (!item || !item->IsInProgress())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
FilePath result;
|
FilePath result;
|
||||||
@@ -182,8 +182,7 @@ class CefDownloadItemCallbackImpl : public CefDownloadItemCallback {
|
|||||||
|
|
||||||
scoped_refptr<content::DownloadManager> manager = GetDownloadManager();
|
scoped_refptr<content::DownloadManager> manager = GetDownloadManager();
|
||||||
if (manager) {
|
if (manager) {
|
||||||
content::DownloadItem* item =
|
DownloadItem* item = manager->GetDownload(download_id_);
|
||||||
manager->GetActiveDownloadItem(download_id_);
|
|
||||||
if (item && item->IsInProgress())
|
if (item && item->IsInProgress())
|
||||||
item->Cancel(true);
|
item->Cancel(true);
|
||||||
}
|
}
|
||||||
|
116
libcef/common/cef_messages.cc
Normal file
116
libcef/common/cef_messages.cc
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
// 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/cef_messages.h"
|
||||||
|
|
||||||
|
namespace IPC {
|
||||||
|
|
||||||
|
// Extracted from chrome/common/automation_messages.cc.
|
||||||
|
|
||||||
|
// Only the net::UploadData ParamTraits<> definition needs this definition, so
|
||||||
|
// keep this in the implementation file so we can forward declare UploadData in
|
||||||
|
// the header.
|
||||||
|
template <>
|
||||||
|
struct ParamTraits<net::UploadElement> {
|
||||||
|
typedef net::UploadElement param_type;
|
||||||
|
static void Write(Message* m, const param_type& p) {
|
||||||
|
WriteParam(m, static_cast<int>(p.type()));
|
||||||
|
switch (p.type()) {
|
||||||
|
case net::UploadElement::TYPE_BYTES: {
|
||||||
|
m->WriteData(p.bytes(), static_cast<int>(p.bytes_length()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
DCHECK(p.type() == net::UploadElement::TYPE_FILE);
|
||||||
|
WriteParam(m, p.file_path());
|
||||||
|
WriteParam(m, p.file_range_offset());
|
||||||
|
WriteParam(m, p.file_range_length());
|
||||||
|
WriteParam(m, p.expected_file_modification_time());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
static bool Read(const Message* m, PickleIterator* iter, param_type* r) {
|
||||||
|
int type;
|
||||||
|
if (!ReadParam(m, iter, &type))
|
||||||
|
return false;
|
||||||
|
switch (type) {
|
||||||
|
case net::UploadElement::TYPE_BYTES: {
|
||||||
|
const char* data;
|
||||||
|
int len;
|
||||||
|
if (!m->ReadData(iter, &data, &len))
|
||||||
|
return false;
|
||||||
|
r->SetToBytes(data, len);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
DCHECK(type == net::UploadElement::TYPE_FILE);
|
||||||
|
FilePath file_path;
|
||||||
|
uint64 offset, length;
|
||||||
|
base::Time expected_modification_time;
|
||||||
|
if (!ReadParam(m, iter, &file_path))
|
||||||
|
return false;
|
||||||
|
if (!ReadParam(m, iter, &offset))
|
||||||
|
return false;
|
||||||
|
if (!ReadParam(m, iter, &length))
|
||||||
|
return false;
|
||||||
|
if (!ReadParam(m, iter, &expected_modification_time))
|
||||||
|
return false;
|
||||||
|
r->SetToFilePathRange(file_path, offset, length,
|
||||||
|
expected_modification_time);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
static void Log(const param_type& p, std::string* l) {
|
||||||
|
l->append("<net::UploadElement>");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
void ParamTraits<scoped_refptr<net::UploadData> >::Write(Message* m,
|
||||||
|
const param_type& p) {
|
||||||
|
WriteParam(m, p.get() != NULL);
|
||||||
|
if (p) {
|
||||||
|
WriteParam(m, *p->elements());
|
||||||
|
WriteParam(m, p->identifier());
|
||||||
|
WriteParam(m, p->is_chunked());
|
||||||
|
WriteParam(m, p->last_chunk_appended());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ParamTraits<scoped_refptr<net::UploadData> >::Read(const Message* m,
|
||||||
|
PickleIterator* iter,
|
||||||
|
param_type* r) {
|
||||||
|
bool has_object;
|
||||||
|
if (!ReadParam(m, iter, &has_object))
|
||||||
|
return false;
|
||||||
|
if (!has_object)
|
||||||
|
return true;
|
||||||
|
std::vector<net::UploadElement> elements;
|
||||||
|
if (!ReadParam(m, iter, &elements))
|
||||||
|
return false;
|
||||||
|
int64 identifier;
|
||||||
|
if (!ReadParam(m, iter, &identifier))
|
||||||
|
return false;
|
||||||
|
bool is_chunked = false;
|
||||||
|
if (!ReadParam(m, iter, &is_chunked))
|
||||||
|
return false;
|
||||||
|
bool last_chunk_appended = false;
|
||||||
|
if (!ReadParam(m, iter, &last_chunk_appended))
|
||||||
|
return false;
|
||||||
|
*r = new net::UploadData;
|
||||||
|
(*r)->swap_elements(&elements);
|
||||||
|
(*r)->set_identifier(identifier);
|
||||||
|
(*r)->set_is_chunked(is_chunked);
|
||||||
|
(*r)->set_last_chunk_appended(last_chunk_appended);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ParamTraits<scoped_refptr<net::UploadData> >::Log(const param_type& p,
|
||||||
|
std::string* l) {
|
||||||
|
l->append("<net::UploadData>");
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace IPC
|
@@ -169,3 +169,23 @@ IPC_MESSAGE_ROUTED1(CefHostMsg_Response,
|
|||||||
// has been processed.
|
// has been processed.
|
||||||
IPC_MESSAGE_ROUTED1(CefHostMsg_ResponseAck,
|
IPC_MESSAGE_ROUTED1(CefHostMsg_ResponseAck,
|
||||||
int /* request_id */)
|
int /* request_id */)
|
||||||
|
|
||||||
|
|
||||||
|
// Singly-included section for struct and custom IPC traits.
|
||||||
|
#ifndef CEF_LIBCEF_COMMON_CEF_MESSAGES_H_
|
||||||
|
#define CEF_LIBCEF_COMMON_CEF_MESSAGES_H_
|
||||||
|
|
||||||
|
namespace IPC {
|
||||||
|
|
||||||
|
// Extracted from chrome/common/automation_messages.h.
|
||||||
|
template <>
|
||||||
|
struct ParamTraits<scoped_refptr<net::UploadData> > {
|
||||||
|
typedef scoped_refptr<net::UploadData> param_type;
|
||||||
|
static void Write(Message* m, const param_type& p);
|
||||||
|
static bool Read(const Message* m, PickleIterator* iter, param_type* r);
|
||||||
|
static void Log(const param_type& p, std::string* l);
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace IPC
|
||||||
|
|
||||||
|
#endif // CEF_LIBCEF_COMMON_CEF_MESSAGES_H_
|
||||||
|
@@ -225,7 +225,7 @@ void CefBrowserImpl::GetFrameNames(std::vector<CefString>& names) {
|
|||||||
if (main_frame) {
|
if (main_frame) {
|
||||||
WebFrame* cur = main_frame;
|
WebFrame* cur = main_frame;
|
||||||
do {
|
do {
|
||||||
names.push_back(CefString(cur->name().utf8()));
|
names.push_back(CefString(cur->uniqueName().utf8()));
|
||||||
cur = cur->traverseNext(true);
|
cur = cur->traverseNext(true);
|
||||||
} while (cur != main_frame);
|
} while (cur != main_frame);
|
||||||
}
|
}
|
||||||
@@ -357,7 +357,7 @@ CefRefPtr<CefFrameImpl> CefBrowserImpl::GetWebFrameImpl(
|
|||||||
|
|
||||||
int64 parent_id = frame->parent() == NULL ?
|
int64 parent_id = frame->parent() == NULL ?
|
||||||
kInvalidFrameId : frame->parent()->identifier();
|
kInvalidFrameId : frame->parent()->identifier();
|
||||||
string16 name = frame->name();
|
string16 name = frame->uniqueName();
|
||||||
|
|
||||||
// Notify the browser that the frame has been identified.
|
// Notify the browser that the frame has been identified.
|
||||||
Send(new CefHostMsg_FrameIdentified(routing_id(), frame_id, parent_id, name));
|
Send(new CefHostMsg_FrameIdentified(routing_id(), frame_id, parent_id, name));
|
||||||
|
@@ -196,7 +196,7 @@ CefString CefFrameImpl::GetName() {
|
|||||||
CEF_REQUIRE_RT_RETURN(name);
|
CEF_REQUIRE_RT_RETURN(name);
|
||||||
|
|
||||||
if (frame_)
|
if (frame_)
|
||||||
name = frame_->name();
|
name = frame_->uniqueName();
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
Index: pylib/gyp/input.py
|
Index: pylib/gyp/input.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- pylib/gyp/input.py (revision 1501)
|
--- pylib/gyp/input.py (revision 1508)
|
||||||
+++ pylib/gyp/input.py (working copy)
|
+++ pylib/gyp/input.py (working copy)
|
||||||
@@ -685,7 +685,8 @@
|
@@ -824,7 +824,8 @@
|
||||||
# that don't load quickly, this can be faster than
|
# that don't load quickly, this can be faster than
|
||||||
# <!(python modulename param eters). Do this in |build_file_dir|.
|
# <!(python modulename param eters). Do this in |build_file_dir|.
|
||||||
oldwd = os.getcwd() # Python doesn't like os.open('.'): no fchdir.
|
oldwd = os.getcwd() # Python doesn't like os.open('.'): no fchdir.
|
||||||
|
Reference in New Issue
Block a user