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:
Marshall Greenblatt
2012-10-04 19:17:13 +00:00
parent 13afc1226f
commit 163cc7d9cc
14 changed files with 159 additions and 33 deletions

View File

@@ -17,5 +17,5 @@
{
'chromium_url': 'http://src.chromium.org/svn/trunk/src',
'chromium_revision': '157509',
'chromium_revision': '160122',
}

View File

@@ -852,6 +852,7 @@
'libcef/browser/zip_reader_impl.h',
'libcef/common/cef_message_generator.cc',
'libcef/common/cef_message_generator.h',
'libcef/common/cef_messages.cc',
'libcef/common/cef_messages.h',
'libcef/common/cef_switches.cc',
'libcef/common/cef_switches.h',

View File

@@ -270,10 +270,6 @@ content::SpeechRecognitionPreferences*
return speech_recognition_preferences_.get();
}
bool CefBrowserContext::DidLastSessionExitCleanly() {
return true;
}
quota::SpecialStoragePolicy* CefBrowserContext::GetSpecialStoragePolicy() {
return NULL;
}

View File

@@ -45,7 +45,6 @@ class CefBrowserContext : public content::BrowserContext {
GetGeolocationPermissionContext() OVERRIDE;
virtual content::SpeechRecognitionPreferences*
GetSpeechRecognitionPreferences() OVERRIDE;
virtual bool DidLastSessionExitCleanly() OVERRIDE;
virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE;
private:

View File

@@ -73,9 +73,7 @@ void CefBrowserMainParts::PreMainMessageLoopRun() {
command_line.GetSwitchValueASCII(switches::kRemoteDebuggingPort);
int port;
if (base::StringToInt(port_str, &port) && port > 0 && port < 65535) {
devtools_delegate_ = new CefDevToolsDelegate(
port,
browser_context_->GetRequestContext());
devtools_delegate_ = new CefDevToolsDelegate(port);
} else {
DLOG(WARNING) << "Invalid http debugger port number " << port;
}

View File

@@ -349,7 +349,7 @@ bool CefCookieManagerImpl::GetCefCookie(const GURL& url,
std::string cookie_path = net::CanonicalCookie::CanonPath(url, pc);
base::Time creation_time = base::Time::Now();
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.value).FromString(pc.Value());

View File

@@ -21,7 +21,6 @@
#include "content/public/common/content_switches.h"
#include "grit/cef_resources.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/resource/resource_bundle.h"
@@ -93,13 +92,10 @@ class CefDevToolsBindingHandler
} // namespace
CefDevToolsDelegate::CefDevToolsDelegate(
int port,
net::URLRequestContextGetter* context_getter) {
CefDevToolsDelegate::CefDevToolsDelegate(int port) {
devtools_http_handler_ = content::DevToolsHttpHandler::Start(
new net::TCPListenSocketFactory("127.0.0.1", port),
"",
context_getter,
this);
binding_.reset(new CefDevToolsBindingHandler());
@@ -120,11 +116,15 @@ std::string CefDevToolsDelegate::GetDiscoveryPageHTML() {
}
bool CefDevToolsDelegate::BundlesFrontendResources() {
return false;
return true;
}
std::string CefDevToolsDelegate::GetFrontendResourcesBaseURL() {
return kChromeDevToolsURL;
FilePath CefDevToolsDelegate::GetDebugFrontendDir() {
return FilePath();
}
std::string CefDevToolsDelegate::GetPageThumbnailData(const GURL& url) {
return std::string();
}
std::string CefDevToolsDelegate::GetDevToolsURL(content::RenderViewHost* rvh,

View File

@@ -14,17 +14,13 @@
#include "content/public/browser/devtools_http_handler.h"
#include "content/public/browser/devtools_http_handler_delegate.h"
namespace net {
class URLRequestContextGetter;
}
namespace content {
class RenderViewHost;
}
class CefDevToolsDelegate : public content::DevToolsHttpHandlerDelegate {
public:
CefDevToolsDelegate(int port, net::URLRequestContextGetter* context_getter);
explicit CefDevToolsDelegate(int port);
virtual ~CefDevToolsDelegate();
// Stops http server.
@@ -33,7 +29,8 @@ class CefDevToolsDelegate : public content::DevToolsHttpHandlerDelegate {
// DevToolsHttpProtocolHandler::Delegate overrides.
virtual std::string GetDiscoveryPageHTML() 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.
std::string GetDevToolsURL(content::RenderViewHost* rvh, bool http_scheme);

View File

@@ -131,8 +131,8 @@ class CefBeforeDownloadCallbackImpl : public CefBeforeDownloadCallback {
if (!manager)
return;
DownloadItem* item = manager->GetActiveDownloadItem(download_id);
if (!item)
DownloadItem* item = manager->GetDownload(download_id);
if (!item || !item->IsInProgress())
return;
FilePath result;
@@ -182,8 +182,7 @@ class CefDownloadItemCallbackImpl : public CefDownloadItemCallback {
scoped_refptr<content::DownloadManager> manager = GetDownloadManager();
if (manager) {
content::DownloadItem* item =
manager->GetActiveDownloadItem(download_id_);
DownloadItem* item = manager->GetDownload(download_id_);
if (item && item->IsInProgress())
item->Cancel(true);
}

View 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

View File

@@ -169,3 +169,23 @@ IPC_MESSAGE_ROUTED1(CefHostMsg_Response,
// has been processed.
IPC_MESSAGE_ROUTED1(CefHostMsg_ResponseAck,
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_

View File

@@ -225,7 +225,7 @@ void CefBrowserImpl::GetFrameNames(std::vector<CefString>& names) {
if (main_frame) {
WebFrame* cur = main_frame;
do {
names.push_back(CefString(cur->name().utf8()));
names.push_back(CefString(cur->uniqueName().utf8()));
cur = cur->traverseNext(true);
} while (cur != main_frame);
}
@@ -357,7 +357,7 @@ CefRefPtr<CefFrameImpl> CefBrowserImpl::GetWebFrameImpl(
int64 parent_id = frame->parent() == NULL ?
kInvalidFrameId : frame->parent()->identifier();
string16 name = frame->name();
string16 name = frame->uniqueName();
// Notify the browser that the frame has been identified.
Send(new CefHostMsg_FrameIdentified(routing_id(), frame_id, parent_id, name));

View File

@@ -196,7 +196,7 @@ CefString CefFrameImpl::GetName() {
CEF_REQUIRE_RT_RETURN(name);
if (frame_)
name = frame_->name();
name = frame_->uniqueName();
return name;
}

View File

@@ -1,8 +1,8 @@
Index: pylib/gyp/input.py
===================================================================
--- pylib/gyp/input.py (revision 1501)
--- pylib/gyp/input.py (revision 1508)
+++ pylib/gyp/input.py (working copy)
@@ -685,7 +685,8 @@
@@ -824,7 +824,8 @@
# that don't load quickly, this can be faster than
# <!(python modulename param eters). Do this in |build_file_dir|.
oldwd = os.getcwd() # Python doesn't like os.open('.'): no fchdir.