Update to Chromium revision 176706.

- See crbug.com/167209 for a description of why NSPrincipalClass needs to be specified in helper-Info.plist.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@987 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2013-01-15 19:12:28 +00:00
parent 5061db7c1b
commit d56fc817d5
15 changed files with 139 additions and 117 deletions

View File

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

View File

@ -656,7 +656,7 @@
'target_name': 'cef_pak',
'type': 'none',
'dependencies': [
'<(DEPTH)/content/browser/debugger/devtools_resources.gyp:devtools_resources',
'<(DEPTH)/content/browser/devtools/devtools_resources.gyp:devtools_resources',
'<(DEPTH)/content/content_resources.gyp:content_resources',
'<(DEPTH)/net/net.gyp:net_resources',
'<(DEPTH)/ui/ui.gyp:ui_resources',
@ -851,7 +851,6 @@
'libcef/browser/scheme_impl.cc',
'libcef/browser/scheme_registration.cc',
'libcef/browser/scheme_registration.h',
'libcef/browser/sqlite_diagnostics_stub.cc',
'libcef/browser/stream_impl.cc',
'libcef/browser/stream_impl.h',
'libcef/browser/trace_impl.cc',

View File

@ -1608,7 +1608,7 @@ void CefBrowserHostImpl::UpdatePreferredSize(content::WebContents* source,
void CefBrowserHostImpl::RequestMediaAccessPermission(
content::WebContents* web_contents,
const content::MediaStreamRequest* request,
const content::MediaStreamRequest& request,
const content::MediaResponseCallback& callback) {
CEF_CURRENTLY_ON_UIT();
@ -1734,7 +1734,8 @@ void CefBrowserHostImpl::DidFailLoad(
OnLoadEnd(frame, validated_url, error_code);
}
void CefBrowserHostImpl::PluginCrashed(const FilePath& plugin_path) {
void CefBrowserHostImpl::PluginCrashed(const FilePath& plugin_path,
base::ProcessId plugin_pid) {
if (client_.get()) {
CefRefPtr<CefLoadHandler> handler = client_->GetLoadHandler();
if (handler.get())

View File

@ -291,7 +291,7 @@ class CefBrowserHostImpl : public CefBrowserHost,
const gfx::Size& pref_size) OVERRIDE;
virtual void RequestMediaAccessPermission(
content::WebContents* web_contents,
const content::MediaStreamRequest* request,
const content::MediaStreamRequest& request,
const content::MediaResponseCallback& callback) OVERRIDE;
// content::WebContentsObserver methods.
@ -321,7 +321,8 @@ class CefBrowserHostImpl : public CefBrowserHost,
int error_code,
const string16& error_description,
content::RenderViewHost* render_view_host) OVERRIDE;
virtual void PluginCrashed(const FilePath& plugin_path) OVERRIDE;
virtual void PluginCrashed(const FilePath& plugin_path,
base::ProcessId plugin_pid) OVERRIDE;
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
// Override to provide a thread safe implementation.
virtual bool Send(IPC::Message* message) OVERRIDE;

View File

@ -24,73 +24,99 @@
#include "ui/base/layout.h"
#include "ui/base/resource/resource_bundle.h"
namespace {
// CefDevToolsBindingHandler
class CefDevToolsBindingHandler
: public content::DevToolsHttpHandler::RenderViewHostBinding {
public:
CefDevToolsBindingHandler() {
}
CefDevToolsBindingHandler::CefDevToolsBindingHandler() {
}
virtual std::string GetIdentifier(content::RenderViewHost* rvh) OVERRIDE {
int process_id = rvh->GetProcess()->GetID();
int routing_id = rvh->GetRoutingID();
std::string CefDevToolsBindingHandler::GetIdentifier(
content::DevToolsAgentHost* agent_host) {
GarbageCollect();
if (random_seed_.empty()) {
// Generate a random seed that is used to make identifier guessing more
// difficult.
random_seed_ = base::StringPrintf("%lf|%u",
base::Time::Now().ToDoubleT(), base::RandInt(0, INT_MAX));
}
const std::string& identifier =
GetIdentifier(agent_host->GetRenderViewHost());
agents_map_[identifier] = agent_host;
return identifier;
}
// Create a key that combines RVH IDs and the random seed.
std::string key = base::StringPrintf("%d|%d|%s",
process_id,
routing_id,
random_seed_.c_str());
content::DevToolsAgentHost* CefDevToolsBindingHandler::ForIdentifier(
const std::string& identifier) {
GarbageCollect();
// Return an MD5 hash of the key.
return base::MD5String(key);
}
// Return the existing agent host, if any.
AgentsMap::const_iterator it = agents_map_.find(identifier);
if (it != agents_map_.end())
return it->second;
virtual content::RenderViewHost* ForIdentifier(
const std::string& identifier) OVERRIDE {
// Iterate through the existing RVH instances to find a match.
for (content::RenderProcessHost::iterator it(
content::RenderProcessHost::AllHostsIterator());
!it.IsAtEnd(); it.Advance()) {
content::RenderProcessHost* render_process_host = it.GetCurrentValue();
DCHECK(render_process_host);
// Iterate through the existing RVH instances to find a match.
for (content::RenderProcessHost::iterator it(
content::RenderProcessHost::AllHostsIterator());
!it.IsAtEnd(); it.Advance()) {
content::RenderProcessHost* render_process_host = it.GetCurrentValue();
DCHECK(render_process_host);
// Ignore processes that don't have a connection, such as crashed
// contents.
if (!render_process_host->HasConnection())
// Ignore processes that don't have a connection, such as crashed contents.
if (!render_process_host->HasConnection())
continue;
content::RenderProcessHost::RenderWidgetHostsIterator rwit(
render_process_host->GetRenderWidgetHostsIterator());
for (; !rwit.IsAtEnd(); rwit.Advance()) {
const content::RenderWidgetHost* widget = rwit.GetCurrentValue();
DCHECK(widget);
if (!widget || !widget->IsRenderView())
continue;
content::RenderProcessHost::RenderWidgetHostsIterator rwit(
render_process_host->GetRenderWidgetHostsIterator());
for (; !rwit.IsAtEnd(); rwit.Advance()) {
const content::RenderWidgetHost* widget = rwit.GetCurrentValue();
DCHECK(widget);
if (!widget || !widget->IsRenderView())
continue;
content::RenderViewHost* host =
content::RenderViewHost::From(
const_cast<content::RenderWidgetHost*>(widget));
if (GetIdentifier(host) == identifier)
return host;
content::RenderViewHost* host =
content::RenderViewHost::From(
const_cast<content::RenderWidgetHost*>(widget));
if (GetIdentifier(host) == identifier) {
// May create a new agent host.
scoped_refptr<content::DevToolsAgentHost> agent_host(
content::DevToolsAgentHost::GetFor(host));
agents_map_[identifier] = agent_host;
return agent_host;
}
}
return NULL;
}
private:
std::string random_seed_;
};
return NULL;
}
} // namespace
std::string CefDevToolsBindingHandler::GetIdentifier(
content::RenderViewHost* rvh) {
int process_id = rvh->GetProcess()->GetID();
int routing_id = rvh->GetRoutingID();
if (random_seed_.empty()) {
// Generate a random seed that is used to make identifier guessing more
// difficult.
random_seed_ = base::StringPrintf("%lf|%u",
base::Time::Now().ToDoubleT(), base::RandInt(0, INT_MAX));
}
// Create a key that combines RVH IDs and the random seed.
std::string key = base::StringPrintf("%d|%d|%s",
process_id,
routing_id,
random_seed_.c_str());
// Return an MD5 hash of the key.
return base::MD5String(key);
}
void CefDevToolsBindingHandler::GarbageCollect() {
AgentsMap::iterator it = agents_map_.begin();
while (it != agents_map_.end()) {
if (!it->second->GetRenderViewHost())
agents_map_.erase(it++);
else
++it;
}
}
// CefDevToolsDelegate
CefDevToolsDelegate::CefDevToolsDelegate(int port) {
devtools_http_handler_ = content::DevToolsHttpHandler::Start(
@ -99,7 +125,7 @@ CefDevToolsDelegate::CefDevToolsDelegate(int port) {
this);
binding_.reset(new CefDevToolsBindingHandler());
devtools_http_handler_->SetRenderViewHostBinding(binding_.get());
devtools_http_handler_->SetDevToolsAgentHostBinding(binding_.get());
}
CefDevToolsDelegate::~CefDevToolsDelegate() {

View File

@ -6,11 +6,13 @@
#define CEF_LIBCEF_BROWSER_DEVTOOLS_DELEGATE_H_
#pragma once
#include <map>
#include <vector>
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "content/public/browser/devtools_agent_host.h"
#include "content/public/browser/devtools_http_handler.h"
#include "content/public/browser/devtools_http_handler_delegate.h"
@ -18,6 +20,33 @@ namespace content {
class RenderViewHost;
}
class CefDevToolsBindingHandler
: public content::DevToolsHttpHandler::DevToolsAgentHostBinding {
public:
CefDevToolsBindingHandler();
// DevToolsAgentHostBinding overrides.
virtual std::string GetIdentifier(
content::DevToolsAgentHost* agent_host) OVERRIDE;
virtual content::DevToolsAgentHost* ForIdentifier(
const std::string& identifier) OVERRIDE;
std::string GetIdentifier(content::RenderViewHost* rvh);
private:
void GarbageCollect();
std::string random_seed_;
// Map of identifier to DevToolsAgentHost. Keeps the DevToolsAgentHost objects
// alive until the associated RVH is disconnected.
typedef std::map<std::string, scoped_refptr<content::DevToolsAgentHost> >
AgentsMap;
AgentsMap agents_map_;
DISALLOW_COPY_AND_ASSIGN(CefDevToolsBindingHandler);
};
class CefDevToolsDelegate : public content::DevToolsHttpHandlerDelegate {
public:
explicit CefDevToolsDelegate(int port);
@ -38,7 +67,7 @@ class CefDevToolsDelegate : public content::DevToolsHttpHandlerDelegate {
private:
content::DevToolsHttpHandler* devtools_http_handler_;
scoped_ptr<content::DevToolsHttpHandler::RenderViewHostBinding> binding_;
scoped_ptr<CefDevToolsBindingHandler> binding_;
DISALLOW_COPY_AND_ASSIGN(CefDevToolsDelegate);
};

View File

@ -1,10 +0,0 @@
// 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 "chrome/browser/diagnostics/sqlite_diagnostics.h"
// Used by SQLitePersistentCookieStore
sql::ErrorDelegate* GetErrorHandlerForCookieDb() {
return NULL;
}

View File

@ -7,6 +7,7 @@
#include "libcef/common/http_header_utils.h"
#include "libcef/common/request_impl.h"
#include "libcef/common/task_runner_impl.h"
#include "base/logging.h"
#include "net/base/upload_data.h"
@ -43,12 +44,20 @@ class BytesElementReader : public net::UploadBytesElementReader {
DISALLOW_COPY_AND_ASSIGN(BytesElementReader);
};
base::TaskRunner* GetFileTaskRunner() {
scoped_refptr<base::SequencedTaskRunner> task_runner =
CefTaskRunnerImpl::GetTaskRunner(TID_FILE);
DCHECK(task_runner);
return task_runner;
}
// A subclass of net::UploadFileElementReader that keeps the associated
// UploadElement alive until the request completes.
class FileElementReader : public net::UploadFileElementReader {
public:
explicit FileElementReader(scoped_ptr<net::UploadElement> element)
: net::UploadFileElementReader(
GetFileTaskRunner(),
element->file_path(),
element->file_range_offset(),
element->file_range_length(),

View File

@ -120,7 +120,7 @@ CefBinaryValueImpl::CefBinaryValueImpl(char* data,
bool copy)
: CefValueBase<CefBinaryValue, base::BinaryValue>(
copy ? base::BinaryValue::CreateWithCopiedBuffer(data, data_size) :
base::BinaryValue::Create(data, data_size),
new base::BinaryValue(scoped_ptr<char[]>(data), data_size),
NULL, kOwnerWillDelete, true, NULL) {
}

View File

@ -31,11 +31,6 @@ patches = [
'name': 'webkit_451',
'path': '../third_party/WebKit/Source/',
},
{
# http://code.google.com/p/chromium/issues/detail?id=155761
'name': 'content_popups',
'path': '../content/',
},
{
# http://code.google.com/p/chromiumembedded/issues/detail?id=364
'name': 'spi_webcore_364',

View File

@ -1,31 +0,0 @@
Index: browser/web_contents/web_contents_impl.cc
===================================================================
--- browser/web_contents/web_contents_impl.cc (revision 173683)
+++ browser/web_contents/web_contents_impl.cc (working copy)
@@ -1397,8 +1397,10 @@
new RenderWidgetHostImpl(this, process, route_id);
created_widgets_.insert(widget_host);
- RenderWidgetHostViewPort* widget_view =
- RenderWidgetHostViewPort::CreateViewForWidget(widget_host);
+ RenderWidgetHostViewPort* widget_view = RenderWidgetHostViewPort::FromRWHV(
+ view_->CreateViewForPopupWidget(widget_host));
+ if (!widget_view)
+ widget_view = RenderWidgetHostViewPort::CreateViewForWidget(widget_host);
if (!is_fullscreen) {
// Popups should not get activated.
widget_view->SetPopupType(popup_type);
Index: public/browser/web_contents_view.h
===================================================================
--- public/browser/web_contents_view.h (revision 173683)
+++ public/browser/web_contents_view.h (working copy)
@@ -38,6 +38,9 @@
virtual RenderWidgetHostView* CreateViewForWidget(
RenderWidgetHost* render_widget_host) = 0;
+ virtual RenderWidgetHostView* CreateViewForPopupWidget(
+ RenderWidgetHost* render_widget_host) { return NULL; }
+
// Returns the native widget that contains the contents of the tab.
virtual gfx::NativeView GetNativeView() const = 0;

View File

@ -1,14 +1,14 @@
Index: pylib/gyp/input.py
===================================================================
--- pylib/gyp/input.py (revision 1527)
--- pylib/gyp/input.py (revision 1556)
+++ pylib/gyp/input.py (working copy)
@@ -851,7 +851,8 @@
@@ -857,7 +857,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.
- os.chdir(build_file_dir)
+ if not build_file_dir is None:
+ os.chdir(build_file_dir)
try:
parsed_contents = shlex.split(contents)
py_module = __import__(parsed_contents[0])
parsed_contents = shlex.split(contents)

View File

@ -1,6 +1,6 @@
Index: contrib/minizip/unzip.c
===================================================================
--- contrib/minizip/unzip.c (revision 153668)
--- contrib/minizip/unzip.c (revision 176706)
+++ contrib/minizip/unzip.c (working copy)
@@ -69,7 +69,7 @@
#include <string.h>
@ -10,4 +10,4 @@ Index: contrib/minizip/unzip.c
+// #define NOUNCRYPT
#endif
#if defined(USE_SYSTEM_ZLIB)
#include "third_party/zlib/zlib.h"

View File

@ -24,6 +24,8 @@
<string>10.5.0</string>
<key>LSUIElement</key>
<string>1</string>
<key>NSPrincipalClass</key>
<string>ClientApplication</string>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
</dict>

View File

@ -23,10 +23,11 @@ chrome_src = os.path.abspath(os.path.join(cef_dir, os.pardir))
sys.path.insert(0, os.path.join(chrome_src, 'tools', 'gyp', 'pylib'))
import gyp
# Add paths so that pymod_do_main(grit_info ...) can import files.
# Add paths so that pymod_do_main(...) can import files.
sys.path.insert(1, os.path.join(chrome_src, 'tools', 'grit'))
sys.path.insert(1, os.path.join(chrome_src, 'chrome', 'tools', 'build'))
sys.path.insert(1, os.path.join(chrome_src, 'third_party', 'WebKit',
'Source', 'WebCore', 'WebCore.gyp', 'scripts'))
# On Windows, Psyco shortens warm runs of build/gyp_chromium by about
# 20 seconds on a z600 machine with 12 GB of RAM, from 90 down to 70