Update to Chromium revision 614d31da (#423768)

- Fix PDF extension loading after showing the plugin placeholder (issue #2020)
This commit is contained in:
Marshall Greenblatt
2016-10-21 15:52:29 -04:00
parent 07d12b78e1
commit c9e81c082f
75 changed files with 725 additions and 502 deletions

View File

@ -7,5 +7,5 @@
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding # https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
{ {
'chromium_checkout': '9cedf75377d817c6b32a01f1d30fbe10663b8bb8', 'chromium_checkout': '614d31daee2f61b0180df403a8ad43f20b9f6dd7',
} }

View File

@ -138,20 +138,13 @@ base::LazyInstance<ImplManager> g_manager = LAZY_INSTANCE_INITIALIZER;
// CefBrowserContext sharing the same VisitedLinkMaster. // CefBrowserContext sharing the same VisitedLinkMaster.
class CefVisitedLinkListener : public visitedlink::VisitedLinkMaster::Listener { class CefVisitedLinkListener : public visitedlink::VisitedLinkMaster::Listener {
public: public:
CefVisitedLinkListener() CefVisitedLinkListener() {
: master_(nullptr) {
}
void set_master(visitedlink::VisitedLinkMaster* master) {
DCHECK(!master_);
master_ = master;
} }
void CreateListenerForContext(const CefBrowserContext* context) { void CreateListenerForContext(const CefBrowserContext* context) {
CEF_REQUIRE_UIT(); CEF_REQUIRE_UIT();
std::unique_ptr<visitedlink::VisitedLinkEventListener> listener( auto listener = base::MakeUnique<visitedlink::VisitedLinkEventListener>(
new visitedlink::VisitedLinkEventListener( const_cast<CefBrowserContext*>(context));
master_, const_cast<CefBrowserContext*>(context)));
listener_map_.insert(std::make_pair(context, std::move(listener))); listener_map_.insert(std::make_pair(context, std::move(listener)));
} }
@ -164,11 +157,11 @@ class CefVisitedLinkListener : public visitedlink::VisitedLinkMaster::Listener {
// visitedlink::VisitedLinkMaster::Listener methods. // visitedlink::VisitedLinkMaster::Listener methods.
void NewTable(base::SharedMemory* shared_memory) override { void NewTable(mojo::SharedBufferHandle table) override {
CEF_REQUIRE_UIT(); CEF_REQUIRE_UIT();
ListenerMap::iterator it = listener_map_.begin(); ListenerMap::iterator it = listener_map_.begin();
for (; it != listener_map_.end(); ++it) for (; it != listener_map_.end(); ++it)
it->second->NewTable(shared_memory); it->second->NewTable(table);
} }
void Add(visitedlink::VisitedLinkCommon::Fingerprint fingerprint) override { void Add(visitedlink::VisitedLinkCommon::Fingerprint fingerprint) override {
@ -186,12 +179,10 @@ class CefVisitedLinkListener : public visitedlink::VisitedLinkMaster::Listener {
} }
private: private:
visitedlink::VisitedLinkMaster* master_;
// Map of CefBrowserContext to the associated VisitedLinkEventListener. // Map of CefBrowserContext to the associated VisitedLinkEventListener.
typedef std::map<const CefBrowserContext*, typedef std::map<const CefBrowserContext*,
std::unique_ptr<visitedlink::VisitedLinkEventListener> > std::unique_ptr<visitedlink::VisitedLinkEventListener> >
ListenerMap; ListenerMap;
ListenerMap listener_map_; ListenerMap listener_map_;
DISALLOW_COPY_AND_ASSIGN(CefVisitedLinkListener); DISALLOW_COPY_AND_ASSIGN(CefVisitedLinkListener);
@ -262,7 +253,6 @@ void CefBrowserContextImpl::Initialize() {
new visitedlink::VisitedLinkMaster(visitedlink_listener_, this, new visitedlink::VisitedLinkMaster(visitedlink_listener_, this,
!visited_link_path.empty(), false, !visited_link_path.empty(), false,
visited_link_path, 0)); visited_link_path, 0));
visitedlink_listener_->set_master(visitedlink_master_.get());
visitedlink_listener_->CreateListenerForContext(this); visitedlink_listener_->CreateListenerForContext(this);
visitedlink_master_->Init(); visitedlink_master_->Init();

View File

@ -2231,6 +2231,7 @@ bool CefBrowserHostImpl::ShouldCreateWebContents(
void CefBrowserHostImpl::WebContentsCreated( void CefBrowserHostImpl::WebContentsCreated(
content::WebContents* source_contents, content::WebContents* source_contents,
int opener_render_process_id,
int opener_render_frame_id, int opener_render_frame_id,
const std::string& frame_name, const std::string& frame_name,
const GURL& target_url, const GURL& target_url,

View File

@ -396,6 +396,7 @@ class CefBrowserHostImpl : public CefBrowserHost,
content::WebContentsView** view, content::WebContentsView** view,
content::RenderViewHostDelegateView** delegate_view) override; content::RenderViewHostDelegateView** delegate_view) override;
void WebContentsCreated(content::WebContents* source_contents, void WebContentsCreated(content::WebContents* source_contents,
int opener_render_process_id,
int opener_render_frame_id, int opener_render_frame_id,
const std::string& frame_name, const std::string& frame_name,
const GURL& target_url, const GURL& target_url,

View File

@ -137,27 +137,10 @@ scoped_refptr<CefBrowserInfo> CefBrowserInfoManager::CreatePopupBrowserInfo(
return browser_info; return browser_info;
} }
void CefBrowserInfoManager::OnCreateWindow(
int render_process_id,
const ViewHostMsg_CreateWindow_Params& params) {
DCHECK_NE(render_process_id, content::ChildProcessHost::kInvalidUniqueID);
DCHECK_GT(params.opener_id, 0);
DCHECK_GT(params.opener_render_frame_id, 0);
std::unique_ptr<CefBrowserInfoManager::PendingPopup> pending_popup(
new CefBrowserInfoManager::PendingPopup);
pending_popup->step = CefBrowserInfoManager::PendingPopup::ON_CREATE_WINDOW;
pending_popup->opener_process_id = render_process_id;
pending_popup->opener_view_id = params.opener_id;
pending_popup->opener_frame_id = params.opener_render_frame_id;
pending_popup->target_url = params.target_url;
pending_popup->target_frame_name = params.frame_name;
PushPendingPopup(std::move(pending_popup));
}
bool CefBrowserInfoManager::CanCreateWindow( bool CefBrowserInfoManager::CanCreateWindow(
const GURL& target_url, const GURL& target_url,
const content::Referrer& referrer, const content::Referrer& referrer,
const std::string& frame_name,
WindowOpenDisposition disposition, WindowOpenDisposition disposition,
const blink::WebWindowFeatures& features, const blink::WebWindowFeatures& features,
bool user_gesture, bool user_gesture,
@ -166,18 +149,13 @@ bool CefBrowserInfoManager::CanCreateWindow(
int opener_render_view_id, int opener_render_view_id,
int opener_render_frame_id, int opener_render_frame_id,
bool* no_javascript_access) { bool* no_javascript_access) {
std::unique_ptr<CefBrowserInfoManager::PendingPopup> pending_popup = DCHECK_NE(render_process_id, content::ChildProcessHost::kInvalidUniqueID);
PopPendingPopup(CefBrowserInfoManager::PendingPopup::ON_CREATE_WINDOW, DCHECK_GT(opener_render_view_id, 0);
render_process_id, opener_render_view_id, target_url); DCHECK_GT(opener_render_frame_id, 0);
DCHECK(pending_popup.get());
DCHECK(!pending_popup->platform_delegate.get());
bool is_guest_view = false; bool is_guest_view = false;
CefRefPtr<CefBrowserHostImpl> browser = CefRefPtr<CefBrowserHostImpl> browser = extensions::GetOwnerBrowserForView(
extensions::GetOwnerBrowserForView( render_process_id, opener_render_view_id, &is_guest_view);
pending_popup->opener_process_id,
pending_popup->opener_view_id,
&is_guest_view);
DCHECK(browser.get()); DCHECK(browser.get());
if (!browser.get()) { if (!browser.get()) {
// Cancel the popup. // Cancel the popup.
@ -210,6 +188,14 @@ bool CefBrowserInfoManager::CanCreateWindow(
window_info->SetAsPopup(NULL, CefString()); window_info->SetAsPopup(NULL, CefString());
#endif #endif
auto pending_popup = base::MakeUnique<CefBrowserInfoManager::PendingPopup>();
pending_popup->step = CefBrowserInfoManager::PendingPopup::CAN_CREATE_WINDOW;
pending_popup->opener_process_id = render_process_id;
pending_popup->opener_view_id = opener_render_view_id;
pending_popup->opener_frame_id = opener_render_frame_id;
pending_popup->target_url = target_url;
pending_popup->target_frame_name = frame_name;
// Start with the current browser's settings. // Start with the current browser's settings.
pending_popup->client = client; pending_popup->client = client;
pending_popup->settings = browser->settings(); pending_popup->settings = browser->settings();
@ -262,9 +248,6 @@ bool CefBrowserInfoManager::CanCreateWindow(
CefBrowserPlatformDelegate::Create(create_params); CefBrowserPlatformDelegate::Create(create_params);
CHECK(pending_popup->platform_delegate.get()); CHECK(pending_popup->platform_delegate.get());
pending_popup->step =
CefBrowserInfoManager::PendingPopup::CAN_CREATE_WINDOW;
// Filtering needs to be done on the UI thread. // Filtering needs to be done on the UI thread.
CEF_POST_TASK(CEF_UIT, CEF_POST_TASK(CEF_UIT,
base::Bind(FilterPendingPopupURL, render_process_id, base::Bind(FilterPendingPopupURL, render_process_id,

View File

@ -34,7 +34,6 @@ class Message;
} }
class CefBrowserPlatformDelegate; class CefBrowserPlatformDelegate;
struct ViewHostMsg_CreateWindow_Params;
// Singleton object for managing BrowserInfo instances. // Singleton object for managing BrowserInfo instances.
class CefBrowserInfoManager : public content::RenderProcessHostObserver { class CefBrowserInfoManager : public content::RenderProcessHostObserver {
@ -58,16 +57,12 @@ class CefBrowserInfoManager : public content::RenderProcessHostObserver {
content::WebContents* new_contents, content::WebContents* new_contents,
bool is_windowless); bool is_windowless);
// Called from CefBrowserMessageFilter::OnCreateWindow. See comments on
// PendingPopup for more information.
void OnCreateWindow(int render_process_id,
const ViewHostMsg_CreateWindow_Params& params);
// Called from CefContentBrowserClient::CanCreateWindow. See comments on // Called from CefContentBrowserClient::CanCreateWindow. See comments on
// PendingPopup for more information. // PendingPopup for more information.
bool CanCreateWindow( bool CanCreateWindow(
const GURL& target_url, const GURL& target_url,
const content::Referrer& referrer, const content::Referrer& referrer,
const std::string& frame_name,
WindowOpenDisposition disposition, WindowOpenDisposition disposition,
const blink::WebWindowFeatures& features, const blink::WebWindowFeatures& features,
bool user_gesture, bool user_gesture,
@ -137,9 +132,6 @@ class CefBrowserInfoManager : public content::RenderProcessHostObserver {
void RenderProcessHostDestroyed(content::RenderProcessHost* host) override; void RenderProcessHostDestroyed(content::RenderProcessHost* host) override;
// Store state information about pending popups. Call order is: // Store state information about pending popups. Call order is:
// - CefBrowserMessageFilter::OnCreateWindow (IOT)
// Intercepts the ViewHostMsg_CreateWindow message to gather information
// about the opener (parent browser) and target URL/frame.
// - CefContentBrowserClient::CanCreateWindow (IOT) // - CefContentBrowserClient::CanCreateWindow (IOT)
// Provides an opportunity to cancel the popup (calls OnBeforePopup) and // Provides an opportunity to cancel the popup (calls OnBeforePopup) and
// creates the new platform delegate for the popup. If the popup owner is // creates the new platform delegate for the popup. If the popup owner is
@ -157,7 +149,6 @@ class CefBrowserInfoManager : public content::RenderProcessHostObserver {
// be multiple pending popups with the same identifiers and this allows us // be multiple pending popups with the same identifiers and this allows us
// to differentiate between them at different processing steps. // to differentiate between them at different processing steps.
enum Step { enum Step {
ON_CREATE_WINDOW,
CAN_CREATE_WINDOW, CAN_CREATE_WINDOW,
SHOULD_CREATE_WEB_CONTENTS SHOULD_CREATE_WEB_CONTENTS
} step; } step;

View File

@ -17,25 +17,18 @@
#include "base/compiler_specific.h" #include "base/compiler_specific.h"
#include "base/bind.h" #include "base/bind.h"
#include "content/common/frame_messages.h" #include "content/common/frame_messages.h"
#include "content/common/view_messages.h"
#include "content/public/browser/render_process_host.h" #include "content/public/browser/render_process_host.h"
#include "content/public/common/child_process_host.h" #include "content/public/common/child_process_host.h"
CefBrowserMessageFilter::CefBrowserMessageFilter(int render_process_id) CefBrowserMessageFilter::CefBrowserMessageFilter(int render_process_id)
: render_process_id_(render_process_id), : render_process_id_(render_process_id) {
sender_(NULL) {
} }
CefBrowserMessageFilter::~CefBrowserMessageFilter() { CefBrowserMessageFilter::~CefBrowserMessageFilter() {
} }
void CefBrowserMessageFilter::OnFilterAdded(IPC::Sender* sender) {
sender_ = sender;
}
void CefBrowserMessageFilter::OnFilterRemoved() { void CefBrowserMessageFilter::OnFilterRemoved() {
render_process_id_ = content::ChildProcessHost::kInvalidUniqueID; render_process_id_ = content::ChildProcessHost::kInvalidUniqueID;
sender_ = NULL;
} }
bool CefBrowserMessageFilter::OnMessageReceived(const IPC::Message& message) { bool CefBrowserMessageFilter::OnMessageReceived(const IPC::Message& message) {
@ -46,17 +39,12 @@ bool CefBrowserMessageFilter::OnMessageReceived(const IPC::Message& message) {
} }
bool handled = true; bool handled = true;
if (message.type() == ViewHostMsg_CreateWindow::ID) {
// Observe but don't handle this message.
handled = false;
}
IPC_BEGIN_MESSAGE_MAP(CefBrowserMessageFilter, message) IPC_BEGIN_MESSAGE_MAP(CefBrowserMessageFilter, message)
IPC_MESSAGE_HANDLER(CefProcessHostMsg_GetNewRenderThreadInfo, IPC_MESSAGE_HANDLER(CefProcessHostMsg_GetNewRenderThreadInfo,
OnGetNewRenderThreadInfo) OnGetNewRenderThreadInfo)
IPC_MESSAGE_HANDLER_DELAY_REPLY(CefProcessHostMsg_GetNewBrowserInfo, IPC_MESSAGE_HANDLER_DELAY_REPLY(CefProcessHostMsg_GetNewBrowserInfo,
OnGetNewBrowserInfo) OnGetNewBrowserInfo)
IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_CreateWindow, OnCreateWindow)
IPC_MESSAGE_UNHANDLED(handled = false) IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP() IPC_END_MESSAGE_MAP()
return handled; return handled;
@ -112,18 +100,6 @@ void CefBrowserMessageFilter::OnGetNewBrowserInfo(
} }
} }
void CefBrowserMessageFilter::OnCreateWindow(
const ViewHostMsg_CreateWindow_Params& params,
IPC::Message* reply_msg) {
if (render_process_id_ != content::ChildProcessHost::kInvalidUniqueID) {
CefBrowserInfoManager::GetInstance()->OnCreateWindow(render_process_id_,
params);
}
// Reply message is not used.
delete reply_msg;
}
void CefBrowserMessageFilter::OnFrameFocused(int32_t render_frame_routing_id) { void CefBrowserMessageFilter::OnFrameFocused(int32_t render_frame_routing_id) {
if (!CEF_CURRENTLY_ON_UIT()) { if (!CEF_CURRENTLY_ON_UIT()) {
CEF_POST_TASK(CEF_UIT, CEF_POST_TASK(CEF_UIT,

View File

@ -19,7 +19,6 @@ class RenderProcessHost;
struct CefProcessHostMsg_GetNewBrowserInfo_Params; struct CefProcessHostMsg_GetNewBrowserInfo_Params;
struct CefProcessHostMsg_GetNewRenderThreadInfo_Params; struct CefProcessHostMsg_GetNewRenderThreadInfo_Params;
struct ViewHostMsg_CreateWindow_Params;
// This class sends and receives control messages on the browser process. // This class sends and receives control messages on the browser process.
class CefBrowserMessageFilter : public IPC::MessageFilter { class CefBrowserMessageFilter : public IPC::MessageFilter {
@ -28,7 +27,6 @@ class CefBrowserMessageFilter : public IPC::MessageFilter {
~CefBrowserMessageFilter() override; ~CefBrowserMessageFilter() override;
// IPC::ChannelProxy::MessageFilter implementation. // IPC::ChannelProxy::MessageFilter implementation.
void OnFilterAdded(IPC::Sender* sender) override;
void OnFilterRemoved() override; void OnFilterRemoved() override;
bool OnMessageReceived(const IPC::Message& message) override; bool OnMessageReceived(const IPC::Message& message) override;
@ -42,12 +40,9 @@ class CefBrowserMessageFilter : public IPC::MessageFilter {
int render_view_routing_id, int render_view_routing_id,
int render_frame_routing_id, int render_frame_routing_id,
IPC::Message* reply_msg); IPC::Message* reply_msg);
void OnCreateWindow(const ViewHostMsg_CreateWindow_Params& params,
IPC::Message* reply_msg);
void OnFrameFocused(int32_t render_frame_routing_id); void OnFrameFocused(int32_t render_frame_routing_id);
int render_process_id_; int render_process_id_;
IPC::Sender* sender_;
DISALLOW_COPY_AND_ASSIGN(CefBrowserMessageFilter); DISALLOW_COPY_AND_ASSIGN(CefBrowserMessageFilter);
}; };

View File

@ -123,5 +123,6 @@ void CefBrowserMessageLoop::DoMessageLoopIteration() {
} }
void CefBrowserMessageLoop::RunMessageLoop() { void CefBrowserMessageLoop::RunMessageLoop() {
Run(); base::RunLoop run_loop;
run_loop.Run();
} }

View File

@ -41,7 +41,9 @@ class CefURLFetcherDelegate : public net::URLFetcherDelegate {
// net::URLFetcherDelegate methods. // net::URLFetcherDelegate methods.
void OnURLFetchComplete(const net::URLFetcher* source) override; void OnURLFetchComplete(const net::URLFetcher* source) override;
void OnURLFetchDownloadProgress(const net::URLFetcher* source, void OnURLFetchDownloadProgress(const net::URLFetcher* source,
int64 current, int64 total) override; int64 current,
int64 total,
int64_t current_network_bytes) override;
void OnURLFetchUploadProgress(const net::URLFetcher* source, void OnURLFetchUploadProgress(const net::URLFetcher* source,
int64 current, int64 total) override; int64 current, int64 total) override;
@ -402,7 +404,9 @@ void CefURLFetcherDelegate::OnURLFetchComplete(
void CefURLFetcherDelegate::OnURLFetchDownloadProgress( void CefURLFetcherDelegate::OnURLFetchDownloadProgress(
const net::URLFetcher* source, const net::URLFetcher* source,
int64 current, int64 total) { int64 current,
int64 total,
int64_t current_network_bytes) {
context_->OnDownloadProgress(current, total); context_->OnDownloadProgress(current, total);
} }

View File

@ -326,6 +326,11 @@ memory::TabManager* ChromeBrowserProcessStub::GetTabManager() {
return NULL; return NULL;
} }
PhysicalWebDataSource* ChromeBrowserProcessStub::GetPhysicalWebDataSource() {
NOTIMPLEMENTED();
return NULL;
}
content::BrowserContext* content::BrowserContext*
ChromeBrowserProcessStub::GetBrowserContextRedirectedInIncognito( ChromeBrowserProcessStub::GetBrowserContextRedirectedInIncognito(
content::BrowserContext* context) { content::BrowserContext* context) {

View File

@ -107,6 +107,7 @@ class ChromeBrowserProcessStub : public BrowserProcess,
shell_integration::DefaultWebClientState shell_integration::DefaultWebClientState
CachedDefaultWebClientState() override; CachedDefaultWebClientState() override;
memory::TabManager* GetTabManager() override; memory::TabManager* GetTabManager() override;
PhysicalWebDataSource* GetPhysicalWebDataSource() override;
// BrowserContextIncognitoHelper implementation. // BrowserContextIncognitoHelper implementation.
content::BrowserContext* GetBrowserContextRedirectedInIncognito( content::BrowserContext* GetBrowserContextRedirectedInIncognito(

View File

@ -738,7 +738,7 @@ bool CefContentBrowserClient::CanCreateWindow(
*no_javascript_access = false; *no_javascript_access = false;
return CefBrowserInfoManager::GetInstance()->CanCreateWindow( return CefBrowserInfoManager::GetInstance()->CanCreateWindow(
target_url, referrer, disposition, features, user_gesture, target_url, referrer, frame_name, disposition, features, user_gesture,
opener_suppressed, render_process_id, opener_render_view_id, opener_suppressed, render_process_id, opener_render_view_id,
opener_render_frame_id, no_javascript_access); opener_render_frame_id, no_javascript_access);
} }

View File

@ -34,6 +34,7 @@
#include "content/public/common/url_constants.h" #include "content/public/common/url_constants.h"
#include "content/public/common/user_agent.h" #include "content/public/common/user_agent.h"
#include "net/base/net_errors.h" #include "net/base/net_errors.h"
#include "net/log/net_log_source.h"
#include "net/socket/tcp_server_socket.h" #include "net/socket/tcp_server_socket.h"
#include "ui/base/resource/resource_bundle.h" #include "ui/base/resource/resource_bundle.h"
@ -50,7 +51,7 @@ class TCPServerSocketFactory : public content::DevToolsSocketFactory {
// content::DevToolsSocketFactory. // content::DevToolsSocketFactory.
std::unique_ptr<net::ServerSocket> CreateForHttpServer() override { std::unique_ptr<net::ServerSocket> CreateForHttpServer() override {
std::unique_ptr<net::ServerSocket> socket( std::unique_ptr<net::ServerSocket> socket(
new net::TCPServerSocket(nullptr, net::NetLog::Source())); new net::TCPServerSocket(nullptr, net::NetLogSource()));
if (socket->ListenWithAddressAndPort(address_, port_, kBackLog) != net::OK) if (socket->ListenWithAddressAndPort(address_, port_, kBackLog) != net::OK)
return std::unique_ptr<net::ServerSocket>(); return std::unique_ptr<net::ServerSocket>();
return socket; return socket;

View File

@ -22,9 +22,6 @@ class CefDevToolsManagerDelegate : public content::DevToolsManagerDelegate {
~CefDevToolsManagerDelegate() override; ~CefDevToolsManagerDelegate() override;
// DevToolsManagerDelegate implementation. // DevToolsManagerDelegate implementation.
void Inspect(content::DevToolsAgentHost* agent_host) override {}
void DevToolsAgentStateChanged(content::DevToolsAgentHost* agent_host,
bool attached) override {}
scoped_refptr<content::DevToolsAgentHost> CreateNewTarget(const GURL& url) scoped_refptr<content::DevToolsAgentHost> CreateNewTarget(const GURL& url)
override; override;
std::string GetDiscoveryPageHTML() override; std::string GetDiscoveryPageHTML() override;

View File

@ -248,6 +248,11 @@ CefExtensionsBrowserClient::GetExtensionWebContentsObserver(
return CefExtensionWebContentsObserver::FromWebContents(web_contents); return CefExtensionWebContentsObserver::FromWebContents(web_contents);
} }
KioskDelegate* CefExtensionsBrowserClient::GetKioskDelegate() {
NOTREACHED();
return NULL;
}
void CefExtensionsBrowserClient::SetAPIClientForTest( void CefExtensionsBrowserClient::SetAPIClientForTest(
ExtensionsAPIClient* api_client) { ExtensionsAPIClient* api_client) {
api_client_.reset(api_client); api_client_.reset(api_client);

View File

@ -80,6 +80,7 @@ class CefExtensionsBrowserClient : public ExtensionsBrowserClient {
bool IsMinBrowserVersionSupported(const std::string& min_version) override; bool IsMinBrowserVersionSupported(const std::string& min_version) override;
ExtensionWebContentsObserver* GetExtensionWebContentsObserver( ExtensionWebContentsObserver* GetExtensionWebContentsObserver(
content::WebContents* web_contents) override; content::WebContents* web_contents) override;
KioskDelegate* GetKioskDelegate() override;
// Sets the API client. // Sets the API client.
void SetAPIClientForTest(ExtensionsAPIClient* api_client); void SetAPIClientForTest(ExtensionsAPIClient* api_client);

View File

@ -11,6 +11,7 @@
#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop.h"
#include "base/stl_util.h" #include "base/stl_util.h"
#include "base/strings/string_util.h" #include "base/strings/string_util.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/win/wrapped_window_proc.h" #include "base/win/wrapped_window_proc.h"
#include "ui/base/accelerators/accelerator.h" #include "ui/base/accelerators/accelerator.h"
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
@ -450,7 +451,7 @@ void CefNativeMenuWin::RunMenuAt(const gfx::Point& point, int alignment) {
// state. Instead post a task, then notify. This mirrors what WM_MENUCOMMAND // state. Instead post a task, then notify. This mirrors what WM_MENUCOMMAND
// does. // does.
menu_to_select_factory_.InvalidateWeakPtrs(); menu_to_select_factory_.InvalidateWeakPtrs();
base::MessageLoop::current()->PostTask( base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, FROM_HERE,
base::Bind(&CefNativeMenuWin::DelayedSelect, base::Bind(&CefNativeMenuWin::DelayedSelect,
menu_to_select_factory_.GetWeakPtr())); menu_to_select_factory_.GetWeakPtr()));

View File

@ -455,7 +455,6 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR(
frame_rate_threshold_ms_(0), frame_rate_threshold_ms_(0),
#if !defined(OS_MACOSX) #if !defined(OS_MACOSX)
compositor_widget_(gfx::kNullAcceleratedWidget), compositor_widget_(gfx::kNullAcceleratedWidget),
delegated_frame_host_(new content::DelegatedFrameHost(this)),
#endif #endif
software_output_device_(NULL), software_output_device_(NULL),
hold_resize_(false), hold_resize_(false),
@ -482,6 +481,11 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR(
} }
#if !defined(OS_MACOSX) #if !defined(OS_MACOSX)
content::ImageTransportFactory* factory =
content::ImageTransportFactory::GetInstance();
delegated_frame_host_ = base::MakeUnique<content::DelegatedFrameHost>(
factory->GetContextFactory()->AllocateFrameSinkId(), this);
root_layer_.reset(new ui::Layer(ui::LAYER_SOLID_COLOR)); root_layer_.reset(new ui::Layer(ui::LAYER_SOLID_COLOR));
#endif #endif

View File

@ -139,7 +139,7 @@ content::RenderWidgetHostViewBase* CefWebContentsViewOSR::CreateViewForWidget(
embedder_host_view); embedder_host_view);
embedder_host_view->AddGuestHostView(platform_widget); embedder_host_view->AddGuestHostView(platform_widget);
return new content::RenderWidgetHostViewGuest( return content::RenderWidgetHostViewGuest::Create(
render_widget_host, render_widget_host,
guest_, guest_,
platform_widget->GetWeakPtr()); platform_widget->GetWeakPtr());

View File

@ -5,6 +5,7 @@
#include "libcef/browser/pepper/browser_pepper_host_factory.h" #include "libcef/browser/pepper/browser_pepper_host_factory.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "base/memory/ptr_util.h"
#include "chrome/browser/renderer_host/pepper/pepper_flash_browser_host.h" #include "chrome/browser/renderer_host/pepper/pepper_flash_browser_host.h"
#include "chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_filter.h" #include "chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_filter.h"
#include "chrome/browser/renderer_host/pepper/pepper_flash_drm_host.h" #include "chrome/browser/renderer_host/pepper/pepper_flash_drm_host.h"
@ -35,24 +36,24 @@ std::unique_ptr<ResourceHost> CefBrowserPepperHostFactory::CreateResourceHost(
// Make sure the plugin is giving us a valid instance for this resource. // Make sure the plugin is giving us a valid instance for this resource.
if (!host_->IsValidInstance(instance)) if (!host_->IsValidInstance(instance))
return std::unique_ptr<ResourceHost>(); return nullptr;
// Flash interfaces. // Flash interfaces.
if (host_->GetPpapiHost()->permissions().HasPermission( if (host_->GetPpapiHost()->permissions().HasPermission(
ppapi::PERMISSION_FLASH)) { ppapi::PERMISSION_FLASH)) {
switch (message.type()) { switch (message.type()) {
case PpapiHostMsg_Flash_Create::ID: case PpapiHostMsg_Flash_Create::ID:
return std::unique_ptr<ResourceHost>( return base::MakeUnique<chrome::PepperFlashBrowserHost>(host_, instance,
new chrome::PepperFlashBrowserHost(host_, instance, resource)); resource);
case PpapiHostMsg_FlashClipboard_Create::ID: { case PpapiHostMsg_FlashClipboard_Create::ID: {
scoped_refptr<ResourceMessageFilter> clipboard_filter( scoped_refptr<ResourceMessageFilter> clipboard_filter(
new chrome::PepperFlashClipboardMessageFilter); new chrome::PepperFlashClipboardMessageFilter);
return std::unique_ptr<ResourceHost>(new MessageFilterHost( return base::MakeUnique<MessageFilterHost>(
host_->GetPpapiHost(), instance, resource, clipboard_filter)); host_->GetPpapiHost(), instance, resource, clipboard_filter);
} }
case PpapiHostMsg_FlashDRM_Create::ID: case PpapiHostMsg_FlashDRM_Create::ID:
return std::unique_ptr<ResourceHost>( return base::MakeUnique<chrome::PepperFlashDRMHost>(host_, instance,
new chrome::PepperFlashDRMHost(host_, instance, resource)); resource);
} }
} }
@ -66,11 +67,11 @@ std::unique_ptr<ResourceHost> CefBrowserPepperHostFactory::CreateResourceHost(
chrome::PepperIsolatedFileSystemMessageFilter* isolated_fs_filter = chrome::PepperIsolatedFileSystemMessageFilter* isolated_fs_filter =
chrome::PepperIsolatedFileSystemMessageFilter::Create(instance, host_); chrome::PepperIsolatedFileSystemMessageFilter::Create(instance, host_);
if (!isolated_fs_filter) if (!isolated_fs_filter)
return std::unique_ptr<ResourceHost>(); return nullptr;
return std::unique_ptr<ResourceHost>( return base::MakeUnique<MessageFilterHost>(host, instance, resource,
new MessageFilterHost(host, instance, resource, isolated_fs_filter)); isolated_fs_filter);
} }
NOTREACHED() << "Unhandled message type: " << message.type(); NOTREACHED() << "Unhandled message type: " << message.type();
return std::unique_ptr<ResourceHost>(); return nullptr;
} }

View File

@ -37,6 +37,8 @@ ContentSettingsType PermissionTypeToContentSetting(PermissionType permission) {
return CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA; return CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA;
case PermissionType::BACKGROUND_SYNC: case PermissionType::BACKGROUND_SYNC:
return CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC; return CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC;
case PermissionType::FLASH:
return CONTENT_SETTINGS_TYPE_PLUGINS;
case PermissionType::NUM: case PermissionType::NUM:
// This will hit the NOTREACHED below. // This will hit the NOTREACHED below.
break; break;

View File

@ -34,6 +34,7 @@
#include "extensions/common/extension.h" #include "extensions/common/extension.h"
#include "extensions/common/manifest_handlers/webview_info.h" #include "extensions/common/manifest_handlers/webview_info.h"
#include "url/gurl.h" #include "url/gurl.h"
#include "url/origin.h"
#include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
@ -95,7 +96,7 @@ static void SendPluginAvailabilityUMA(const std::string& mime_type,
void ReportMetrics(const std::string& mime_type, void ReportMetrics(const std::string& mime_type,
const GURL& url, const GURL& url,
const GURL& origin_url) { const url::Origin& main_frame_origin) {
} }
#if defined(ENABLE_EXTENSIONS) #if defined(ENABLE_EXTENSIONS)
@ -196,20 +197,20 @@ CefPluginInfoMessageFilter::~CefPluginInfoMessageFilter() {}
struct CefPluginInfoMessageFilter::GetPluginInfo_Params { struct CefPluginInfoMessageFilter::GetPluginInfo_Params {
int render_frame_id; int render_frame_id;
GURL url; GURL url;
GURL top_origin_url; url::Origin main_frame_origin;
std::string mime_type; std::string mime_type;
}; };
void CefPluginInfoMessageFilter::OnGetPluginInfo( void CefPluginInfoMessageFilter::OnGetPluginInfo(
int render_frame_id, int render_frame_id,
const GURL& url, const GURL& url,
const GURL& top_origin_url, const url::Origin& main_frame_origin,
const std::string& mime_type, const std::string& mime_type,
IPC::Message* reply_msg) { IPC::Message* reply_msg) {
GetPluginInfo_Params params = { GetPluginInfo_Params params = {
render_frame_id, render_frame_id,
url, url,
top_origin_url, main_frame_origin,
mime_type mime_type
}; };
PluginService::GetInstance()->GetPlugins( PluginService::GetInstance()->GetPlugins(
@ -244,7 +245,7 @@ void CefPluginInfoMessageFilter::PluginsLoaded(
CefViewHostMsg_GetPluginInfo_Status::kNotFound) { CefViewHostMsg_GetPluginInfo_Status::kNotFound) {
main_thread_task_runner_->PostTask( main_thread_task_runner_->PostTask(
FROM_HERE, base::Bind(&ReportMetrics, output.actual_mime_type, FROM_HERE, base::Bind(&ReportMetrics, output.actual_mime_type,
params.url, params.top_origin_url)); params.url, params.main_frame_origin));
} }
} }
@ -304,7 +305,7 @@ void CefPluginInfoMessageFilter::Context::DecidePluginStatus(
bool is_managed = false; bool is_managed = false;
// Check plugin content settings. The primary URL is the top origin URL and // Check plugin content settings. The primary URL is the top origin URL and
// the secondary URL is the plugin URL. // the secondary URL is the plugin URL.
GetPluginContentSetting(plugin, params.top_origin_url, params.url, GetPluginContentSetting(plugin, params.main_frame_origin.GetURL(), params.url,
plugin_metadata->identifier(), &plugin_setting, plugin_metadata->identifier(), &plugin_setting,
&uses_default_content_setting, &is_managed); &uses_default_content_setting, &is_managed);
@ -413,7 +414,7 @@ bool CefPluginInfoMessageFilter::Context::FindEnabledPlugin(
DecidePluginStatus(params, *plugin, (*plugin_metadata).get(), status); DecidePluginStatus(params, *plugin, (*plugin_metadata).get(), status);
if (filter->IsPluginAvailable(handler, if (filter->IsPluginAvailable(handler,
params.url, params.url,
params.top_origin_url, params.main_frame_origin,
plugin, plugin,
status)) { status)) {
break; break;

View File

@ -34,6 +34,10 @@ namespace extensions {
class ExtensionRegistry; class ExtensionRegistry;
} }
namespace url {
class Origin;
}
// This class filters out incoming IPC messages requesting plugin information. // This class filters out incoming IPC messages requesting plugin information.
class CefPluginInfoMessageFilter : public content::BrowserMessageFilter { class CefPluginInfoMessageFilter : public content::BrowserMessageFilter {
public: public:
@ -95,7 +99,7 @@ class CefPluginInfoMessageFilter : public content::BrowserMessageFilter {
void OnGetPluginInfo(int render_frame_id, void OnGetPluginInfo(int render_frame_id,
const GURL& url, const GURL& url,
const GURL& top_origin_url, const url::Origin& main_frame_origin,
const std::string& mime_type, const std::string& mime_type,
IPC::Message* reply_msg); IPC::Message* reply_msg);

View File

@ -22,7 +22,7 @@ bool CefPluginServiceFilter::IsPluginAvailable(
int render_frame_id, int render_frame_id,
const void* context, const void* context,
const GURL& url, const GURL& url,
const GURL& policy_url, const url::Origin& main_frame_origin,
content::WebPluginInfo* plugin) { content::WebPluginInfo* plugin) {
CefResourceContext* resource_context = const_cast<CefResourceContext*>( CefResourceContext* resource_context = const_cast<CefResourceContext*>(
reinterpret_cast<const CefResourceContext*>(context)); reinterpret_cast<const CefResourceContext*>(context));
@ -36,7 +36,7 @@ bool CefPluginServiceFilter::IsPluginAvailable(
CefRefPtr<CefRequestContextHandler> handler = resource_context->GetHandler(); CefRefPtr<CefRequestContextHandler> handler = resource_context->GetHandler();
CefViewHostMsg_GetPluginInfo_Status status = CefViewHostMsg_GetPluginInfo_Status status =
CefViewHostMsg_GetPluginInfo_Status::kAllowed; CefViewHostMsg_GetPluginInfo_Status::kAllowed;
allow_load = IsPluginAvailable(handler.get(), url, policy_url, plugin, allow_load = IsPluginAvailable(handler.get(), url, main_frame_origin, plugin,
&status); &status);
resource_context->AddPluginLoadDecision(render_process_id, plugin->path, resource_context->AddPluginLoadDecision(render_process_id, plugin->path,
@ -53,7 +53,7 @@ bool CefPluginServiceFilter::CanLoadPlugin(int render_process_id,
bool CefPluginServiceFilter::IsPluginAvailable( bool CefPluginServiceFilter::IsPluginAvailable(
CefRequestContextHandler* handler, CefRequestContextHandler* handler,
const GURL& url, const GURL& url,
const GURL& policy_url, const url::Origin& main_frame_origin,
content::WebPluginInfo* plugin, content::WebPluginInfo* plugin,
CefViewHostMsg_GetPluginInfo_Status* status) { CefViewHostMsg_GetPluginInfo_Status* status) {
if (*status == CefViewHostMsg_GetPluginInfo_Status::kNotFound || if (*status == CefViewHostMsg_GetPluginInfo_Status::kNotFound ||
@ -68,6 +68,7 @@ bool CefPluginServiceFilter::IsPluginAvailable(
return true; return true;
} }
const GURL& policy_url = main_frame_origin.GetURL();
if (!policy_url.is_empty() && if (!policy_url.is_empty() &&
policy_url.scheme() == extensions::kExtensionScheme) { policy_url.scheme() == extensions::kExtensionScheme) {
// Always allow extension origins to load plugins. // Always allow extension origins to load plugins.

View File

@ -25,7 +25,7 @@ class CefPluginServiceFilter : public content::PluginServiceFilter {
int render_frame_id, int render_frame_id,
const void* context, const void* context,
const GURL& url, const GURL& url,
const GURL& policy_url, const url::Origin& main_frame_origin,
content::WebPluginInfo* plugin) override; content::WebPluginInfo* plugin) override;
bool CanLoadPlugin(int render_process_id, bool CanLoadPlugin(int render_process_id,
@ -36,7 +36,7 @@ class CefPluginServiceFilter : public content::PluginServiceFilter {
// See related discussion in issue #2015. // See related discussion in issue #2015.
bool IsPluginAvailable(CefRequestContextHandler* handler, bool IsPluginAvailable(CefRequestContextHandler* handler,
const GURL& url, const GURL& url,
const GURL& policy_url, const url::Origin& main_frame_origin,
content::WebPluginInfo* plugin, content::WebPluginInfo* plugin,
CefViewHostMsg_GetPluginInfo_Status* status); CefViewHostMsg_GetPluginInfo_Status* status);

View File

@ -144,7 +144,8 @@ void CefPrintViewManagerBase::OnDidPrintPage(
web_contents()->Stop(); web_contents()->Stop();
return; return;
} }
shared_buf.reset(new base::SharedMemory(params.metafile_data_handle, true)); shared_buf =
base::MakeUnique<base::SharedMemory>(params.metafile_data_handle, true);
if (!shared_buf->Map(params.data_size)) { if (!shared_buf->Map(params.data_size)) {
NOTREACHED() << "couldn't map"; NOTREACHED() << "couldn't map";
web_contents()->Stop(); web_contents()->Stop();
@ -174,6 +175,7 @@ void CefPrintViewManagerBase::OnDidPrintPage(
if (metafile_must_be_valid) { if (metafile_must_be_valid) {
bool print_text_with_gdi = bool print_text_with_gdi =
document->settings().print_text_with_gdi() && document->settings().print_text_with_gdi() &&
!document->settings().printer_is_xps() &&
!base::CommandLine::ForCurrentProcess()->HasSwitch( !base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableGDITextPrinting); switches::kDisableGDITextPrinting);
scoped_refptr<base::RefCountedBytes> bytes = new base::RefCountedBytes( scoped_refptr<base::RefCountedBytes> bytes = new base::RefCountedBytes(

View File

@ -518,7 +518,7 @@ cef_errorcode_t CefRequestContextImpl::ResolveHostCached(
net::HostPortPair::FromURL(GURL(origin.ToString()))); net::HostPortPair::FromURL(GURL(origin.ToString())));
net::AddressList address_list; net::AddressList address_list;
retval = host_resolver->ResolveFromCache(request_info, &address_list, retval = host_resolver->ResolveFromCache(request_info, &address_list,
net::BoundNetLog()); net::NetLogWithSource());
if (retval == net::OK) { if (retval == net::OK) {
net::AddressList::const_iterator iter = address_list.begin(); net::AddressList::const_iterator iter = address_list.begin();
for (; iter != address_list.end(); ++iter) for (; iter != address_list.end(); ++iter)
@ -693,7 +693,7 @@ void CefRequestContextImpl::ResolveHostInternal(
&helper->address_list_, &helper->address_list_,
base::Bind(&ResolveHostHelper::OnResolveCompleted, base::Bind(&ResolveHostHelper::OnResolveCompleted,
base::Unretained(helper)), base::Unretained(helper)),
&helper->request_, net::BoundNetLog()); &helper->request_, net::NetLogWithSource());
if (retval == net::ERR_IO_PENDING) { if (retval == net::ERR_IO_PENDING) {
// The result will be delivered asynchronously via the callback. // The result will be delivered asynchronously via the callback.
return; return;

View File

@ -21,6 +21,7 @@
#include "chrome/browser/extensions/api/streams_private/streams_private_api.h" #include "chrome/browser/extensions/api/streams_private/streams_private_api.h"
#include "content/public/browser/plugin_service.h" #include "content/public/browser/plugin_service.h"
#include "content/public/browser/plugin_service_filter.h" #include "content/public/browser/plugin_service_filter.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/resource_request_info.h" #include "content/public/browser/resource_request_info.h"
#include "content/public/browser/stream_info.h" #include "content/public/browser/stream_info.h"
#include "content/public/common/resource_response.h" #include "content/public/common/resource_response.h"
@ -36,21 +37,26 @@ namespace {
void SendExecuteMimeTypeHandlerEvent( void SendExecuteMimeTypeHandlerEvent(
std::unique_ptr<content::StreamInfo> stream, std::unique_ptr<content::StreamInfo> stream,
int64_t expected_content_size, int64_t expected_content_size,
int render_process_id,
int render_frame_id,
const std::string& extension_id, const std::string& extension_id,
const std::string& view_id, const std::string& view_id,
bool embedded) { bool embedded,
int frame_tree_node_id,
int render_process_id,
int render_frame_id) {
CEF_REQUIRE_UIT(); CEF_REQUIRE_UIT();
CefRefPtr<CefBrowserHostImpl> browser = content::WebContents* web_contents = nullptr;
CefBrowserHostImpl::GetBrowserForFrame(render_process_id, if (frame_tree_node_id != -1) {
render_frame_id); web_contents =
if (!browser.get()) content::WebContents::FromFrameTreeNodeId(frame_tree_node_id);
return; } else {
web_contents = content::WebContents::FromRenderFrameHost(
content::RenderFrameHost::FromID(render_process_id, render_frame_id));
}
content::WebContents* web_contents = browser->web_contents(); CefRefPtr<CefBrowserHostImpl> browser =
if (!web_contents) CefBrowserHostImpl::GetBrowserForContents(web_contents);
if (!browser.get())
return; return;
content::BrowserContext* browser_context = web_contents->GetBrowserContext(); content::BrowserContext* browser_context = web_contents->GetBrowserContext();
@ -61,8 +67,8 @@ void SendExecuteMimeTypeHandlerEvent(
return; return;
streams_private->ExecuteMimeTypeHandler( streams_private->ExecuteMimeTypeHandler(
extension_id, web_contents, std::move(stream), view_id, extension_id, std::move(stream), view_id, expected_content_size, embedded,
expected_content_size, embedded, render_process_id, render_frame_id); frame_tree_node_id, render_process_id, render_frame_id);
} }
} // namespace } // namespace
@ -181,9 +187,9 @@ void CefResourceDispatcherHostDelegate::OnStreamCreated(
bool embedded = info->GetResourceType() != content::RESOURCE_TYPE_MAIN_FRAME; bool embedded = info->GetResourceType() != content::RESOURCE_TYPE_MAIN_FRAME;
CEF_POST_TASK(CEF_UIT, CEF_POST_TASK(CEF_UIT,
base::Bind(&SendExecuteMimeTypeHandlerEvent, base::Passed(&stream), base::Bind(&SendExecuteMimeTypeHandlerEvent, base::Passed(&stream),
request->GetExpectedContentSize(), info->GetChildID(), request->GetExpectedContentSize(), ix->second.extension_id,
info->GetRenderFrameID(), ix->second.extension_id, ix->second.view_id, embedded, info->GetFrameTreeNodeId(),
ix->second.view_id, embedded)); info->GetChildID(), info->GetRenderFrameID()));
stream_target_info_.erase(request); stream_target_info_.erase(request);
} }

View File

@ -7,6 +7,7 @@
#include "libcef/browser/thread_util.h" #include "libcef/browser/thread_util.h"
#include "base/files/file_util.h" #include "base/files/file_util.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/trace_event/trace_event.h" #include "base/trace_event/trace_event.h"
#include "content/public/browser/tracing_controller.h" #include "content/public/browser/tracing_controller.h"
@ -106,7 +107,7 @@ bool CefTraceSubscriber::EndTracing(
// Create a new temporary file path on the FILE thread, then continue. // Create a new temporary file path on the FILE thread, then continue.
CEF_POST_TASK(CEF_FILET, CEF_POST_TASK(CEF_FILET,
base::Bind(CreateTemporaryFileOnFileThread, base::Bind(CreateTemporaryFileOnFileThread,
base::MessageLoop::current()->task_runner(), base::ThreadTaskRunnerHandle::Get(),
base::Bind(&CefTraceSubscriber::ContinueEndTracing, base::Bind(&CefTraceSubscriber::ContinueEndTracing,
weak_factory_.GetWeakPtr(), callback))); weak_factory_.GetWeakPtr(), callback)));
return true; return true;

View File

@ -234,7 +234,7 @@ IPC_STRUCT_END()
IPC_SYNC_MESSAGE_CONTROL4_1(CefViewHostMsg_GetPluginInfo, IPC_SYNC_MESSAGE_CONTROL4_1(CefViewHostMsg_GetPluginInfo,
int /* render_frame_id */, int /* render_frame_id */,
GURL /* url */, GURL /* url */,
GURL /* top origin url */, url::Origin /* top origin url */,
std::string /* mime_type */, std::string /* mime_type */,
CefViewHostMsg_GetPluginInfo_Output /* output */) CefViewHostMsg_GetPluginInfo_Output /* output */)

View File

@ -10,17 +10,11 @@
namespace { namespace {
void CopyList(const base::ListValue& source,
base::ListValue& target) {
base::ListValue::const_iterator it = source.begin();
for (; it != source.end(); ++it)
target.Append((*it)->DeepCopy());
}
void CopyValue(const Cef_Request_Params& source, void CopyValue(const Cef_Request_Params& source,
Cef_Request_Params& target) { Cef_Request_Params& target) {
target.name = source.name; target.name = source.name;
CopyList(source.arguments, target.arguments); auto copy = source.arguments.CreateDeepCopy();
target.arguments.Swap(copy.get());
} }
} // namespace } // namespace

View File

@ -192,10 +192,6 @@ CefContentRendererClient::CefContentRendererClient()
} }
CefContentRendererClient::~CefContentRendererClient() { CefContentRendererClient::~CefContentRendererClient() {
if (!guest_views_.empty()) {
base::STLDeleteContainerPairSecondPointers(guest_views_.begin(),
guest_views_.end());
}
} }
// static // static
@ -254,8 +250,7 @@ bool CefContentRendererClient::HasGuestViewForView(
void CefContentRendererClient::OnGuestViewDestroyed(CefGuestView* guest_view) { void CefContentRendererClient::OnGuestViewDestroyed(CefGuestView* guest_view) {
GuestViewMap::iterator it = guest_views_.begin(); GuestViewMap::iterator it = guest_views_.begin();
for (; it != guest_views_.end(); ++it) { for (; it != guest_views_.end(); ++it) {
if (it->second == guest_view) { if (it->second.get() == guest_view) {
delete it->second;
guest_views_.erase(it); guest_views_.erase(it);
return; return;
} }
@ -409,9 +404,6 @@ void CefContentRendererClient::RenderThreadStarted() {
thread->AddObserver(spellcheck_.get()); thread->AddObserver(spellcheck_.get());
} }
visited_link_slave_.reset(new visitedlink::VisitedLinkSlave());
thread->AddObserver(visited_link_slave_.get());
if (content::RenderProcessHost::run_renderer_in_process()) { if (content::RenderProcessHost::run_renderer_in_process()) {
// When running in single-process mode register as a destruction observer // When running in single-process mode register as a destruction observer
// on the render thread's MessageLoop. // on the render thread's MessageLoop.
@ -514,9 +506,8 @@ bool CefContentRendererClient::OverrideCreatePlugin(
GURL url(params.url); GURL url(params.url);
CefViewHostMsg_GetPluginInfo_Output output; CefViewHostMsg_GetPluginInfo_Output output;
blink::WebString top_origin = frame->top()->getSecurityOrigin().toString();
render_frame->Send(new CefViewHostMsg_GetPluginInfo( render_frame->Send(new CefViewHostMsg_GetPluginInfo(
render_frame->GetRoutingID(), url, blink::WebStringToGURL(top_origin), render_frame->GetRoutingID(), url, frame->top()->getSecurityOrigin(),
orig_mime_type, &output)); orig_mime_type, &output));
*plugin = CreatePlugin(render_frame, frame, params, output); *plugin = CreatePlugin(render_frame, frame, params, output);
@ -620,11 +611,12 @@ bool CefContentRendererClient::WillSendRequest(
unsigned long long CefContentRendererClient::VisitedLinkHash( unsigned long long CefContentRendererClient::VisitedLinkHash(
const char* canonical_url, size_t length) { const char* canonical_url, size_t length) {
return visited_link_slave_->ComputeURLFingerprint(canonical_url, length); return observer_->visited_link_slave()->ComputeURLFingerprint(canonical_url,
length);
} }
bool CefContentRendererClient::IsLinkVisited(unsigned long long link_hash) { bool CefContentRendererClient::IsLinkVisited(unsigned long long link_hash) {
return visited_link_slave_->IsVisited(link_hash); return observer_->visited_link_slave()->IsVisited(link_hash);
} }
content::BrowserPluginDelegate* content::BrowserPluginDelegate*
@ -846,7 +838,8 @@ void CefContentRendererClient::BrowserCreated(
if (params.is_guest_view) { if (params.is_guest_view) {
// Don't create a CefBrowser for guest views. // Don't create a CefBrowser for guest views.
guest_views_.insert( guest_views_.insert(
std::make_pair(render_view, new CefGuestView(render_view))); std::make_pair(render_view,
base::MakeUnique<CefGuestView>(render_view)));
return; return;
} }

View File

@ -9,6 +9,7 @@
#include <list> #include <list>
#include <map> #include <map>
#include <memory>
#include <string> #include <string>
#include <vector> #include <vector>
@ -29,10 +30,6 @@ class ExtensionsRendererClient;
class ResourceRequestPolicy; class ResourceRequestPolicy;
} }
namespace visitedlink {
class VisitedLinkSlave;
}
namespace web_cache { namespace web_cache {
class WebCacheImpl; class WebCacheImpl;
} }
@ -152,14 +149,14 @@ class CefContentRendererClient : public content::ContentRendererClient,
std::unique_ptr<CefRenderThreadObserver> observer_; std::unique_ptr<CefRenderThreadObserver> observer_;
std::unique_ptr<web_cache::WebCacheImpl> web_cache_impl_; std::unique_ptr<web_cache::WebCacheImpl> web_cache_impl_;
std::unique_ptr<SpellCheck> spellcheck_; std::unique_ptr<SpellCheck> spellcheck_;
std::unique_ptr<visitedlink::VisitedLinkSlave> visited_link_slave_;
// Map of RenderView pointers to CefBrowserImpl references. // Map of RenderView pointers to CefBrowserImpl references.
typedef std::map<content::RenderView*, CefRefPtr<CefBrowserImpl> > BrowserMap; typedef std::map<content::RenderView*, CefRefPtr<CefBrowserImpl> > BrowserMap;
BrowserMap browsers_; BrowserMap browsers_;
// Map of RenderView poiners to CefGuestView implementations. // Map of RenderView poiners to CefGuestView implementations.
typedef std::map<content::RenderView*, CefGuestView* > GuestViewMap; typedef std::map<content::RenderView*, std::unique_ptr<CefGuestView> >
GuestViewMap;
GuestViewMap guest_views_; GuestViewMap guest_views_;
// Cross-origin white list entries that need to be registered with WebKit. // Cross-origin white list entries that need to be registered with WebKit.

View File

@ -21,7 +21,7 @@ void CefPepperHelper::DidCreatePepperPlugin(content::RendererPpapiHost* host) {
// TODO(brettw) figure out how to hook up the host factory. It needs some // TODO(brettw) figure out how to hook up the host factory. It needs some
// kind of filter-like system to allow dynamic additions. // kind of filter-like system to allow dynamic additions.
host->GetPpapiHost()->AddHostFactoryFilter( host->GetPpapiHost()->AddHostFactoryFilter(
base::WrapUnique(new CefRendererPepperHostFactory(host))); base::MakeUnique<CefRendererPepperHostFactory>(host));
} }
void CefPepperHelper::OnDestruct() { void CefPepperHelper::OnDestruct() {

View File

@ -5,6 +5,7 @@
#include "libcef/renderer/pepper/renderer_pepper_host_factory.h" #include "libcef/renderer/pepper/renderer_pepper_host_factory.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "chrome/renderer/pepper/pepper_flash_drm_renderer_host.h" #include "chrome/renderer/pepper/pepper_flash_drm_renderer_host.h"
#include "chrome/renderer/pepper/pepper_flash_font_file_host.h" #include "chrome/renderer/pepper/pepper_flash_font_file_host.h"
#include "chrome/renderer/pepper/pepper_flash_fullscreen_host.h" #include "chrome/renderer/pepper/pepper_flash_fullscreen_host.h"
@ -36,25 +37,25 @@ std::unique_ptr<ResourceHost> CefRendererPepperHostFactory::CreateResourceHost(
// Make sure the plugin is giving us a valid instance for this resource. // Make sure the plugin is giving us a valid instance for this resource.
if (!host_->IsValidInstance(instance)) if (!host_->IsValidInstance(instance))
return std::unique_ptr<ResourceHost>(); return nullptr;
if (host_->GetPpapiHost()->permissions().HasPermission( if (host_->GetPpapiHost()->permissions().HasPermission(
ppapi::PERMISSION_FLASH)) { ppapi::PERMISSION_FLASH)) {
switch (message.type()) { switch (message.type()) {
case PpapiHostMsg_Flash_Create::ID: { case PpapiHostMsg_Flash_Create::ID: {
return std::unique_ptr<ResourceHost>( return base::MakeUnique<PepperFlashRendererHost>(host_, instance,
new PepperFlashRendererHost(host_, instance, resource)); resource);
} }
case PpapiHostMsg_FlashFullscreen_Create::ID: { case PpapiHostMsg_FlashFullscreen_Create::ID: {
return std::unique_ptr<ResourceHost>( return base::MakeUnique<PepperFlashFullscreenHost>(host_, instance,
new PepperFlashFullscreenHost(host_, instance, resource)); resource);
} }
case PpapiHostMsg_FlashMenu_Create::ID: { case PpapiHostMsg_FlashMenu_Create::ID: {
ppapi::proxy::SerializedFlashMenu serialized_menu; ppapi::proxy::SerializedFlashMenu serialized_menu;
if (ppapi::UnpackMessage<PpapiHostMsg_FlashMenu_Create>( if (ppapi::UnpackMessage<PpapiHostMsg_FlashMenu_Create>(
message, &serialized_menu)) { message, &serialized_menu)) {
return std::unique_ptr<ResourceHost>(new PepperFlashMenuHost( return base::MakeUnique<PepperFlashMenuHost>(
host_, instance, resource, serialized_menu)); host_, instance, resource, serialized_menu);
} }
break; break;
} }
@ -74,14 +75,14 @@ std::unique_ptr<ResourceHost> CefRendererPepperHostFactory::CreateResourceHost(
PP_PrivateFontCharset charset; PP_PrivateFontCharset charset;
if (ppapi::UnpackMessage<PpapiHostMsg_FlashFontFile_Create>( if (ppapi::UnpackMessage<PpapiHostMsg_FlashFontFile_Create>(
message, &description, &charset)) { message, &description, &charset)) {
return std::unique_ptr<ResourceHost>(new PepperFlashFontFileHost( return base::MakeUnique<PepperFlashFontFileHost>(
host_, instance, resource, description, charset)); host_, instance, resource, description, charset);
} }
break; break;
} }
case PpapiHostMsg_FlashDRM_Create::ID: case PpapiHostMsg_FlashDRM_Create::ID:
return std::unique_ptr<ResourceHost>( return base::MakeUnique<PepperFlashDRMRendererHost>(host_, instance,
new PepperFlashDRMRendererHost(host_, instance, resource)); resource);
} }
} }
@ -89,8 +90,7 @@ std::unique_ptr<ResourceHost> CefRendererPepperHostFactory::CreateResourceHost(
ppapi::PERMISSION_PRIVATE)) { ppapi::PERMISSION_PRIVATE)) {
switch (message.type()) { switch (message.type()) {
case PpapiHostMsg_PDF_Create::ID: { case PpapiHostMsg_PDF_Create::ID: {
return std::unique_ptr<ResourceHost>( return base::MakeUnique<pdf::PepperPDFHost>(host_, instance, resource);
new pdf::PepperPDFHost(host_, instance, resource));
} }
} }
} }
@ -101,11 +101,10 @@ std::unique_ptr<ResourceHost> CefRendererPepperHostFactory::CreateResourceHost(
// access to the other private interfaces. // access to the other private interfaces.
switch (message.type()) { switch (message.type()) {
case PpapiHostMsg_UMA_Create::ID: { case PpapiHostMsg_UMA_Create::ID: {
return std::unique_ptr<ResourceHost>( return base::MakeUnique<PepperUMAHost>(host_, instance, resource);
new PepperUMAHost(host_, instance, resource));
} }
} }
NOTREACHED() << "Unhandled message type: " << message.type(); NOTREACHED() << "Unhandled message type: " << message.type();
return std::unique_ptr<ResourceHost>(); return nullptr;
} }

View File

@ -17,7 +17,6 @@
#include "chrome/grit/generated_resources.h" #include "chrome/grit/generated_resources.h"
#include "chrome/grit/renderer_resources.h" #include "chrome/grit/renderer_resources.h"
#include "chrome/renderer/custom_menu_commands.h" #include "chrome/renderer/custom_menu_commands.h"
#include "components/content_settings/content/common/content_settings_messages.h"
#include "components/strings/grit/components_strings.h" #include "components/strings/grit/components_strings.h"
#include "content/public/common/content_switches.h" #include "content/public/common/content_switches.h"
#include "content/public/common/context_menu_params.h" #include "content/public/common/context_menu_params.h"
@ -171,6 +170,12 @@ void CefPluginPlaceholder::OpenAboutPluginsCallback() {
NOTREACHED(); NOTREACHED();
} }
void CefPluginPlaceholder::ShowPermissionBubbleCallback() {
// CEF does not use IDR_PREFER_HTML_PLUGIN_HTML which would originate this
// callback.
NOTREACHED();
}
void CefPluginPlaceholder::PluginListChanged() { void CefPluginPlaceholder::PluginListChanged() {
if (!GetFrame() || !plugin()) if (!GetFrame() || !plugin())
return; return;
@ -180,14 +185,9 @@ void CefPluginPlaceholder::PluginListChanged() {
CefViewHostMsg_GetPluginInfo_Output output; CefViewHostMsg_GetPluginInfo_Output output;
std::string mime_type(GetPluginParams().mimeType.utf8()); std::string mime_type(GetPluginParams().mimeType.utf8());
blink::WebString top_origin = render_frame()->Send(new CefViewHostMsg_GetPluginInfo(
GetFrame()->top()->getSecurityOrigin().toString(); routing_id(), GURL(GetPluginParams().url),
render_frame()->Send( GetFrame()->top()->getSecurityOrigin(), mime_type, &output));
new CefViewHostMsg_GetPluginInfo(routing_id(),
GURL(GetPluginParams().url),
blink::WebStringToGURL(top_origin),
mime_type,
&output));
if (output.status == status_) if (output.status == status_)
return; return;
blink::WebPlugin* new_plugin = CefContentRendererClient::CreatePlugin( blink::WebPlugin* new_plugin = CefContentRendererClient::CreatePlugin(
@ -305,7 +305,9 @@ gin::ObjectTemplateBuilder CefPluginPlaceholder::GetObjectTemplateBuilder(
"didFinishLoading", "didFinishLoading",
&CefPluginPlaceholder::DidFinishLoadingCallback) &CefPluginPlaceholder::DidFinishLoadingCallback)
.SetMethod("openAboutPlugins", .SetMethod("openAboutPlugins",
&CefPluginPlaceholder::OpenAboutPluginsCallback); &CefPluginPlaceholder::OpenAboutPluginsCallback)
.SetMethod("showPermissionBubble",
&CefPluginPlaceholder::ShowPermissionBubbleCallback);
if (base::CommandLine::ForCurrentProcess()->HasSwitch( if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnablePluginPlaceholderTesting)) { switches::kEnablePluginPlaceholderTesting)) {

View File

@ -75,6 +75,8 @@ class CefPluginPlaceholder final
// Javascript callbacks: // Javascript callbacks:
// Open chrome://plugins in a new tab. // Open chrome://plugins in a new tab.
void OpenAboutPluginsCallback(); void OpenAboutPluginsCallback();
// Show the Plugins permission bubble.
void ShowPermissionBubbleCallback();
CefViewHostMsg_GetPluginInfo_Status status_; CefViewHostMsg_GetPluginInfo_Status status_;

View File

@ -21,17 +21,18 @@
using content::BrowserThread; using content::BrowserThread;
CefRenderMessageFilter::CefRenderMessageFilter() CefRenderMessageFilter::CefRenderMessageFilter()
: sender_(NULL) { : channel_(NULL) {
} }
CefRenderMessageFilter::~CefRenderMessageFilter() { CefRenderMessageFilter::~CefRenderMessageFilter() {
} }
void CefRenderMessageFilter::OnFilterAdded(IPC::Sender* sender) { void CefRenderMessageFilter::OnFilterAdded(IPC::Channel* channel) {
sender_ = sender; channel_ = channel;
} }
void CefRenderMessageFilter::OnFilterRemoved() { void CefRenderMessageFilter::OnFilterRemoved() {
channel_ = nullptr;
} }
bool CefRenderMessageFilter::OnMessageReceived(const IPC::Message& message) { bool CefRenderMessageFilter::OnMessageReceived(const IPC::Message& message) {
@ -74,8 +75,8 @@ bool CefRenderMessageFilter::Send(IPC::Message* message) {
return true; return true;
} }
if (sender_) if (channel_)
return sender_->Send(message); return channel_->Send(message);
delete message; delete message;
return false; return false;

View File

@ -20,7 +20,7 @@ class CefRenderMessageFilter : public IPC::MessageFilter {
~CefRenderMessageFilter() override; ~CefRenderMessageFilter() override;
// IPC::ChannelProxy::MessageFilter implementation. // IPC::ChannelProxy::MessageFilter implementation.
void OnFilterAdded(IPC::Sender* sender) override; void OnFilterAdded(IPC::Channel* channel) override;
void OnFilterRemoved() override; void OnFilterRemoved() override;
bool OnMessageReceived(const IPC::Message& message) override; bool OnMessageReceived(const IPC::Message& message) override;
@ -35,7 +35,7 @@ class CefRenderMessageFilter : public IPC::MessageFilter {
void OnDevToolsAgentAttach_RT(); void OnDevToolsAgentAttach_RT();
void OnDevToolsAgentDetach_RT(int32_t routing_id); void OnDevToolsAgentDetach_RT(int32_t routing_id);
IPC::Sender* sender_; IPC::Channel* channel_;
DISALLOW_COPY_AND_ASSIGN(CefRenderMessageFilter); DISALLOW_COPY_AND_ASSIGN(CefRenderMessageFilter);
}; };

View File

@ -8,15 +8,23 @@
#include "libcef/common/net/net_resource_provider.h" #include "libcef/common/net/net_resource_provider.h"
#include "libcef/renderer/content_renderer_client.h" #include "libcef/renderer/content_renderer_client.h"
#include "components/visitedlink/renderer/visitedlink_slave.h"
#include "content/public/renderer/render_thread.h"
#include "net/base/net_module.h" #include "net/base/net_module.h"
#include "services/shell/public/cpp/interface_registry.h"
#include "third_party/WebKit/public/platform/WebString.h" #include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/platform/WebURL.h" #include "third_party/WebKit/public/platform/WebURL.h"
#include "third_party/WebKit/public/web/WebSecurityPolicy.h" #include "third_party/WebKit/public/web/WebSecurityPolicy.h"
bool CefRenderThreadObserver::is_incognito_process_ = false; bool CefRenderThreadObserver::is_incognito_process_ = false;
CefRenderThreadObserver::CefRenderThreadObserver() { CefRenderThreadObserver::CefRenderThreadObserver()
: visited_link_slave_(new visitedlink::VisitedLinkSlave) {
net::NetModule::SetResourceProvider(NetResourceProvider); net::NetModule::SetResourceProvider(NetResourceProvider);
content::RenderThread* thread = content::RenderThread::Get();
thread->GetInterfaceRegistry()->AddInterface(
visited_link_slave_->GetBindCallback());
} }
CefRenderThreadObserver::~CefRenderThreadObserver() { CefRenderThreadObserver::~CefRenderThreadObserver() {
@ -39,6 +47,7 @@ bool CefRenderThreadObserver::OnControlMessageReceived(
void CefRenderThreadObserver::OnRenderProcessShutdown() { void CefRenderThreadObserver::OnRenderProcessShutdown() {
CefContentRendererClient::Get()->OnRenderProcessShutdown(); CefContentRendererClient::Get()->OnRenderProcessShutdown();
visited_link_slave_.reset();
} }
void CefRenderThreadObserver::OnSetIsIncognitoProcess( void CefRenderThreadObserver::OnSetIsIncognitoProcess(

View File

@ -6,9 +6,15 @@
#ifndef CEF_LIBCEF_RENDERER_RENDER_THREAD_OBSERVER_H_ #ifndef CEF_LIBCEF_RENDERER_RENDER_THREAD_OBSERVER_H_
#define CEF_LIBCEF_RENDERER_RENDER_THREAD_OBSERVER_H_ #define CEF_LIBCEF_RENDERER_RENDER_THREAD_OBSERVER_H_
#include <memory>
#include "base/compiler_specific.h" #include "base/compiler_specific.h"
#include "content/public/renderer/render_thread_observer.h" #include "content/public/renderer/render_thread_observer.h"
namespace visitedlink {
class VisitedLinkSlave;
}
struct Cef_CrossOriginWhiteListEntry_Params; struct Cef_CrossOriginWhiteListEntry_Params;
// This class sends and receives control messages on the renderer process. // This class sends and receives control messages on the renderer process.
@ -23,6 +29,10 @@ class CefRenderThreadObserver : public content::RenderThreadObserver {
bool OnControlMessageReceived(const IPC::Message& message) override; bool OnControlMessageReceived(const IPC::Message& message) override;
void OnRenderProcessShutdown() override; void OnRenderProcessShutdown() override;
visitedlink::VisitedLinkSlave* visited_link_slave() {
return visited_link_slave_.get();
}
private: private:
// Message handlers called on the render thread. // Message handlers called on the render thread.
void OnSetIsIncognitoProcess(bool is_incognito_process); void OnSetIsIncognitoProcess(bool is_incognito_process);
@ -33,6 +43,8 @@ class CefRenderThreadObserver : public content::RenderThreadObserver {
static bool is_incognito_process_; static bool is_incognito_process_;
std::unique_ptr<visitedlink::VisitedLinkSlave> visited_link_slave_;
DISALLOW_COPY_AND_ASSIGN(CefRenderThreadObserver); DISALLOW_COPY_AND_ASSIGN(CefRenderThreadObserver);
}; };

View File

@ -37,11 +37,10 @@ class CefWebURLLoaderClient : public blink::WebURLLoaderClient {
~CefWebURLLoaderClient() override; ~CefWebURLLoaderClient() override;
// blink::WebURLLoaderClient methods. // blink::WebURLLoaderClient methods.
void willFollowRedirect( bool willFollowRedirect(
WebURLLoader* loader, WebURLLoader* loader,
WebURLRequest& newRequest, WebURLRequest& newRequest,
const WebURLResponse& redirectResponse, const WebURLResponse& redirectResponse) override;
int64_t encodedDataLength) override;
void didSendData( void didSendData(
WebURLLoader* loader, WebURLLoader* loader,
unsigned long long bytesSent, unsigned long long bytesSent,
@ -252,11 +251,11 @@ CefWebURLLoaderClient::CefWebURLLoaderClient(
CefWebURLLoaderClient::~CefWebURLLoaderClient() { CefWebURLLoaderClient::~CefWebURLLoaderClient() {
} }
void CefWebURLLoaderClient::willFollowRedirect( bool CefWebURLLoaderClient::willFollowRedirect(
WebURLLoader* loader, WebURLLoader* loader,
WebURLRequest& newRequest, WebURLRequest& newRequest,
const WebURLResponse& redirectResponse, const WebURLResponse& redirectResponse) {
int64_t encodedDataLength) { return true;
} }
void CefWebURLLoaderClient::didSendData( void CefWebURLLoaderClient::didSendData(

View File

@ -262,4 +262,12 @@ patches = [
'name': 'ui_views_test_640741', 'name': 'ui_views_test_640741',
'path': '../', 'path': '../',
}, },
{
# Fix PDF extension loading after showing the plugin placeholder.
# https://bitbucket.org/chromiumembedded/cef/issues/2020/
# Reverts https://codereview.chromium.org/2352673003 and
# https://codereview.chromium.org/2344023002
'name': 'webview_plugin_2020',
'path': '../',
},
] ]

View File

@ -1,5 +1,5 @@
diff --git content/browser/renderer_host/browser_compositor_view_mac.h content/browser/renderer_host/browser_compositor_view_mac.h diff --git content/browser/renderer_host/browser_compositor_view_mac.h content/browser/renderer_host/browser_compositor_view_mac.h
index 8d92b06..618d23e 100644 index 4b8d5bc..6a1b374 100644
--- content/browser/renderer_host/browser_compositor_view_mac.h --- content/browser/renderer_host/browser_compositor_view_mac.h
+++ content/browser/renderer_host/browser_compositor_view_mac.h +++ content/browser/renderer_host/browser_compositor_view_mac.h
@@ -56,9 +56,11 @@ class BrowserCompositorMac : public cc::BeginFrameObserver, @@ -56,9 +56,11 @@ class BrowserCompositorMac : public cc::BeginFrameObserver,
@ -13,12 +13,12 @@ index 8d92b06..618d23e 100644
+ ui::Compositor* GetCompositor(); + ui::Compositor* GetCompositor();
ui::AcceleratedWidgetMac* GetAcceleratedWidgetMac(); ui::AcceleratedWidgetMac* GetAcceleratedWidgetMac();
void SwapCompositorFrame(uint32_t output_surface_id, void SwapCompositorFrame(uint32_t compositor_frame_sink_id,
diff --git content/browser/renderer_host/browser_compositor_view_mac.mm content/browser/renderer_host/browser_compositor_view_mac.mm diff --git content/browser/renderer_host/browser_compositor_view_mac.mm content/browser/renderer_host/browser_compositor_view_mac.mm
index 219effe..5122a99 100644 index 3ec7423..14d5add 100644
--- content/browser/renderer_host/browser_compositor_view_mac.mm --- content/browser/renderer_host/browser_compositor_view_mac.mm
+++ content/browser/renderer_host/browser_compositor_view_mac.mm +++ content/browser/renderer_host/browser_compositor_view_mac.mm
@@ -198,6 +198,12 @@ BrowserCompositorMac::~BrowserCompositorMac() { @@ -200,6 +200,12 @@ BrowserCompositorMac::~BrowserCompositorMac() {
g_spare_recyclable_compositors.Get().clear(); g_spare_recyclable_compositors.Get().clear();
} }
@ -31,7 +31,7 @@ index 219effe..5122a99 100644
ui::AcceleratedWidgetMac* BrowserCompositorMac::GetAcceleratedWidgetMac() { ui::AcceleratedWidgetMac* BrowserCompositorMac::GetAcceleratedWidgetMac() {
if (recyclable_compositor_) if (recyclable_compositor_)
return recyclable_compositor_->accelerated_widget_mac(); return recyclable_compositor_->accelerated_widget_mac();
@@ -414,8 +420,13 @@ SkColor BrowserCompositorMac::DelegatedFrameHostGetGutterColor( @@ -417,8 +423,13 @@ SkColor BrowserCompositorMac::DelegatedFrameHostGetGutterColor(
} }
gfx::Size BrowserCompositorMac::DelegatedFrameHostDesiredSizeInDIP() const { gfx::Size BrowserCompositorMac::DelegatedFrameHostDesiredSizeInDIP() const {

View File

@ -1,8 +1,8 @@
diff --git render_widget_host_view_guest.cc render_widget_host_view_guest.cc diff --git render_widget_host_view_guest.cc render_widget_host_view_guest.cc
index cdb2d17..fb53fa6 100644 index 7122187..19dec1a 100644
--- render_widget_host_view_guest.cc --- render_widget_host_view_guest.cc
+++ render_widget_host_view_guest.cc +++ render_widget_host_view_guest.cc
@@ -242,6 +242,9 @@ void RenderWidgetHostViewGuest::Destroy() { @@ -253,6 +253,9 @@ void RenderWidgetHostViewGuest::Destroy() {
} }
gfx::Size RenderWidgetHostViewGuest::GetPhysicalBackingSize() const { gfx::Size RenderWidgetHostViewGuest::GetPhysicalBackingSize() const {

View File

@ -1,5 +1,5 @@
diff --git browser/browser_plugin/browser_plugin_guest.cc browser/browser_plugin/browser_plugin_guest.cc diff --git browser/browser_plugin/browser_plugin_guest.cc browser/browser_plugin/browser_plugin_guest.cc
index 6d06122..bc964c7 100644 index 2dc039f..66e45e2 100644
--- browser/browser_plugin/browser_plugin_guest.cc --- browser/browser_plugin/browser_plugin_guest.cc
+++ browser/browser_plugin/browser_plugin_guest.cc +++ browser/browser_plugin/browser_plugin_guest.cc
@@ -28,7 +28,7 @@ @@ -28,7 +28,7 @@
@ -11,13 +11,13 @@ index 6d06122..bc964c7 100644
#include "content/common/browser_plugin/browser_plugin_constants.h" #include "content/common/browser_plugin/browser_plugin_constants.h"
#include "content/common/browser_plugin/browser_plugin_messages.h" #include "content/common/browser_plugin/browser_plugin_messages.h"
#include "content/common/content_constants_internal.h" #include "content/common/content_constants_internal.h"
@@ -292,20 +292,19 @@ void BrowserPluginGuest::InitInternal( @@ -293,20 +293,19 @@ void BrowserPluginGuest::InitInternal(
guest_window_rect_ = params.view_rect; guest_window_rect_ = params.view_rect;
if (owner_web_contents_ != owner_web_contents) { if (owner_web_contents_ != owner_web_contents) {
- WebContentsViewGuest* new_view = nullptr; - WebContentsViewGuest* new_view = nullptr;
+ WebContentsView* new_view = nullptr; + WebContentsView* new_view = nullptr;
if (!BrowserPluginGuestMode::UseCrossProcessFramesForGuests()) { if (!GuestMode::IsCrossProcessFrameGuest(GetWebContents())) {
- new_view = - new_view =
- static_cast<WebContentsViewGuest*>(GetWebContents()->GetView()); - static_cast<WebContentsViewGuest*>(GetWebContents()->GetView());
+ new_view = GetWebContents()->GetView(); + new_view = GetWebContents()->GetView();
@ -52,7 +52,7 @@ index 6d06122..bc964c7 100644
} }
diff --git public/browser/browser_plugin_guest_delegate.cc public/browser/browser_plugin_guest_delegate.cc diff --git public/browser/browser_plugin_guest_delegate.cc public/browser/browser_plugin_guest_delegate.cc
index bfa19e4..d788495 100644 index 732df23..25dbc62 100644
--- public/browser/browser_plugin_guest_delegate.cc --- public/browser/browser_plugin_guest_delegate.cc
+++ public/browser/browser_plugin_guest_delegate.cc +++ public/browser/browser_plugin_guest_delegate.cc
@@ -4,6 +4,8 @@ @@ -4,6 +4,8 @@
@ -64,8 +64,8 @@ index bfa19e4..d788495 100644
namespace content { namespace content {
bool BrowserPluginGuestDelegate::CanRunInDetachedState() const { bool BrowserPluginGuestDelegate::CanRunInDetachedState() const {
@@ -32,4 +34,23 @@ bool BrowserPluginGuestDelegate::HandleStopFindingForEmbedder( @@ -36,4 +38,23 @@ bool BrowserPluginGuestDelegate::CanUseCrossProcessFrames() {
return false; return true;
} }
+void BrowserPluginGuestDelegate::OnGuestAttached( +void BrowserPluginGuestDelegate::OnGuestAttached(
@ -89,7 +89,7 @@ index bfa19e4..d788495 100644
+ +
} // namespace content } // namespace content
diff --git public/browser/browser_plugin_guest_delegate.h public/browser/browser_plugin_guest_delegate.h diff --git public/browser/browser_plugin_guest_delegate.h public/browser/browser_plugin_guest_delegate.h
index 4dd1a4c..b299190 100644 index 0f805651..fe0385d 100644
--- public/browser/browser_plugin_guest_delegate.h --- public/browser/browser_plugin_guest_delegate.h
+++ public/browser/browser_plugin_guest_delegate.h +++ public/browser/browser_plugin_guest_delegate.h
@@ -21,6 +21,8 @@ class Size; @@ -21,6 +21,8 @@ class Size;

View File

@ -63,7 +63,7 @@ index 4b43013..169ca47 100644
content::BrowserContext* GetBrowserContextRedirectedInIncognito( content::BrowserContext* GetBrowserContextRedirectedInIncognito(
content::BrowserContext* context); content::BrowserContext* context);
diff --git chrome/browser/profiles/profile_manager.h chrome/browser/profiles/profile_manager.h diff --git chrome/browser/profiles/profile_manager.h chrome/browser/profiles/profile_manager.h
index e3e742c..fe8e855 100644 index ba156c5..b7f41d3 100644
--- chrome/browser/profiles/profile_manager.h --- chrome/browser/profiles/profile_manager.h
+++ chrome/browser/profiles/profile_manager.h +++ chrome/browser/profiles/profile_manager.h
@@ -89,7 +89,7 @@ class ProfileManager : public base::NonThreadSafe, @@ -89,7 +89,7 @@ class ProfileManager : public base::NonThreadSafe,

View File

@ -1,8 +1,8 @@
diff --git chrome/common/chrome_content_client.cc chrome/common/chrome_content_client.cc diff --git chrome/common/chrome_content_client.cc chrome/common/chrome_content_client.cc
index eb4d107..0f5dfee 100644 index 616c9b1..cf1c881 100644
--- chrome/common/chrome_content_client.cc --- chrome/common/chrome_content_client.cc
+++ chrome/common/chrome_content_client.cc +++ chrome/common/chrome_content_client.cc
@@ -76,7 +76,7 @@ @@ -77,7 +77,7 @@
#endif #endif
#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) && \ #if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) && \

View File

@ -1,8 +1,8 @@
diff --git content/browser/compositor/gpu_process_transport_factory.cc content/browser/compositor/gpu_process_transport_factory.cc diff --git content/browser/compositor/gpu_process_transport_factory.cc content/browser/compositor/gpu_process_transport_factory.cc
index 128cb43..fb72012 100644 index 73ee42f..b30dc83 100644
--- content/browser/compositor/gpu_process_transport_factory.cc --- content/browser/compositor/gpu_process_transport_factory.cc
+++ content/browser/compositor/gpu_process_transport_factory.cc +++ content/browser/compositor/gpu_process_transport_factory.cc
@@ -198,6 +198,13 @@ GpuProcessTransportFactory::~GpuProcessTransportFactory() { @@ -196,6 +196,13 @@ GpuProcessTransportFactory::~GpuProcessTransportFactory() {
std::unique_ptr<cc::SoftwareOutputDevice> std::unique_ptr<cc::SoftwareOutputDevice>
GpuProcessTransportFactory::CreateSoftwareOutputDevice( GpuProcessTransportFactory::CreateSoftwareOutputDevice(
ui::Compositor* compositor) { ui::Compositor* compositor) {
@ -17,7 +17,7 @@ index 128cb43..fb72012 100644
if (shell::ShellIsRemote()) { if (shell::ShellIsRemote()) {
NOTREACHED(); NOTREACHED();
diff --git ui/compositor/compositor.h ui/compositor/compositor.h diff --git ui/compositor/compositor.h ui/compositor/compositor.h
index 1ab836b..1f7a82a 100644 index 6a6b423..4a0d9e4 100644
--- ui/compositor/compositor.h --- ui/compositor/compositor.h
+++ ui/compositor/compositor.h +++ ui/compositor/compositor.h
@@ -18,6 +18,7 @@ @@ -18,6 +18,7 @@
@ -28,7 +28,7 @@ index 1ab836b..1f7a82a 100644
#include "cc/surfaces/surface_sequence.h" #include "cc/surfaces/surface_sequence.h"
#include "cc/trees/layer_tree_host_client.h" #include "cc/trees/layer_tree_host_client.h"
#include "cc/trees/layer_tree_host_single_thread_client.h" #include "cc/trees/layer_tree_host_single_thread_client.h"
@@ -194,6 +195,17 @@ class COMPOSITOR_EXPORT CompositorLock @@ -195,6 +196,17 @@ class COMPOSITOR_EXPORT CompositorLock
DISALLOW_COPY_AND_ASSIGN(CompositorLock); DISALLOW_COPY_AND_ASSIGN(CompositorLock);
}; };
@ -46,7 +46,7 @@ index 1ab836b..1f7a82a 100644
// Compositor object to take care of GPU painting. // Compositor object to take care of GPU painting.
// A Browser compositor object is responsible for generating the final // A Browser compositor object is responsible for generating the final
// displayable form of pixels comprising a single widget's contents. It draws an // displayable form of pixels comprising a single widget's contents. It draws an
@@ -217,6 +229,9 @@ class COMPOSITOR_EXPORT Compositor @@ -218,6 +230,9 @@ class COMPOSITOR_EXPORT Compositor
// Schedules a redraw of the layer tree associated with this compositor. // Schedules a redraw of the layer tree associated with this compositor.
void ScheduleDraw(); void ScheduleDraw();

View File

@ -19,7 +19,7 @@ index bb040a6..c801841 100644
return false; return false;
} }
diff --git public/renderer/content_renderer_client.h public/renderer/content_renderer_client.h diff --git public/renderer/content_renderer_client.h public/renderer/content_renderer_client.h
index 752ae2d..de04432 100644 index 14d8550..92e5b21 100644
--- public/renderer/content_renderer_client.h --- public/renderer/content_renderer_client.h
+++ public/renderer/content_renderer_client.h +++ public/renderer/content_renderer_client.h
@@ -208,7 +208,6 @@ class CONTENT_EXPORT ContentRendererClient { @@ -208,7 +208,6 @@ class CONTENT_EXPORT ContentRendererClient {
@ -39,10 +39,10 @@ index 752ae2d..de04432 100644
// built in media player for the given |url|. Defaults to false. // built in media player for the given |url|. Defaults to false.
virtual bool ShouldUseMediaPlayerForURL(const GURL& url); virtual bool ShouldUseMediaPlayerForURL(const GURL& url);
diff --git renderer/render_frame_impl.cc renderer/render_frame_impl.cc diff --git renderer/render_frame_impl.cc renderer/render_frame_impl.cc
index e74b334..2fe1e1a 100644 index 8880b8d..cab954b 100644
--- renderer/render_frame_impl.cc --- renderer/render_frame_impl.cc
+++ renderer/render_frame_impl.cc +++ renderer/render_frame_impl.cc
@@ -4972,7 +4972,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation( @@ -5008,7 +5008,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
(pending_navigation_params_ && (pending_navigation_params_ &&
!pending_navigation_params_->request_params.redirects.empty()); !pending_navigation_params_->request_params.redirects.empty());
@ -50,7 +50,7 @@ index e74b334..2fe1e1a 100644
// The handlenavigation API is deprecated and will be removed once // The handlenavigation API is deprecated and will be removed once
// crbug.com/325351 is resolved. // crbug.com/325351 is resolved.
if (GetContentClient()->renderer()->HandleNavigation( if (GetContentClient()->renderer()->HandleNavigation(
@@ -4981,7 +4980,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation( @@ -5017,7 +5016,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
is_redirect)) { is_redirect)) {
return blink::WebNavigationPolicyIgnore; return blink::WebNavigationPolicyIgnore;
} }

View File

@ -1,8 +1,8 @@
diff --git .gn .gn diff --git .gn .gn
index 2034420..1675275 100644 index 585f0d8..9f60467 100644
--- .gn --- .gn
+++ .gn +++ .gn
@@ -238,6 +238,7 @@ exec_script_whitelist = [ @@ -237,6 +237,7 @@ exec_script_whitelist = [
"//build/toolchain/win/BUILD.gn", "//build/toolchain/win/BUILD.gn",
"//build/util/branding.gni", "//build/util/branding.gni",
"//build/util/version.gni", "//build/util/version.gni",
@ -11,10 +11,10 @@ index 2034420..1675275 100644
# TODO(dgn): Layer violation but breaks the build otherwise, see # TODO(dgn): Layer violation but breaks the build otherwise, see
diff --git BUILD.gn BUILD.gn diff --git BUILD.gn BUILD.gn
index 6aad399..9c42f8e 100644 index 93699f0..3346d3e 100644
--- BUILD.gn --- BUILD.gn
+++ BUILD.gn +++ BUILD.gn
@@ -270,6 +270,7 @@ group("both_gn_and_gyp") { @@ -280,6 +280,7 @@ group("both_gn_and_gyp") {
# and whether there should be other targets that are iOS-only and missing. # and whether there should be other targets that are iOS-only and missing.
deps += [ deps += [
"//cc:cc_unittests", "//cc:cc_unittests",
@ -102,37 +102,21 @@ index 9c55984..d44d116 100755
# When using an installed toolchain these files aren't needed in the output # When using an installed toolchain these files aren't needed in the output
# directory in order to run binaries locally, but they are needed in order # directory in order to run binaries locally, but they are needed in order
# to create isolates or the mini_installer. Copying them to the output # to create isolates or the mini_installer. Copying them to the output
diff --git chrome/BUILD.gn chrome/BUILD.gn diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni
index 87d4743..dc21a56 100644 index 3e93269..9821a4b 100644
--- chrome/BUILD.gn --- chrome/chrome_paks.gni
+++ chrome/BUILD.gn +++ chrome/chrome_paks.gni
@@ -709,7 +709,7 @@ if (is_win) { @@ -233,7 +233,7 @@ template("chrome_paks") {
] additional_source_patterns = invoker.additional_locale_source_patterns
foreach(locale, locales_as_mac_outputs) {
- sources += [ "$root_gen_dir/repack/locales/$locale.pak" ]
+ sources += [ "$root_gen_dir/chrome/repack/locales/$locale.pak" ]
} }
input_locales = locales
- output_dir = "${invoker.output_dir}/locales"
+ output_dir = "${invoker.output_dir}/chrome/locales"
outputs = [ if (is_mac) {
diff --git chrome/chrome_repack_locales.gni chrome/chrome_repack_locales.gni output_locales = locales_as_mac_outputs
index f4a3caf..8ae7639 100644
--- chrome/chrome_repack_locales.gni
+++ chrome/chrome_repack_locales.gni
@@ -188,9 +188,9 @@ template("chrome_repack_locales") {
if (defined(invoker.output_dir)) {
output = "${invoker.output_dir}/${output_locale}.pak"
} else if (is_mac || is_ios) {
- output = "${root_gen_dir}/repack/locales/${output_locale}.pak"
+ output = "${root_gen_dir}/chrome/repack/locales/${output_locale}.pak"
} else {
- output = "${root_out_dir}/locales/${output_locale}.pak"
+ output = "${root_out_dir}/chrome/locales/${output_locale}.pak"
}
if (defined(invoker.additional_source_patterns)) {
diff --git chrome/installer/mini_installer/BUILD.gn chrome/installer/mini_installer/BUILD.gn diff --git chrome/installer/mini_installer/BUILD.gn chrome/installer/mini_installer/BUILD.gn
index 1e269aa..b562c3e 100644 index 6994618..4ed3f85 100644
--- chrome/installer/mini_installer/BUILD.gn --- chrome/installer/mini_installer/BUILD.gn
+++ chrome/installer/mini_installer/BUILD.gn +++ chrome/installer/mini_installer/BUILD.gn
@@ -125,7 +125,7 @@ template("generate_mini_installer") { @@ -125,7 +125,7 @@ template("generate_mini_installer") {

View File

@ -1,5 +1,5 @@
diff --git resource_ids resource_ids diff --git resource_ids resource_ids
index 4b6f6ad..0d17c1c 100644 index 82347ce..8e09968 100644
--- resource_ids --- resource_ids
+++ resource_ids +++ resource_ids
@@ -14,6 +14,12 @@ @@ -14,6 +14,12 @@

View File

@ -1,8 +1,8 @@
diff --git message_loop.cc message_loop.cc diff --git message_loop.cc message_loop.cc
index 8a2f213..6dbaa8a 100644 index 74287b1..7309e88 100644
--- message_loop.cc --- message_loop.cc
+++ message_loop.cc +++ message_loop.cc
@@ -143,12 +143,6 @@ MessageLoop::~MessageLoop() { @@ -96,12 +96,6 @@ MessageLoop::~MessageLoop() {
// may be current. // may be current.
DCHECK((pump_ && current() == this) || (!pump_ && current() != this)); DCHECK((pump_ && current() == this) || (!pump_ && current() != this));
@ -15,7 +15,7 @@ index 8a2f213..6dbaa8a 100644
#if defined(OS_WIN) #if defined(OS_WIN)
if (in_high_res_mode_) if (in_high_res_mode_)
Time::ActivateHighResolutionTimer(false); Time::ActivateHighResolutionTimer(false);
@@ -392,6 +386,9 @@ MessageLoop::MessageLoop(Type type, MessagePumpFactoryCallback pump_factory) @@ -313,6 +307,9 @@ MessageLoop::MessageLoop(Type type, MessagePumpFactoryCallback pump_factory)
in_high_res_mode_(false), in_high_res_mode_(false),
#endif #endif
nestable_tasks_allowed_(true), nestable_tasks_allowed_(true),
@ -23,13 +23,13 @@ index 8a2f213..6dbaa8a 100644
+ os_modal_loop_(false), + os_modal_loop_(false),
+#endif // OS_WIN +#endif // OS_WIN
pump_factory_(pump_factory), pump_factory_(pump_factory),
message_histogram_(NULL),
run_loop_(NULL), run_loop_(NULL),
incoming_task_queue_(new internal::IncomingTaskQueue(this)),
diff --git message_loop.h message_loop.h diff --git message_loop.h message_loop.h
index 1957b99..93b3a9d 100644 index 5b1728e..79c4c58 100644
--- message_loop.h --- message_loop.h
+++ message_loop.h +++ message_loop.h
@@ -395,6 +395,16 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate { @@ -299,6 +299,16 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
void AddTaskObserver(TaskObserver* task_observer); void AddTaskObserver(TaskObserver* task_observer);
void RemoveTaskObserver(TaskObserver* task_observer); void RemoveTaskObserver(TaskObserver* task_observer);
@ -46,7 +46,7 @@ index 1957b99..93b3a9d 100644
// Can only be called from the thread that owns the MessageLoop. // Can only be called from the thread that owns the MessageLoop.
bool is_running() const; bool is_running() const;
@@ -542,6 +552,12 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate { @@ -437,6 +447,12 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
// insider a (accidentally induced?) nested message pump. // insider a (accidentally induced?) nested message pump.
bool nestable_tasks_allowed_; bool nestable_tasks_allowed_;
@ -60,10 +60,10 @@ index 1957b99..93b3a9d 100644
// if type_ is TYPE_CUSTOM and pump_ is null. // if type_ is TYPE_CUSTOM and pump_ is null.
MessagePumpFactoryCallback pump_factory_; MessagePumpFactoryCallback pump_factory_;
diff --git message_pump_win.cc message_pump_win.cc diff --git message_pump_win.cc message_pump_win.cc
index de20bdc..29c4504 100644 index b9b2c84..9abef7e 100644
--- message_pump_win.cc --- message_pump_win.cc
+++ message_pump_win.cc +++ message_pump_win.cc
@@ -474,20 +474,28 @@ bool MessagePumpForUI::ProcessMessageHelper(const MSG& msg) { @@ -478,20 +478,28 @@ bool MessagePumpForUI::ProcessMessageHelper(const MSG& msg) {
} }
bool MessagePumpForUI::ProcessPumpReplacementMessage() { bool MessagePumpForUI::ProcessPumpReplacementMessage() {

View File

@ -1,8 +1,8 @@
diff --git mime_handler_view_guest.cc mime_handler_view_guest.cc diff --git mime_handler_view_guest.cc mime_handler_view_guest.cc
index 0b62a81..e34d210 100644 index dcf7527..46fe51e 100644
--- mime_handler_view_guest.cc --- mime_handler_view_guest.cc
+++ mime_handler_view_guest.cc +++ mime_handler_view_guest.cc
@@ -134,6 +134,8 @@ void MimeHandlerViewGuest::CreateWebContents( @@ -138,6 +138,8 @@ void MimeHandlerViewGuest::CreateWebContents(
WebContents::CreateParams params(browser_context(), WebContents::CreateParams params(browser_context(),
guest_site_instance.get()); guest_site_instance.get());
params.guest_delegate = this; params.guest_delegate = this;
@ -11,7 +11,7 @@ index 0b62a81..e34d210 100644
callback.Run(WebContents::Create(params)); callback.Run(WebContents::Create(params));
} }
@@ -158,6 +160,30 @@ bool MimeHandlerViewGuest::ZoomPropagatesFromEmbedderToGuest() const { @@ -162,6 +164,30 @@ bool MimeHandlerViewGuest::ZoomPropagatesFromEmbedderToGuest() const {
return false; return false;
} }
@ -43,10 +43,10 @@ index 0b62a81..e34d210 100644
WebContents* source, WebContents* source,
const content::OpenURLParams& params) { const content::OpenURLParams& params) {
diff --git mime_handler_view_guest.h mime_handler_view_guest.h diff --git mime_handler_view_guest.h mime_handler_view_guest.h
index ef91c24..f849918 100644 index 87d249e..c6a8ad3 100644
--- mime_handler_view_guest.h --- mime_handler_view_guest.h
+++ mime_handler_view_guest.h +++ mime_handler_view_guest.h
@@ -75,6 +75,15 @@ class MimeHandlerViewGuest : @@ -77,6 +77,15 @@ class MimeHandlerViewGuest :
bool ShouldHandleFindRequestsForEmbedder() const final; bool ShouldHandleFindRequestsForEmbedder() const final;
bool ZoomPropagatesFromEmbedderToGuest() const final; bool ZoomPropagatesFromEmbedderToGuest() const final;

View File

@ -1,8 +1,8 @@
diff --git base/network_delegate.h base/network_delegate.h diff --git base/network_delegate.h base/network_delegate.h
index 36bdde9..f1ee1ae 100644 index 6fc19f9..583c8a9 100644
--- base/network_delegate.h --- base/network_delegate.h
+++ base/network_delegate.h +++ base/network_delegate.h
@@ -36,6 +36,7 @@ namespace net { @@ -37,6 +37,7 @@ namespace net {
// of net/base here, because we have a net_base library. Forward declarations // of net/base here, because we have a net_base library. Forward declarations
// are ok. // are ok.
class CookieOptions; class CookieOptions;
@ -10,7 +10,7 @@ index 36bdde9..f1ee1ae 100644
class HttpRequestHeaders; class HttpRequestHeaders;
class HttpResponseHeaders; class HttpResponseHeaders;
class ProxyInfo; class ProxyInfo;
@@ -115,6 +116,13 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe { @@ -116,6 +117,13 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe {
const GURL& target_url, const GURL& target_url,
const GURL& referrer_url) const; const GURL& referrer_url) const;
@ -25,7 +25,7 @@ index 36bdde9..f1ee1ae 100644
// This is the interface for subclasses of NetworkDelegate to implement. These // This is the interface for subclasses of NetworkDelegate to implement. These
// member functions will be called by the respective public notification // member functions will be called by the respective public notification
diff --git filter/filter.h filter/filter.h diff --git filter/filter.h filter/filter.h
index 1940399..bf8722c 100644 index 91875a2..b6c665f 100644
--- filter/filter.h --- filter/filter.h
+++ filter/filter.h +++ filter/filter.h
@@ -59,6 +59,7 @@ @@ -59,6 +59,7 @@
@ -45,10 +45,10 @@ index 1940399..bf8722c 100644
friend class GZipUnitTest; friend class GZipUnitTest;
friend class SdchFilterChainingTest; friend class SdchFilterChainingTest;
diff --git url_request/url_request_job.cc url_request/url_request_job.cc diff --git url_request/url_request_job.cc url_request/url_request_job.cc
index eadeb4b..2341297 100644 index f9df570..72b48ec 100644
--- url_request/url_request_job.cc --- url_request/url_request_job.cc
+++ url_request/url_request_job.cc +++ url_request/url_request_job.cc
@@ -495,6 +495,9 @@ void URLRequestJob::NotifyHeadersComplete() { @@ -489,6 +489,9 @@ void URLRequestJob::NotifyHeadersComplete() {
if (request_->status().is_success()) if (request_->status().is_success())
filter_ = SetupFilter(); filter_ = SetupFilter();

View File

@ -1,8 +1,8 @@
diff --git url_request.h url_request.h diff --git url_request.h url_request.h
index 7a810a7..08d6331 100644 index 993afc9..a207f44 100644
--- url_request.h --- url_request.h
+++ url_request.h +++ url_request.h
@@ -651,10 +651,11 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe), @@ -646,10 +646,11 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
// Returns the error status of the request. // Returns the error status of the request.
// Do not use! Going to be protected! // Do not use! Going to be protected!
const URLRequestStatus& status() const { return status_; } const URLRequestStatus& status() const { return status_; }

View File

@ -1,5 +1,5 @@
diff --git BUILD.gn BUILD.gn diff --git BUILD.gn BUILD.gn
index ccb1e0c..0e3b185 100644 index b6b33f1..d80ead9 100644
--- BUILD.gn --- BUILD.gn
+++ BUILD.gn +++ BUILD.gn
@@ -181,6 +181,10 @@ static_library("pdfium") { @@ -181,6 +181,10 @@ static_library("pdfium") {
@ -14,18 +14,18 @@ index ccb1e0c..0e3b185 100644
static_library("test_support") { static_library("test_support") {
diff --git fpdfsdk/fpdfview.cpp fpdfsdk/fpdfview.cpp diff --git fpdfsdk/fpdfview.cpp fpdfsdk/fpdfview.cpp
index 76540fc..5b2e2d0 100644 index 001ebb0..8b2b6cc 100644
--- fpdfsdk/fpdfview.cpp --- fpdfsdk/fpdfview.cpp
+++ fpdfsdk/fpdfview.cpp +++ fpdfsdk/fpdfview.cpp
@@ -29,6 +29,7 @@ @@ -30,6 +30,7 @@
#include "fpdfsdk/include/fsdk_define.h" #include "fpdfsdk/fsdk_define.h"
#include "fpdfsdk/include/fsdk_pauseadapter.h" #include "fpdfsdk/fsdk_pauseadapter.h"
#include "fpdfsdk/javascript/ijs_runtime.h" #include "fpdfsdk/javascript/ijs_runtime.h"
+#include "fxjs/include/fxjs_v8.h" +#include "fxjs/fxjs_v8.h"
#include "public/fpdf_ext.h" #include "public/fpdf_ext.h"
#include "public/fpdf_progressive.h" #include "public/fpdf_progressive.h"
#include "third_party/base/numerics/safe_conversions_impl.h" #include "third_party/base/numerics/safe_conversions_impl.h"
@@ -297,6 +298,7 @@ DLLEXPORT void STDCALL FPDF_DestroyLibrary() { @@ -299,6 +300,7 @@ DLLEXPORT void STDCALL FPDF_DestroyLibrary() {
#endif // PDF_ENABLE_XFA #endif // PDF_ENABLE_XFA
CPDF_ModuleMgr::Destroy(); CPDF_ModuleMgr::Destroy();
CFX_GEModule::Destroy(); CFX_GEModule::Destroy();

View File

@ -1,8 +1,8 @@
diff --git public/common/common_param_traits_macros.h public/common/common_param_traits_macros.h diff --git public/common/common_param_traits_macros.h public/common/common_param_traits_macros.h
index cb5c7d5..a1f606f 100644 index f2eb0d2..4909609 100644
--- public/common/common_param_traits_macros.h --- public/common/common_param_traits_macros.h
+++ public/common/common_param_traits_macros.h +++ public/common/common_param_traits_macros.h
@@ -202,6 +202,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences) @@ -203,6 +203,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences)
IPC_STRUCT_TRAITS_MEMBER(main_frame_resizes_are_orientation_changes) IPC_STRUCT_TRAITS_MEMBER(main_frame_resizes_are_orientation_changes)
IPC_STRUCT_TRAITS_MEMBER(initialize_at_minimum_page_scale) IPC_STRUCT_TRAITS_MEMBER(initialize_at_minimum_page_scale)
IPC_STRUCT_TRAITS_MEMBER(smart_insert_delete_enabled) IPC_STRUCT_TRAITS_MEMBER(smart_insert_delete_enabled)
@ -11,10 +11,10 @@ index cb5c7d5..a1f606f 100644
IPC_STRUCT_TRAITS_MEMBER(navigate_on_drag_drop) IPC_STRUCT_TRAITS_MEMBER(navigate_on_drag_drop)
IPC_STRUCT_TRAITS_MEMBER(spatial_navigation_enabled) IPC_STRUCT_TRAITS_MEMBER(spatial_navigation_enabled)
diff --git public/common/web_preferences.cc public/common/web_preferences.cc diff --git public/common/web_preferences.cc public/common/web_preferences.cc
index 3e53ef5..133fcdd 100644 index 18a484d..338f2f8 100644
--- public/common/web_preferences.cc --- public/common/web_preferences.cc
+++ public/common/web_preferences.cc +++ public/common/web_preferences.cc
@@ -174,6 +174,7 @@ WebPreferences::WebPreferences() @@ -175,6 +175,7 @@ WebPreferences::WebPreferences()
pinch_overlay_scrollbar_thickness(0), pinch_overlay_scrollbar_thickness(0),
use_solid_color_scrollbars(false), use_solid_color_scrollbars(false),
navigate_on_drag_drop(true), navigate_on_drag_drop(true),
@ -23,10 +23,10 @@ index 3e53ef5..133fcdd 100644
inert_visual_viewport(false), inert_visual_viewport(false),
record_whole_document(false), record_whole_document(false),
diff --git public/common/web_preferences.h public/common/web_preferences.h diff --git public/common/web_preferences.h public/common/web_preferences.h
index 3733fb1..1b54799 100644 index 5509a57..d32b4cc 100644
--- public/common/web_preferences.h --- public/common/web_preferences.h
+++ public/common/web_preferences.h +++ public/common/web_preferences.h
@@ -187,6 +187,7 @@ struct CONTENT_EXPORT WebPreferences { @@ -188,6 +188,7 @@ struct CONTENT_EXPORT WebPreferences {
int pinch_overlay_scrollbar_thickness; int pinch_overlay_scrollbar_thickness;
bool use_solid_color_scrollbars; bool use_solid_color_scrollbars;
bool navigate_on_drag_drop; bool navigate_on_drag_drop;
@ -35,10 +35,10 @@ index 3733fb1..1b54799 100644
bool inert_visual_viewport; bool inert_visual_viewport;
bool record_whole_document; bool record_whole_document;
diff --git renderer/render_view_impl.cc renderer/render_view_impl.cc diff --git renderer/render_view_impl.cc renderer/render_view_impl.cc
index f06587d..27702eb 100644 index 6a461f6..4eba51c 100644
--- renderer/render_view_impl.cc --- renderer/render_view_impl.cc
+++ renderer/render_view_impl.cc +++ renderer/render_view_impl.cc
@@ -1477,6 +1477,8 @@ void RenderViewImpl::ApplyWebPreferencesInternal( @@ -1492,6 +1492,8 @@ void RenderViewImpl::ApplyWebPreferencesInternal(
blink::WebView* web_view, blink::WebView* web_view,
CompositorDependencies* compositor_deps) { CompositorDependencies* compositor_deps) {
ApplyWebPreferences(prefs, web_view); ApplyWebPreferences(prefs, web_view);

View File

@ -166,7 +166,7 @@ index a019144..af8839d 100644
PrintHostMsg_SetOptionsFromDocument_Params /* params */) PrintHostMsg_SetOptionsFromDocument_Params /* params */)
-#endif // defined(ENABLE_PRINT_PREVIEW) -#endif // defined(ENABLE_PRINT_PREVIEW)
diff --git components/printing/renderer/print_web_view_helper.cc components/printing/renderer/print_web_view_helper.cc diff --git components/printing/renderer/print_web_view_helper.cc components/printing/renderer/print_web_view_helper.cc
index 7fa310f..8946ba9 100644 index 7e9df81..33489d0 100644
--- components/printing/renderer/print_web_view_helper.cc --- components/printing/renderer/print_web_view_helper.cc
+++ components/printing/renderer/print_web_view_helper.cc +++ components/printing/renderer/print_web_view_helper.cc
@@ -86,6 +86,9 @@ const float kPrintingMinimumShrinkFactor = 1.333f; @@ -86,6 +86,9 @@ const float kPrintingMinimumShrinkFactor = 1.333f;
@ -229,15 +229,15 @@ index 7fa310f..8946ba9 100644
// static - Not anonymous so that platform implementations can use it. // static - Not anonymous so that platform implementations can use it.
void PrintWebViewHelper::PrintHeaderAndFooter( void PrintWebViewHelper::PrintHeaderAndFooter(
blink::WebCanvas* canvas, blink::WebCanvas* canvas,
@@ -565,7 +560,6 @@ void PrintWebViewHelper::PrintHeaderAndFooter( @@ -563,7 +558,6 @@ void PrintWebViewHelper::PrintHeaderAndFooter(
web_view->close(); web_view->close();
frame->close();
} }
-#endif // defined(ENABLE_PRINT_PREVIEW) -#endif // defined(ENABLE_PRINT_PREVIEW)
// static - Not anonymous so that platform implementations can use it. // static - Not anonymous so that platform implementations can use it.
float PrintWebViewHelper::RenderPageContent(blink::WebFrame* frame, float PrintWebViewHelper::RenderPageContent(blink::WebFrame* frame,
@@ -851,6 +845,7 @@ PrintWebViewHelper::PrintWebViewHelper(content::RenderView* render_view, @@ -840,6 +834,7 @@ PrintWebViewHelper::PrintWebViewHelper(content::RenderView* render_view,
print_for_preview_(false), print_for_preview_(false),
delegate_(std::move(delegate)), delegate_(std::move(delegate)),
print_node_in_progress_(false), print_node_in_progress_(false),
@ -245,7 +245,7 @@ index 7fa310f..8946ba9 100644
is_loading_(false), is_loading_(false),
is_scripted_preview_delayed_(false), is_scripted_preview_delayed_(false),
ipc_nesting_level_(0), ipc_nesting_level_(0),
@@ -909,10 +904,8 @@ void PrintWebViewHelper::PrintPage(blink::WebLocalFrame* frame, @@ -898,10 +893,8 @@ void PrintWebViewHelper::PrintPage(blink::WebLocalFrame* frame,
return; return;
if (g_is_preview_enabled) { if (g_is_preview_enabled) {
@ -256,7 +256,7 @@ index 7fa310f..8946ba9 100644
} else { } else {
#if defined(ENABLE_BASIC_PRINTING) #if defined(ENABLE_BASIC_PRINTING)
Print(frame, blink::WebNode(), true); Print(frame, blink::WebNode(), true);
@@ -936,14 +929,10 @@ bool PrintWebViewHelper::OnMessageReceived(const IPC::Message& message) { @@ -925,14 +918,10 @@ bool PrintWebViewHelper::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(PrintMsg_PrintPages, OnPrintPages) IPC_MESSAGE_HANDLER(PrintMsg_PrintPages, OnPrintPages)
IPC_MESSAGE_HANDLER(PrintMsg_PrintForSystemDialog, OnPrintForSystemDialog) IPC_MESSAGE_HANDLER(PrintMsg_PrintForSystemDialog, OnPrintForSystemDialog)
#endif // defined(ENABLE_BASIC_PRINTING) #endif // defined(ENABLE_BASIC_PRINTING)
@ -271,7 +271,7 @@ index 7fa310f..8946ba9 100644
IPC_MESSAGE_HANDLER(PrintMsg_SetScriptedPrintingBlocked, IPC_MESSAGE_HANDLER(PrintMsg_SetScriptedPrintingBlocked,
SetScriptedPrintBlocked) SetScriptedPrintBlocked)
IPC_MESSAGE_UNHANDLED(handled = false) IPC_MESSAGE_UNHANDLED(handled = false)
@@ -998,7 +987,6 @@ void PrintWebViewHelper::OnPrintForSystemDialog() { @@ -987,7 +976,6 @@ void PrintWebViewHelper::OnPrintForSystemDialog() {
} }
#endif // defined(ENABLE_BASIC_PRINTING) #endif // defined(ENABLE_BASIC_PRINTING)
@ -279,7 +279,7 @@ index 7fa310f..8946ba9 100644
void PrintWebViewHelper::OnPrintForPrintPreview( void PrintWebViewHelper::OnPrintForPrintPreview(
const base::DictionaryValue& job_settings) { const base::DictionaryValue& job_settings) {
CHECK_LE(ipc_nesting_level_, 1); CHECK_LE(ipc_nesting_level_, 1);
@@ -1063,7 +1051,6 @@ void PrintWebViewHelper::OnPrintForPrintPreview( @@ -1052,7 +1040,6 @@ void PrintWebViewHelper::OnPrintForPrintPreview(
DidFinishPrinting(FAIL_PRINT); DidFinishPrinting(FAIL_PRINT);
} }
} }
@ -287,7 +287,7 @@ index 7fa310f..8946ba9 100644
void PrintWebViewHelper::GetPageSizeAndContentAreaFromPageLayout( void PrintWebViewHelper::GetPageSizeAndContentAreaFromPageLayout(
const PageSizeMargins& page_layout_in_points, const PageSizeMargins& page_layout_in_points,
@@ -1088,7 +1075,6 @@ void PrintWebViewHelper::UpdateFrameMarginsCssInfo( @@ -1077,7 +1064,6 @@ void PrintWebViewHelper::UpdateFrameMarginsCssInfo(
ignore_css_margins_ = (margins_type != DEFAULT_MARGINS); ignore_css_margins_ = (margins_type != DEFAULT_MARGINS);
} }
@ -295,7 +295,7 @@ index 7fa310f..8946ba9 100644
void PrintWebViewHelper::OnPrintPreview(const base::DictionaryValue& settings) { void PrintWebViewHelper::OnPrintPreview(const base::DictionaryValue& settings) {
if (ipc_nesting_level_ > 1) if (ipc_nesting_level_ > 1)
return; return;
@@ -1249,7 +1235,7 @@ bool PrintWebViewHelper::CreatePreviewDocument() { @@ -1238,7 +1224,7 @@ bool PrintWebViewHelper::CreatePreviewDocument() {
return true; return true;
} }
@ -304,7 +304,7 @@ index 7fa310f..8946ba9 100644
bool PrintWebViewHelper::RenderPreviewPage( bool PrintWebViewHelper::RenderPreviewPage(
int page_number, int page_number,
const PrintMsg_Print_Params& print_params) { const PrintMsg_Print_Params& print_params) {
@@ -1279,7 +1265,7 @@ bool PrintWebViewHelper::RenderPreviewPage( @@ -1268,7 +1254,7 @@ bool PrintWebViewHelper::RenderPreviewPage(
} }
return PreviewPageRendered(page_number, draft_metafile.get()); return PreviewPageRendered(page_number, draft_metafile.get());
} }
@ -313,7 +313,7 @@ index 7fa310f..8946ba9 100644
bool PrintWebViewHelper::FinalizePrintReadyDocument() { bool PrintWebViewHelper::FinalizePrintReadyDocument() {
DCHECK(!is_print_ready_metafile_sent_); DCHECK(!is_print_ready_metafile_sent_);
@@ -1309,7 +1295,6 @@ bool PrintWebViewHelper::FinalizePrintReadyDocument() { @@ -1298,7 +1284,6 @@ bool PrintWebViewHelper::FinalizePrintReadyDocument() {
Send(new PrintHostMsg_MetafileReadyForPrinting(routing_id(), preview_params)); Send(new PrintHostMsg_MetafileReadyForPrinting(routing_id(), preview_params));
return true; return true;
} }
@ -321,7 +321,7 @@ index 7fa310f..8946ba9 100644
void PrintWebViewHelper::OnPrintingDone(bool success) { void PrintWebViewHelper::OnPrintingDone(bool success) {
if (ipc_nesting_level_ > 1) if (ipc_nesting_level_ > 1)
@@ -1324,7 +1309,6 @@ void PrintWebViewHelper::SetScriptedPrintBlocked(bool blocked) { @@ -1313,7 +1298,6 @@ void PrintWebViewHelper::SetScriptedPrintBlocked(bool blocked) {
is_scripted_printing_blocked_ = blocked; is_scripted_printing_blocked_ = blocked;
} }
@ -329,7 +329,7 @@ index 7fa310f..8946ba9 100644
void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) { void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
if (ipc_nesting_level_ > 1) if (ipc_nesting_level_ > 1)
return; return;
@@ -1335,7 +1319,9 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) { @@ -1324,7 +1308,9 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
// that instead. // that instead.
auto plugin = delegate_->GetPdfElement(frame); auto plugin = delegate_->GetPdfElement(frame);
if (!plugin.isNull()) { if (!plugin.isNull()) {
@ -339,7 +339,7 @@ index 7fa310f..8946ba9 100644
return; return;
} }
print_preview_context_.InitWithFrame(frame); print_preview_context_.InitWithFrame(frame);
@@ -1343,7 +1329,6 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) { @@ -1332,7 +1318,6 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
? PRINT_PREVIEW_USER_INITIATED_SELECTION ? PRINT_PREVIEW_USER_INITIATED_SELECTION
: PRINT_PREVIEW_USER_INITIATED_ENTIRE_FRAME); : PRINT_PREVIEW_USER_INITIATED_ENTIRE_FRAME);
} }
@ -347,7 +347,7 @@ index 7fa310f..8946ba9 100644
bool PrintWebViewHelper::IsPrintingEnabled() { bool PrintWebViewHelper::IsPrintingEnabled() {
bool result = false; bool result = false;
@@ -1369,11 +1354,9 @@ void PrintWebViewHelper::PrintNode(const blink::WebNode& node) { @@ -1358,11 +1343,9 @@ void PrintWebViewHelper::PrintNode(const blink::WebNode& node) {
// Make a copy of the node, in case RenderView::OnContextMenuClosed resets // Make a copy of the node, in case RenderView::OnContextMenuClosed resets
// its |context_menu_node_|. // its |context_menu_node_|.
@ -360,7 +360,7 @@ index 7fa310f..8946ba9 100644
} else { } else {
#if defined(ENABLE_BASIC_PRINTING) #if defined(ENABLE_BASIC_PRINTING)
blink::WebNode duplicate_node(node); blink::WebNode duplicate_node(node);
@@ -1439,7 +1422,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) { @@ -1428,7 +1411,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
} }
break; break;
@ -368,7 +368,7 @@ index 7fa310f..8946ba9 100644
case FAIL_PREVIEW: case FAIL_PREVIEW:
int cookie = int cookie =
print_pages_params_ ? print_pages_params_->params.document_cookie : 0; print_pages_params_ ? print_pages_params_->params.document_cookie : 0;
@@ -1451,7 +1433,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) { @@ -1440,7 +1422,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
} }
print_preview_context_.Failed(notify_browser_of_print_failure_); print_preview_context_.Failed(notify_browser_of_print_failure_);
break; break;
@ -376,7 +376,7 @@ index 7fa310f..8946ba9 100644
} }
prep_frame_view_.reset(); prep_frame_view_.reset();
print_pages_params_.reset(); print_pages_params_.reset();
@@ -1583,7 +1564,6 @@ bool PrintWebViewHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame, @@ -1572,7 +1553,6 @@ bool PrintWebViewHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame,
return true; return true;
} }
@ -384,7 +384,7 @@ index 7fa310f..8946ba9 100644
bool PrintWebViewHelper::SetOptionsFromPdfDocument( bool PrintWebViewHelper::SetOptionsFromPdfDocument(
PrintHostMsg_SetOptionsFromDocument_Params* options) { PrintHostMsg_SetOptionsFromDocument_Params* options) {
blink::WebLocalFrame* source_frame = print_preview_context_.source_frame(); blink::WebLocalFrame* source_frame = print_preview_context_.source_frame();
@@ -1692,7 +1672,6 @@ bool PrintWebViewHelper::UpdatePrintSettings( @@ -1681,7 +1661,6 @@ bool PrintWebViewHelper::UpdatePrintSettings(
return true; return true;
} }
@ -392,7 +392,7 @@ index 7fa310f..8946ba9 100644
#if defined(ENABLE_BASIC_PRINTING) #if defined(ENABLE_BASIC_PRINTING)
bool PrintWebViewHelper::GetPrintSettingsFromUser(blink::WebLocalFrame* frame, bool PrintWebViewHelper::GetPrintSettingsFromUser(blink::WebLocalFrame* frame,
@@ -1801,7 +1780,6 @@ void PrintWebViewHelper::PrintPageInternal( @@ -1790,7 +1769,6 @@ void PrintWebViewHelper::PrintPageInternal(
MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile); MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
@ -400,7 +400,7 @@ index 7fa310f..8946ba9 100644
if (params.params.display_header_footer) { if (params.params.display_header_footer) {
// TODO(thestig): Figure out why Linux needs this. It is almost certainly // TODO(thestig): Figure out why Linux needs this. It is almost certainly
// |printingMinimumShrinkFactor| from Blink. // |printingMinimumShrinkFactor| from Blink.
@@ -1816,7 +1794,6 @@ void PrintWebViewHelper::PrintPageInternal( @@ -1805,7 +1783,6 @@ void PrintWebViewHelper::PrintPageInternal(
scale_factor / fudge_factor, page_layout_in_points, scale_factor / fudge_factor, page_layout_in_points,
params.params); params.params);
} }
@ -408,7 +408,7 @@ index 7fa310f..8946ba9 100644
float webkit_scale_factor = float webkit_scale_factor =
RenderPageContent(frame, params.page_number, canvas_area, content_area, RenderPageContent(frame, params.page_number, canvas_area, content_area,
@@ -1852,7 +1829,6 @@ bool PrintWebViewHelper::CopyMetafileDataToSharedMem( @@ -1841,7 +1818,6 @@ bool PrintWebViewHelper::CopyMetafileDataToSharedMem(
return true; return true;
} }
@ -416,7 +416,7 @@ index 7fa310f..8946ba9 100644
void PrintWebViewHelper::ShowScriptedPrintPreview() { void PrintWebViewHelper::ShowScriptedPrintPreview() {
if (is_scripted_preview_delayed_) { if (is_scripted_preview_delayed_) {
is_scripted_preview_delayed_ = false; is_scripted_preview_delayed_ = false;
@@ -1980,7 +1956,6 @@ bool PrintWebViewHelper::PreviewPageRendered(int page_number, @@ -1969,7 +1945,6 @@ bool PrintWebViewHelper::PreviewPageRendered(int page_number,
Send(new PrintHostMsg_DidPreviewPage(routing_id(), preview_page_params)); Send(new PrintHostMsg_DidPreviewPage(routing_id(), preview_page_params));
return true; return true;
} }

View File

@ -1,13 +1,13 @@
diff --git content/browser/frame_host/render_frame_message_filter.cc content/browser/frame_host/render_frame_message_filter.cc diff --git content/browser/frame_host/render_frame_message_filter.cc content/browser/frame_host/render_frame_message_filter.cc
index 4558e89..6e9a472 100644 index fbe7feb..d05b2cf 100644
--- content/browser/frame_host/render_frame_message_filter.cc --- content/browser/frame_host/render_frame_message_filter.cc
+++ content/browser/frame_host/render_frame_message_filter.cc +++ content/browser/frame_host/render_frame_message_filter.cc
@@ -484,7 +484,7 @@ void RenderFrameMessageFilter::GetPluginsCallback( @@ -490,7 +490,7 @@ void RenderFrameMessageFilter::GetPluginsCallback(
PluginServiceFilter* filter = PluginServiceImpl::GetInstance()->GetFilter(); PluginServiceFilter* filter = PluginServiceImpl::GetInstance()->GetFilter();
std::vector<WebPluginInfo> plugins; std::vector<WebPluginInfo> plugins;
- int child_process_id = -1; - int child_process_id = -1;
+ int child_process_id = render_process_id_; + int child_process_id = render_process_id_;
int routing_id = MSG_ROUTING_NONE; int routing_id = MSG_ROUTING_NONE;
GURL policy_url = // In this loop, copy the WebPluginInfo (and do not use a reference) because
main_frame_origin.unique() ? GURL() : GURL(main_frame_origin.Serialize()); // the filter might mutate it.

View File

@ -1,8 +1,8 @@
diff --git render_view_host_impl.h render_view_host_impl.h diff --git render_view_host_impl.h render_view_host_impl.h
index ca857d5..f3f54fa 100644 index f8cce52..cb56120 100644
--- render_view_host_impl.h --- render_view_host_impl.h
+++ render_view_host_impl.h +++ render_view_host_impl.h
@@ -200,6 +200,7 @@ class CONTENT_EXPORT RenderViewHostImpl : public RenderViewHost, @@ -203,6 +203,7 @@ class CONTENT_EXPORT RenderViewHostImpl : public RenderViewHost,
void set_is_swapped_out(bool is_swapped_out) { void set_is_swapped_out(bool is_swapped_out) {
is_swapped_out_ = is_swapped_out; is_swapped_out_ = is_swapped_out;
} }

View File

@ -1,8 +1,8 @@
diff --git render_widget_host_view_mac.mm render_widget_host_view_mac.mm diff --git render_widget_host_view_mac.mm render_widget_host_view_mac.mm
index 2461641..7dfad416 100644 index be346a8..16683e7 100644
--- render_widget_host_view_mac.mm --- render_widget_host_view_mac.mm
+++ render_widget_host_view_mac.mm +++ render_widget_host_view_mac.mm
@@ -460,9 +460,6 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget, @@ -461,9 +461,6 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget,
// Paint this view host with |background_color_| when there is no content // Paint this view host with |background_color_| when there is no content
// ready to draw. // ready to draw.
background_layer_.reset([[CALayer alloc] init]); background_layer_.reset([[CALayer alloc] init]);

View File

@ -1,5 +1,5 @@
diff --git renderer_preferences_util.cc renderer_preferences_util.cc diff --git renderer_preferences_util.cc renderer_preferences_util.cc
index ad5e301..c64325b 100644 index aa4f1c2..cdf2fd9 100644
--- renderer_preferences_util.cc --- renderer_preferences_util.cc
+++ renderer_preferences_util.cc +++ renderer_preferences_util.cc
@@ -30,7 +30,8 @@ @@ -30,7 +30,8 @@
@ -12,7 +12,7 @@ index ad5e301..c64325b 100644
#include "chrome/browser/themes/theme_service.h" #include "chrome/browser/themes/theme_service.h"
#include "chrome/browser/themes/theme_service_factory.h" #include "chrome/browser/themes/theme_service_factory.h"
#include "ui/views/linux_ui/linux_ui.h" #include "ui/views/linux_ui/linux_ui.h"
@@ -130,7 +131,8 @@ void UpdateFromSystemSettings(content::RendererPreferences* prefs, @@ -132,7 +133,8 @@ void UpdateFromSystemSettings(content::RendererPreferences* prefs,
prefs->caret_blink_interval = interval.InSecondsF(); prefs->caret_blink_interval = interval.InSecondsF();
#endif #endif

View File

@ -1,3 +1,15 @@
diff --git components/browsing_data/content/BUILD.gn components/browsing_data/content/BUILD.gn
index 6229e1b..176f897 100644
--- components/browsing_data/content/BUILD.gn
+++ components/browsing_data/content/BUILD.gn
@@ -15,6 +15,7 @@ static_library("content") {
deps = [
"//base",
"//content/public/browser",
+ "//content/public/common",
"//net",
]
}
diff --git content/browser/appcache/appcache_internals_ui.cc content/browser/appcache/appcache_internals_ui.cc diff --git content/browser/appcache/appcache_internals_ui.cc content/browser/appcache/appcache_internals_ui.cc
index 41f74ae..daca31a7 100644 index 41f74ae..daca31a7 100644
--- content/browser/appcache/appcache_internals_ui.cc --- content/browser/appcache/appcache_internals_ui.cc
@ -42,10 +54,10 @@ index bd02cb1..074e77f 100644
BrowserContext* browser_context); BrowserContext* browser_context);
diff --git content/browser/browser_context.cc content/browser/browser_context.cc diff --git content/browser/browser_context.cc content/browser/browser_context.cc
index 6ca86e7..cf081e4 100644 index 5b7ba41..82d8fb1 100644
--- content/browser/browser_context.cc --- content/browser/browser_context.cc
+++ content/browser/browser_context.cc +++ content/browser/browser_context.cc
@@ -113,7 +113,14 @@ StoragePartition* GetStoragePartitionFromConfig( @@ -115,7 +115,14 @@ StoragePartition* GetStoragePartitionFromConfig(
if (browser_context->IsOffTheRecord()) if (browser_context->IsOffTheRecord())
in_memory = true; in_memory = true;
@ -61,8 +73,8 @@ index 6ca86e7..cf081e4 100644
} }
void SaveSessionStateOnIOThread( void SaveSessionStateOnIOThread(
@@ -486,6 +493,11 @@ MojoShellConnection* BrowserContext::GetMojoShellConnectionFor( @@ -506,6 +513,11 @@ ServiceManagerConnection* BrowserContext::GetServiceManagerConnectionFor(
return connection_holder ? connection_holder->shell_connection() : nullptr; : nullptr;
} }
+// static +// static
@ -74,10 +86,10 @@ index 6ca86e7..cf081e4 100644
CHECK(GetUserData(kMojoWasInitialized)) CHECK(GetUserData(kMojoWasInitialized))
<< "Attempting to destroy a BrowserContext that never called " << "Attempting to destroy a BrowserContext that never called "
diff --git content/browser/devtools/protocol/service_worker_handler.cc content/browser/devtools/protocol/service_worker_handler.cc diff --git content/browser/devtools/protocol/service_worker_handler.cc content/browser/devtools/protocol/service_worker_handler.cc
index a5de8d5..8cd64b3 100644 index c34d15a1..429c0e8 100644
--- content/browser/devtools/protocol/service_worker_handler.cc --- content/browser/devtools/protocol/service_worker_handler.cc
+++ content/browser/devtools/protocol/service_worker_handler.cc +++ content/browser/devtools/protocol/service_worker_handler.cc
@@ -503,10 +503,9 @@ Response ServiceWorkerHandler::DispatchSyncEvent( @@ -384,10 +384,9 @@ Response ServiceWorkerHandler::DispatchSyncEvent(
if (!base::StringToInt64(registration_id, &id)) if (!base::StringToInt64(registration_id, &id))
return CreateInvalidVersionIdErrorResponse(); return CreateInvalidVersionIdErrorResponse();
@ -91,10 +103,10 @@ index a5de8d5..8cd64b3 100644
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
diff --git content/browser/renderer_host/render_process_host_impl.cc content/browser/renderer_host/render_process_host_impl.cc diff --git content/browser/renderer_host/render_process_host_impl.cc content/browser/renderer_host/render_process_host_impl.cc
index 1bab21a4..81156a8 100644 index f952adc..f0ed622 100644
--- content/browser/renderer_host/render_process_host_impl.cc --- content/browser/renderer_host/render_process_host_impl.cc
+++ content/browser/renderer_host/render_process_host_impl.cc +++ content/browser/renderer_host/render_process_host_impl.cc
@@ -664,7 +664,7 @@ void RenderProcessHostImpl::EarlyZygoteLaunch() { @@ -675,7 +675,7 @@ void RenderProcessHostImpl::EarlyZygoteLaunch() {
RenderProcessHostImpl::RenderProcessHostImpl( RenderProcessHostImpl::RenderProcessHostImpl(
BrowserContext* browser_context, BrowserContext* browser_context,
@ -103,7 +115,7 @@ index 1bab21a4..81156a8 100644
bool is_for_guests_only) bool is_for_guests_only)
: fast_shutdown_started_(false), : fast_shutdown_started_(false),
deleting_soon_(false), deleting_soon_(false),
@@ -998,6 +998,22 @@ std::unique_ptr<IPC::ChannelProxy> RenderProcessHostImpl::CreateChannelProxy( @@ -1024,6 +1024,22 @@ std::unique_ptr<IPC::ChannelProxy> RenderProcessHostImpl::CreateChannelProxy() {
void RenderProcessHostImpl::CreateMessageFilters() { void RenderProcessHostImpl::CreateMessageFilters() {
DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK_CURRENTLY_ON(BrowserThread::UI);
@ -126,7 +138,7 @@ index 1bab21a4..81156a8 100644
AddFilter(new ResourceSchedulerFilter(GetID())); AddFilter(new ResourceSchedulerFilter(GetID()));
MediaInternals* media_internals = MediaInternals::GetInstance(); MediaInternals* media_internals = MediaInternals::GetInstance();
// Add BrowserPluginMessageFilter to ensure it gets the first stab at messages // Add BrowserPluginMessageFilter to ensure it gets the first stab at messages
@@ -1012,8 +1028,8 @@ void RenderProcessHostImpl::CreateMessageFilters() { @@ -1038,8 +1054,8 @@ void RenderProcessHostImpl::CreateMessageFilters() {
new RenderMessageFilter( new RenderMessageFilter(
GetID(), GetBrowserContext(), request_context.get(), GetID(), GetBrowserContext(), request_context.get(),
widget_helper_.get(), media_internals, widget_helper_.get(), media_internals,
@ -137,7 +149,7 @@ index 1bab21a4..81156a8 100644
AddFilter(render_message_filter.get()); AddFilter(render_message_filter.get());
render_frame_message_filter_ = new RenderFrameMessageFilter( render_frame_message_filter_ = new RenderFrameMessageFilter(
@@ -1044,9 +1060,9 @@ void RenderProcessHostImpl::CreateMessageFilters() { @@ -1070,9 +1086,9 @@ void RenderProcessHostImpl::CreateMessageFilters() {
resource_message_filter_ = new ResourceMessageFilter( resource_message_filter_ = new ResourceMessageFilter(
GetID(), PROCESS_TYPE_RENDERER, GetID(), PROCESS_TYPE_RENDERER,
@ -149,7 +161,7 @@ index 1bab21a4..81156a8 100644
storage_partition_impl_->GetHostZoomLevelContext(), storage_partition_impl_->GetHostZoomLevelContext(),
get_contexts_callback); get_contexts_callback);
@@ -1071,14 +1087,12 @@ void RenderProcessHostImpl::CreateMessageFilters() { @@ -1097,14 +1113,12 @@ void RenderProcessHostImpl::CreateMessageFilters() {
AddFilter( AddFilter(
new MidiHost(GetID(), BrowserMainLoop::GetInstance()->midi_manager())); new MidiHost(GetID(), BrowserMainLoop::GetInstance()->midi_manager()));
AddFilter(new VideoCaptureHost(media_stream_manager)); AddFilter(new VideoCaptureHost(media_stream_manager));
@ -167,7 +179,7 @@ index 1bab21a4..81156a8 100644
blob_storage_context.get())); blob_storage_context.get()));
#if defined(ENABLE_WEBRTC) #if defined(ENABLE_WEBRTC)
@@ -1130,14 +1144,13 @@ void RenderProcessHostImpl::CreateMessageFilters() { @@ -1150,14 +1164,13 @@ void RenderProcessHostImpl::CreateMessageFilters() {
scoped_refptr<CacheStorageDispatcherHost> cache_storage_filter = scoped_refptr<CacheStorageDispatcherHost> cache_storage_filter =
new CacheStorageDispatcherHost(); new CacheStorageDispatcherHost();
@ -184,7 +196,7 @@ index 1bab21a4..81156a8 100644
AddFilter(service_worker_filter.get()); AddFilter(service_worker_filter.get());
AddFilter(new SharedWorkerMessageFilter( AddFilter(new SharedWorkerMessageFilter(
@@ -1145,12 +1158,12 @@ void RenderProcessHostImpl::CreateMessageFilters() { @@ -1165,12 +1178,12 @@ void RenderProcessHostImpl::CreateMessageFilters() {
WorkerStoragePartition( WorkerStoragePartition(
storage_partition_impl_->GetURLRequestContext(), storage_partition_impl_->GetURLRequestContext(),
storage_partition_impl_->GetMediaURLRequestContext(), storage_partition_impl_->GetMediaURLRequestContext(),
@ -200,7 +212,7 @@ index 1bab21a4..81156a8 100644
message_port_message_filter_.get())); message_port_message_filter_.get()));
#if defined(ENABLE_WEBRTC) #if defined(ENABLE_WEBRTC)
@@ -1165,11 +1178,8 @@ void RenderProcessHostImpl::CreateMessageFilters() { @@ -1185,11 +1198,8 @@ void RenderProcessHostImpl::CreateMessageFilters() {
GetID(), storage_partition_impl_->GetQuotaManager(), GetID(), storage_partition_impl_->GetQuotaManager(),
GetContentClient()->browser()->CreateQuotaPermissionContext())); GetContentClient()->browser()->CreateQuotaPermissionContext()));
@ -213,7 +225,7 @@ index 1bab21a4..81156a8 100644
resource_context, service_worker_context, browser_context); resource_context, service_worker_context, browser_context);
AddFilter(notification_message_filter_.get()); AddFilter(notification_message_filter_.get());
@@ -1178,7 +1188,7 @@ void RenderProcessHostImpl::CreateMessageFilters() { @@ -1198,7 +1208,7 @@ void RenderProcessHostImpl::CreateMessageFilters() {
AddFilter(new HistogramMessageFilter()); AddFilter(new HistogramMessageFilter());
AddFilter(new MemoryMessageFilter(this)); AddFilter(new MemoryMessageFilter(this));
AddFilter(new PushMessagingMessageFilter( AddFilter(new PushMessagingMessageFilter(
@ -222,19 +234,19 @@ index 1bab21a4..81156a8 100644
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
AddFilter(new ScreenOrientationMessageFilterAndroid()); AddFilter(new ScreenOrientationMessageFilterAndroid());
#endif #endif
@@ -1187,6 +1197,11 @@ void RenderProcessHostImpl::CreateMessageFilters() { @@ -1208,6 +1218,11 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
void RenderProcessHostImpl::RegisterMojoInterfaces() {
std::unique_ptr<shell::InterfaceRegistry> registry( std::unique_ptr<shell::InterfaceRegistry> registry(
new shell::InterfaceRegistry); new shell::InterfaceRegistry);
+ // Cast to the derived type from StoragePartitionImpl. + // Cast to the derived type from StoragePartitionImpl.
+ auto platform_notification_context = + auto platform_notification_context =
+ static_cast<PlatformNotificationContextImpl*>( + static_cast<PlatformNotificationContextImpl*>(
+ storage_partition_impl_->GetPlatformNotificationContext()); + storage_partition_impl_->GetPlatformNotificationContext());
+ +
#if defined(OS_ANDROID) channel_->AddAssociatedInterface(
interface_registry_android_ = base::Bind(&RenderProcessHostImpl::OnRouteProviderRequest,
InterfaceRegistryAndroid::Create(registry.get()); base::Unretained(this)));
@@ -1220,8 +1235,7 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { @@ -1239,8 +1254,7 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
AddUIThreadInterface( AddUIThreadInterface(
registry.get(), registry.get(),
base::Bind(&PlatformNotificationContextImpl::CreateService, base::Bind(&PlatformNotificationContextImpl::CreateService,
@ -245,10 +257,10 @@ index 1bab21a4..81156a8 100644
AddUIThreadInterface( AddUIThreadInterface(
registry.get(), registry.get(),
diff --git content/browser/renderer_host/render_process_host_impl.h content/browser/renderer_host/render_process_host_impl.h diff --git content/browser/renderer_host/render_process_host_impl.h content/browser/renderer_host/render_process_host_impl.h
index f9e74e7..a49359f 100644 index f07c487e..aae8a3e 100644
--- content/browser/renderer_host/render_process_host_impl.h --- content/browser/renderer_host/render_process_host_impl.h
+++ content/browser/renderer_host/render_process_host_impl.h +++ content/browser/renderer_host/render_process_host_impl.h
@@ -78,7 +78,6 @@ class RenderWidgetHostImpl; @@ -73,7 +73,6 @@ class RenderWidgetHostImpl;
class RenderWidgetHostViewFrameSubscriber; class RenderWidgetHostViewFrameSubscriber;
class ResourceMessageFilter; class ResourceMessageFilter;
class StoragePartition; class StoragePartition;
@ -256,7 +268,7 @@ index f9e74e7..a49359f 100644
namespace mojom { namespace mojom {
class StoragePartitionService; class StoragePartitionService;
@@ -114,7 +113,7 @@ class CONTENT_EXPORT RenderProcessHostImpl @@ -109,7 +108,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
public NON_EXPORTED_BASE(mojom::AssociatedInterfaceProvider) { public NON_EXPORTED_BASE(mojom::AssociatedInterfaceProvider) {
public: public:
RenderProcessHostImpl(BrowserContext* browser_context, RenderProcessHostImpl(BrowserContext* browser_context,
@ -265,7 +277,7 @@ index f9e74e7..a49359f 100644
bool is_for_guests_only); bool is_for_guests_only);
~RenderProcessHostImpl() override; ~RenderProcessHostImpl() override;
@@ -498,7 +497,7 @@ class CONTENT_EXPORT RenderProcessHostImpl @@ -484,7 +483,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
BrowserContext* browser_context_; BrowserContext* browser_context_;
// Owned by |browser_context_|. // Owned by |browser_context_|.
@ -355,11 +367,11 @@ index 075ae3e..57fb5fd 100644
void InitializeOnIOThread(); void InitializeOnIOThread();
diff --git content/public/browser/browser_context.h content/public/browser/browser_context.h diff --git content/public/browser/browser_context.h content/public/browser/browser_context.h
index 15be1d2..70a2816 100644 index aaa5e23..2309a2a 100644
--- content/public/browser/browser_context.h --- content/public/browser/browser_context.h
+++ content/public/browser/browser_context.h +++ content/public/browser/browser_context.h
@@ -170,6 +170,8 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData { @@ -170,6 +170,8 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
static MojoShellConnection* GetMojoShellConnectionFor( static ServiceManagerConnection* GetServiceManagerConnectionFor(
BrowserContext* browser_context); BrowserContext* browser_context);
+ static const void* GetStoragePartitionMapUserDataKey(); + static const void* GetStoragePartitionMapUserDataKey();
@ -440,10 +452,10 @@ index 9b26c41..e9f4a0c 100644
"web_ui_url_fetcher.cc", "web_ui_url_fetcher.cc",
"web_ui_url_fetcher.h", "web_ui_url_fetcher.h",
diff --git extensions/common/api/BUILD.gn extensions/common/api/BUILD.gn diff --git extensions/common/api/BUILD.gn extensions/common/api/BUILD.gn
index 0276c57..ca1d6f6 100644 index 010da6d..a13ba7a 100644
--- extensions/common/api/BUILD.gn --- extensions/common/api/BUILD.gn
+++ extensions/common/api/BUILD.gn +++ extensions/common/api/BUILD.gn
@@ -98,6 +98,7 @@ group("api") { @@ -99,6 +99,7 @@ group("api") {
public_deps = [ public_deps = [
":generated_api", ":generated_api",
":mojom", ":mojom",

View File

@ -56,7 +56,7 @@ index 696a941..ce5abcd 100644
// The time is used for simulating menu behavior for the menu button; that // The time is used for simulating menu behavior for the menu button; that
// is, if the menu is shown and the button is pressed, we need to close the // is, if the menu is shown and the button is pressed, we need to close the
diff --git view.h view.h diff --git view.h view.h
index 55cc02b..c402f55 100644 index 28171db..747930c 100644
--- view.h --- view.h
+++ view.h +++ view.h
@@ -18,6 +18,7 @@ @@ -18,6 +18,7 @@
@ -67,7 +67,7 @@ index 55cc02b..c402f55 100644
#include "build/build_config.h" #include "build/build_config.h"
#include "ui/accessibility/ax_enums.h" #include "ui/accessibility/ax_enums.h"
#include "ui/base/accelerators/accelerator.h" #include "ui/base/accelerators/accelerator.h"
@@ -112,7 +113,8 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, @@ -113,7 +114,8 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
public ui::LayerOwner, public ui::LayerOwner,
public ui::AcceleratorTarget, public ui::AcceleratorTarget,
public ui::EventTarget, public ui::EventTarget,

View File

@ -1,8 +1,8 @@
diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc
index 72004fe..ff7ba8c7 100644 index 852e71f..b765a5b 100644
--- content/browser/renderer_host/render_widget_host_view_aura.cc --- content/browser/renderer_host/render_widget_host_view_aura.cc
+++ content/browser/renderer_host/render_widget_host_view_aura.cc +++ content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -747,6 +747,13 @@ void RenderWidgetHostViewAura::SetKeyboardFocus() { @@ -769,6 +769,13 @@ void RenderWidgetHostViewAura::SetKeyboardFocus() {
} }
} }
#endif #endif
@ -17,7 +17,7 @@ index 72004fe..ff7ba8c7 100644
if (host_ && set_focus_on_mouse_down_or_key_event_) { if (host_ && set_focus_on_mouse_down_or_key_event_) {
set_focus_on_mouse_down_or_key_event_ = false; set_focus_on_mouse_down_or_key_event_ = false;
diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc
index a8e8627..2ec202f 100644 index 292087d..8d6da47 100644
--- content/browser/renderer_host/render_widget_host_view_base.cc --- content/browser/renderer_host/render_widget_host_view_base.cc
+++ content/browser/renderer_host/render_widget_host_view_base.cc +++ content/browser/renderer_host/render_widget_host_view_base.cc
@@ -44,6 +44,7 @@ RenderWidgetHostViewBase::RenderWidgetHostViewBase() @@ -44,6 +44,7 @@ RenderWidgetHostViewBase::RenderWidgetHostViewBase()
@ -40,7 +40,7 @@ index a8e8627..2ec202f 100644
return renderer_frame_number_; return renderer_frame_number_;
} }
diff --git content/browser/renderer_host/render_widget_host_view_base.h content/browser/renderer_host/render_widget_host_view_base.h diff --git content/browser/renderer_host/render_widget_host_view_base.h content/browser/renderer_host/render_widget_host_view_base.h
index b68718d..5b209ca 100644 index 5e25a02..b81350b 100644
--- content/browser/renderer_host/render_widget_host_view_base.h --- content/browser/renderer_host/render_widget_host_view_base.h
+++ content/browser/renderer_host/render_widget_host_view_base.h +++ content/browser/renderer_host/render_widget_host_view_base.h
@@ -107,6 +107,7 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView, @@ -107,6 +107,7 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
@ -51,7 +51,7 @@ index b68718d..5b209ca 100644
// This only needs to be overridden by RenderWidgetHostViewBase subclasses // This only needs to be overridden by RenderWidgetHostViewBase subclasses
// that handle content embedded within other RenderWidgetHostViews. // that handle content embedded within other RenderWidgetHostViews.
@@ -468,6 +469,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView, @@ -477,6 +478,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
// destroyed before the RWHV is destroyed. // destroyed before the RWHV is destroyed.
TextInputManager* text_input_manager_; TextInputManager* text_input_manager_;
@ -169,10 +169,10 @@ index 884df90..518a69c 100644
// a reference. // a reference.
corewm::TooltipWin* tooltip_; corewm::TooltipWin* tooltip_;
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
index 38a416b..6343597 100644 index 816faa3..4c2d702 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc --- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
@@ -194,6 +194,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11( @@ -195,6 +195,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
use_native_frame_(false), use_native_frame_(false),
should_maximize_after_map_(false), should_maximize_after_map_(false),
use_argb_visual_(false), use_argb_visual_(false),
@ -180,17 +180,15 @@ index 38a416b..6343597 100644
drag_drop_client_(NULL), drag_drop_client_(NULL),
native_widget_delegate_(native_widget_delegate), native_widget_delegate_(native_widget_delegate),
desktop_native_widget_aura_(desktop_native_widget_aura), desktop_native_widget_aura_(desktop_native_widget_aura),
@@ -206,7 +207,8 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11( @@ -208,6 +209,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
has_pointer_(false),
has_window_focus_(false), has_window_focus_(false),
has_pointer_focus_(false), has_pointer_focus_(false),
- close_widget_factory_(this) {} modal_dialog_xid_(0),
+ close_widget_factory_(this), + xwindow_destroyed_(false),
+ xwindow_destroyed_(false) {} close_widget_factory_(this),
weak_factory_(this) {}
DesktopWindowTreeHostX11::~DesktopWindowTreeHostX11() { @@ -545,7 +547,8 @@ void DesktopWindowTreeHostX11::CloseNow() {
window()->ClearProperty(kHostForRootWindow);
@@ -542,7 +544,8 @@ void DesktopWindowTreeHostX11::CloseNow() {
// Actually free our native resources. // Actually free our native resources.
if (ui::PlatformEventSource::GetInstance()) if (ui::PlatformEventSource::GetInstance())
ui::PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this); ui::PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this);
@ -200,7 +198,7 @@ index 38a416b..6343597 100644
xwindow_ = None; xwindow_ = None;
desktop_native_widget_aura_->OnHostClosed(); desktop_native_widget_aura_->OnHostClosed();
@@ -683,6 +686,8 @@ void DesktopWindowTreeHostX11::GetWindowPlacement( @@ -686,6 +689,8 @@ void DesktopWindowTreeHostX11::GetWindowPlacement(
} }
gfx::Rect DesktopWindowTreeHostX11::GetWindowBoundsInScreen() const { gfx::Rect DesktopWindowTreeHostX11::GetWindowBoundsInScreen() const {
@ -209,7 +207,7 @@ index 38a416b..6343597 100644
return ToDIPRect(bounds_in_pixels_); return ToDIPRect(bounds_in_pixels_);
} }
@@ -1205,6 +1210,8 @@ void DesktopWindowTreeHostX11::HideImpl() { @@ -1208,6 +1213,8 @@ void DesktopWindowTreeHostX11::HideImpl() {
} }
gfx::Rect DesktopWindowTreeHostX11::GetBounds() const { gfx::Rect DesktopWindowTreeHostX11::GetBounds() const {
@ -218,7 +216,7 @@ index 38a416b..6343597 100644
return bounds_in_pixels_; return bounds_in_pixels_;
} }
@@ -1264,6 +1271,8 @@ void DesktopWindowTreeHostX11::SetBounds( @@ -1267,6 +1274,8 @@ void DesktopWindowTreeHostX11::SetBounds(
} }
gfx::Point DesktopWindowTreeHostX11::GetLocationOnNativeScreen() const { gfx::Point DesktopWindowTreeHostX11::GetLocationOnNativeScreen() const {
@ -227,9 +225,9 @@ index 38a416b..6343597 100644
return bounds_in_pixels_.origin(); return bounds_in_pixels_.origin();
} }
@@ -1382,9 +1391,15 @@ void DesktopWindowTreeHostX11::InitX11Window( @@ -1390,9 +1399,15 @@ void DesktopWindowTreeHostX11::InitX11Window(
None; attribute_mask |= CWBorderPixel;
} swa.border_pixel = 0;
+ gfx::AcceleratedWidget parent_widget = params.parent_widget; + gfx::AcceleratedWidget parent_widget = params.parent_widget;
+ if (parent_widget == gfx::kNullAcceleratedWidget) + if (parent_widget == gfx::kNullAcceleratedWidget)
@ -244,7 +242,7 @@ index 38a416b..6343597 100644
bounds_in_pixels_.y(), bounds_in_pixels_.width(), bounds_in_pixels_.y(), bounds_in_pixels_.width(),
bounds_in_pixels_.height(), bounds_in_pixels_.height(),
0, // border width 0, // border width
@@ -2013,6 +2028,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent( @@ -2022,6 +2037,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
} }
break; break;
} }
@ -256,12 +254,12 @@ index 38a416b..6343597 100644
case FocusOut: case FocusOut:
OnFocusEvent(xev->type == FocusIn, event->xfocus.mode, OnFocusEvent(xev->type == FocusIn, event->xfocus.mode,
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
index 07e35ca..7746296 100644 index a4b68b3..bb82659 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h --- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h +++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
@@ -83,6 +83,12 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 @@ -91,6 +91,12 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
// internal list of open windows. // there is no dialog on the host window.
static void CleanUpWindowList(void (*func)(aura::Window* window)); XID GetModalDialog();
+ void set_screen_bounds(const gfx::Rect& bounds) { screen_bounds_ = bounds; } + void set_screen_bounds(const gfx::Rect& bounds) { screen_bounds_ = bounds; }
+ +
@ -272,7 +270,7 @@ index 07e35ca..7746296 100644
protected: protected:
// Overridden from DesktopWindowTreeHost: // Overridden from DesktopWindowTreeHost:
void Init(aura::Window* content_window, void Init(aura::Window* content_window,
@@ -290,6 +296,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 @@ -301,6 +307,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
// The bounds of |xwindow_|. // The bounds of |xwindow_|.
gfx::Rect bounds_in_pixels_; gfx::Rect bounds_in_pixels_;
@ -282,7 +280,7 @@ index 07e35ca..7746296 100644
// Whenever the bounds are set, we keep the previous set of bounds around so // Whenever the bounds are set, we keep the previous set of bounds around so
// we can have a better chance of getting the real // we can have a better chance of getting the real
// |restored_bounds_in_pixels_|. Window managers tend to send a Configure // |restored_bounds_in_pixels_|. Window managers tend to send a Configure
@@ -329,6 +338,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 @@ -340,6 +349,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
// Whether we used an ARGB visual for our window. // Whether we used an ARGB visual for our window.
bool use_argb_visual_; bool use_argb_visual_;
@ -293,18 +291,18 @@ index 07e35ca..7746296 100644
DesktopDragDropClientAuraX11* drag_drop_client_; DesktopDragDropClientAuraX11* drag_drop_client_;
std::unique_ptr<ui::EventHandler> x11_non_client_event_filter_; std::unique_ptr<ui::EventHandler> x11_non_client_event_filter_;
@@ -414,6 +427,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 @@ -427,6 +440,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_; XID modal_dialog_xid_;
+ // True if the xwindow has already been destroyed. + // True if the xwindow has already been destroyed.
+ bool xwindow_destroyed_; + bool xwindow_destroyed_;
+ +
DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostX11); base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_;
}; base::WeakPtrFactory<DesktopWindowTreeHostX11> weak_factory_;
diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc
index 4b3db3f..103bba3 100644 index 68e6acd..07eb1fc 100644
--- ui/views/widget/widget.cc --- ui/views/widget/widget.cc
+++ ui/views/widget/widget.cc +++ ui/views/widget/widget.cc
@@ -126,9 +126,11 @@ Widget::InitParams::InitParams(Type type) @@ -126,9 +126,11 @@ Widget::InitParams::InitParams(Type type)
@ -352,7 +350,7 @@ index 4b3db3f..103bba3 100644
// This must come after SetContentsView() or it might not be able to find // This must come after SetContentsView() or it might not be able to find
// the correct NativeTheme (on Linux). See http://crbug.com/384492 // the correct NativeTheme (on Linux). See http://crbug.com/384492
diff --git ui/views/widget/widget.h ui/views/widget/widget.h diff --git ui/views/widget/widget.h ui/views/widget/widget.h
index a92dbce..db28032 100644 index 1e62c09..551518e 100644
--- ui/views/widget/widget.h --- ui/views/widget/widget.h
+++ ui/views/widget/widget.h +++ ui/views/widget/widget.h
@@ -234,12 +234,17 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, @@ -234,12 +234,17 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
@ -373,7 +371,7 @@ index a92dbce..db28032 100644
// Used only by mus and is necessitated by mus not being a NativeView. // Used only by mus and is necessitated by mus not being a NativeView.
ui::Window* parent_mus = nullptr; ui::Window* parent_mus = nullptr;
// Specifies the initial bounds of the Widget. Default is empty, which means // Specifies the initial bounds of the Widget. Default is empty, which means
@@ -756,6 +761,10 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, @@ -753,6 +758,10 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
bool movement_disabled() const { return movement_disabled_; } bool movement_disabled() const { return movement_disabled_; }
void set_movement_disabled(bool disabled) { movement_disabled_ = disabled; } void set_movement_disabled(bool disabled) { movement_disabled_ = disabled; }
@ -384,7 +382,7 @@ index a92dbce..db28032 100644
// Returns the work area bounds of the screen the Widget belongs to. // Returns the work area bounds of the screen the Widget belongs to.
gfx::Rect GetWorkAreaBoundsInScreen() const; gfx::Rect GetWorkAreaBoundsInScreen() const;
@@ -974,6 +983,10 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, @@ -971,6 +980,10 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
// disabled. // disabled.
bool movement_disabled_; bool movement_disabled_;
@ -412,10 +410,10 @@ index b843416..8b81a51 100644
} }
case Widget::InitParams::TYPE_CONTROL: case Widget::InitParams::TYPE_CONTROL:
diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc
index ec631af..2d55a51 100644 index 020d0a1..4a613f7 100644
--- ui/views/win/hwnd_message_handler.cc --- ui/views/win/hwnd_message_handler.cc
+++ ui/views/win/hwnd_message_handler.cc +++ ui/views/win/hwnd_message_handler.cc
@@ -851,6 +851,8 @@ void HWNDMessageHandler::SizeConstraintsChanged() { @@ -850,6 +850,8 @@ void HWNDMessageHandler::SizeConstraintsChanged() {
} else { } else {
style &= ~WS_MINIMIZEBOX; style &= ~WS_MINIMIZEBOX;
} }
@ -424,7 +422,7 @@ index ec631af..2d55a51 100644
SetWindowLong(hwnd(), GWL_STYLE, style); SetWindowLong(hwnd(), GWL_STYLE, style);
} }
@@ -2469,8 +2471,12 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, @@ -2472,8 +2474,12 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
active_mouse_tracking_flags_ = 0; active_mouse_tracking_flags_ = 0;
} else if (event.type() == ui::ET_MOUSEWHEEL) { } else if (event.type() == ui::ET_MOUSEWHEEL) {
// Reroute the mouse wheel to the window under the pointer if applicable. // Reroute the mouse wheel to the window under the pointer if applicable.
@ -440,10 +438,10 @@ index ec631af..2d55a51 100644
// There are cases where the code handling the message destroys the window, // There are cases where the code handling the message destroys the window,
diff --git ui/views/win/hwnd_message_handler_delegate.h ui/views/win/hwnd_message_handler_delegate.h diff --git ui/views/win/hwnd_message_handler_delegate.h ui/views/win/hwnd_message_handler_delegate.h
index ddf26d2..79e5db2 100644 index 14021805..c4843c8 100644
--- ui/views/win/hwnd_message_handler_delegate.h --- ui/views/win/hwnd_message_handler_delegate.h
+++ ui/views/win/hwnd_message_handler_delegate.h +++ ui/views/win/hwnd_message_handler_delegate.h
@@ -57,6 +57,10 @@ class VIEWS_EXPORT HWNDMessageHandlerDelegate { @@ -59,6 +59,10 @@ class VIEWS_EXPORT HWNDMessageHandlerDelegate {
virtual bool CanMinimize() const = 0; virtual bool CanMinimize() const = 0;
virtual bool CanActivate() const = 0; virtual bool CanActivate() const = 0;

View File

@ -29,10 +29,10 @@ index e639319..5f75a9a 100644
void EnterFullscreenModeForTab(content::WebContents* contents, void EnterFullscreenModeForTab(content::WebContents* contents,
const GURL& origin) final; const GURL& origin) final;
diff --git chrome/browser/prerender/prerender_contents.cc chrome/browser/prerender/prerender_contents.cc diff --git chrome/browser/prerender/prerender_contents.cc chrome/browser/prerender/prerender_contents.cc
index 5e4b3add..7a21502 100644 index 4ded1cb..ce3306b 100644
--- chrome/browser/prerender/prerender_contents.cc --- chrome/browser/prerender/prerender_contents.cc
+++ chrome/browser/prerender/prerender_contents.cc +++ chrome/browser/prerender/prerender_contents.cc
@@ -131,7 +131,9 @@ class PrerenderContents::WebContentsDelegateImpl @@ -141,7 +141,9 @@ class PrerenderContents::WebContentsDelegateImpl
const std::string& frame_name, const std::string& frame_name,
const GURL& target_url, const GURL& target_url,
const std::string& partition_id, const std::string& partition_id,
@ -44,10 +44,10 @@ index 5e4b3add..7a21502 100644
// window.opener property, terminate prerendering. // window.opener property, terminate prerendering.
prerender_contents_->Destroy(FINAL_STATUS_CREATE_NEW_WINDOW); prerender_contents_->Destroy(FINAL_STATUS_CREATE_NEW_WINDOW);
diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc
index b9b1da9..dde8843 100644 index 869fbec..7ca4f52 100644
--- chrome/browser/ui/browser.cc --- chrome/browser/ui/browser.cc
+++ chrome/browser/ui/browser.cc +++ chrome/browser/ui/browser.cc
@@ -1580,7 +1580,9 @@ bool Browser::ShouldCreateWebContents( @@ -1588,7 +1588,9 @@ bool Browser::ShouldCreateWebContents(
const std::string& frame_name, const std::string& frame_name,
const GURL& target_url, const GURL& target_url,
const std::string& partition_id, const std::string& partition_id,
@ -59,10 +59,10 @@ index b9b1da9..dde8843 100644
// If a BackgroundContents is created, suppress the normal WebContents. // If a BackgroundContents is created, suppress the normal WebContents.
return !MaybeCreateBackgroundContents( return !MaybeCreateBackgroundContents(
diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h
index dae2e25..b32308c 100644 index 5410f5a..a6aaef1 100644
--- chrome/browser/ui/browser.h --- chrome/browser/ui/browser.h
+++ chrome/browser/ui/browser.h +++ chrome/browser/ui/browser.h
@@ -613,7 +613,9 @@ class Browser : public TabStripModelObserver, @@ -619,7 +619,9 @@ class Browser : public TabStripModelObserver,
const std::string& frame_name, const std::string& frame_name,
const GURL& target_url, const GURL& target_url,
const std::string& partition_id, const std::string& partition_id,
@ -71,14 +71,14 @@ index dae2e25..b32308c 100644
+ content::WebContentsView** view, + content::WebContentsView** view,
+ content::RenderViewHostDelegateView** delegate_view) override; + content::RenderViewHostDelegateView** delegate_view) override;
void WebContentsCreated(content::WebContents* source_contents, void WebContentsCreated(content::WebContents* source_contents,
int opener_render_process_id,
int opener_render_frame_id, int opener_render_frame_id,
const std::string& frame_name,
diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc
index be05e4a4c..58d5f4a 100644 index d7a0cbb..7883136 100644
--- content/browser/web_contents/web_contents_impl.cc --- content/browser/web_contents/web_contents_impl.cc
+++ content/browser/web_contents/web_contents_impl.cc +++ content/browser/web_contents/web_contents_impl.cc
@@ -1557,6 +1557,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { @@ -1577,6 +1577,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
std::string unique_name = params.main_frame_name; std::string unique_name;
frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name); frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
+ if (params.view && params.delegate_view) { + if (params.view && params.delegate_view) {
@ -90,7 +90,7 @@ index be05e4a4c..58d5f4a 100644
WebContentsViewDelegate* delegate = WebContentsViewDelegate* delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this); GetContentClient()->browser()->GetWebContentsViewDelegate(this);
@@ -1589,6 +1595,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { @@ -1607,6 +1613,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
std::move(view_), std::move(view_),
&render_view_host_delegate_view_)); &render_view_host_delegate_view_));
} }
@ -98,7 +98,7 @@ index be05e4a4c..58d5f4a 100644
CHECK(render_view_host_delegate_view_); CHECK(render_view_host_delegate_view_);
CHECK(view_.get()); CHECK(view_.get());
@@ -2042,11 +2049,14 @@ void WebContentsImpl::CreateNewWindow( @@ -2060,11 +2067,14 @@ void WebContentsImpl::CreateNewWindow(
static_cast<SessionStorageNamespaceImpl*>(session_storage_namespace); static_cast<SessionStorageNamespaceImpl*>(session_storage_namespace);
CHECK(session_storage_namespace_impl->IsFromContext(dom_storage_context)); CHECK(session_storage_namespace_impl->IsFromContext(dom_storage_context));
@ -114,7 +114,7 @@ index be05e4a4c..58d5f4a 100644
if (route_id != MSG_ROUTING_NONE && if (route_id != MSG_ROUTING_NONE &&
!RenderViewHost::FromID(render_process_id, route_id)) { !RenderViewHost::FromID(render_process_id, route_id)) {
// If the embedder didn't create a WebContents for this route, we need to // If the embedder didn't create a WebContents for this route, we need to
@@ -2070,6 +2080,8 @@ void WebContentsImpl::CreateNewWindow( @@ -2088,6 +2098,8 @@ void WebContentsImpl::CreateNewWindow(
create_params.opener_render_process_id = render_process_id; create_params.opener_render_process_id = render_process_id;
create_params.opener_render_frame_id = params.opener_render_frame_id; create_params.opener_render_frame_id = params.opener_render_frame_id;
create_params.opener_suppressed = params.opener_suppressed; create_params.opener_suppressed = params.opener_suppressed;
@ -139,10 +139,10 @@ index fa0afb5..d677b31 100644
WebContents::CreateParams::CreateParams(const CreateParams& other) = default; WebContents::CreateParams::CreateParams(const CreateParams& other) = default;
diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h
index 163a2ad..63e116e 100644 index 8c66b2a..ed523c7 100644
--- content/public/browser/web_contents.h --- content/public/browser/web_contents.h
+++ content/public/browser/web_contents.h +++ content/public/browser/web_contents.h
@@ -55,8 +55,10 @@ class PageState; @@ -59,8 +59,10 @@ class PageState;
class RenderFrameHost; class RenderFrameHost;
class RenderProcessHost; class RenderProcessHost;
class RenderViewHost; class RenderViewHost;
@ -153,7 +153,7 @@ index 163a2ad..63e116e 100644
struct CustomContextMenuContext; struct CustomContextMenuContext;
struct DropData; struct DropData;
struct Manifest; struct Manifest;
@@ -157,6 +159,10 @@ class WebContents : public PageNavigator, @@ -161,6 +163,10 @@ class WebContents : public PageNavigator,
// Note that the pre-created renderer process may not be used if the first // Note that the pre-created renderer process may not be used if the first
// navigation requires a dedicated or privileged process, such as a WebUI. // navigation requires a dedicated or privileged process, such as a WebUI.
bool initialize_renderer; bool initialize_renderer;
@ -165,10 +165,10 @@ index 163a2ad..63e116e 100644
// Creates a new WebContents. // Creates a new WebContents.
diff --git content/public/browser/web_contents_delegate.cc content/public/browser/web_contents_delegate.cc diff --git content/public/browser/web_contents_delegate.cc content/public/browser/web_contents_delegate.cc
index 399255a..cde5fd3 100644 index d107135..2d290e1 100644
--- content/public/browser/web_contents_delegate.cc --- content/public/browser/web_contents_delegate.cc
+++ content/public/browser/web_contents_delegate.cc +++ content/public/browser/web_contents_delegate.cc
@@ -147,7 +147,9 @@ bool WebContentsDelegate::ShouldCreateWebContents( @@ -148,7 +148,9 @@ bool WebContentsDelegate::ShouldCreateWebContents(
const std::string& frame_name, const std::string& frame_name,
const GURL& target_url, const GURL& target_url,
const std::string& partition_id, const std::string& partition_id,
@ -180,10 +180,10 @@ index 399255a..cde5fd3 100644
} }
diff --git content/public/browser/web_contents_delegate.h content/public/browser/web_contents_delegate.h diff --git content/public/browser/web_contents_delegate.h content/public/browser/web_contents_delegate.h
index b7d17d2..c5b66e0 100644 index 62ef1de..824b0e1 100644
--- content/public/browser/web_contents_delegate.h --- content/public/browser/web_contents_delegate.h
+++ content/public/browser/web_contents_delegate.h +++ content/public/browser/web_contents_delegate.h
@@ -41,9 +41,11 @@ class JavaScriptDialogManager; @@ -45,9 +45,11 @@ class JavaScriptDialogManager;
class PageState; class PageState;
class RenderFrameHost; class RenderFrameHost;
class RenderViewHost; class RenderViewHost;
@ -195,7 +195,7 @@ index b7d17d2..c5b66e0 100644
struct ColorSuggestion; struct ColorSuggestion;
struct ContextMenuParams; struct ContextMenuParams;
struct DropData; struct DropData;
@@ -310,7 +312,9 @@ class CONTENT_EXPORT WebContentsDelegate { @@ -314,7 +316,9 @@ class CONTENT_EXPORT WebContentsDelegate {
const std::string& frame_name, const std::string& frame_name,
const GURL& target_url, const GURL& target_url,
const std::string& partition_id, const std::string& partition_id,

View File

@ -1,76 +1,75 @@
diff --git Source/web/ChromeClientImpl.cpp Source/web/ChromeClientImpl.cpp diff --git Source/web/ChromeClientImpl.cpp Source/web/ChromeClientImpl.cpp
index f081d46..eaedd72 100644 index f1a79c4..021a083 100644
--- Source/web/ChromeClientImpl.cpp --- Source/web/ChromeClientImpl.cpp
+++ Source/web/ChromeClientImpl.cpp +++ Source/web/ChromeClientImpl.cpp
@@ -869,7 +869,7 @@ bool ChromeClientImpl::hasOpenedPopup() const @@ -892,7 +892,7 @@ bool ChromeClientImpl::hasOpenedPopup() const {
PopupMenu* ChromeClientImpl::openPopupMenu(LocalFrame& frame, HTMLSelectElement& select) PopupMenu* ChromeClientImpl::openPopupMenu(LocalFrame& frame,
{ HTMLSelectElement& select) {
notifyPopupOpeningObservers(); notifyPopupOpeningObservers();
- if (WebViewImpl::useExternalPopupMenus()) - if (WebViewImpl::useExternalPopupMenus())
+ if (m_webView->useExternalPopupMenus()) + if (m_webView->useExternalPopupMenus())
return new ExternalPopupMenu(frame, select, *m_webView); return new ExternalPopupMenu(frame, select, *m_webView);
DCHECK(RuntimeEnabledFeatures::pagePopupEnabled()); DCHECK(RuntimeEnabledFeatures::pagePopupEnabled());
diff --git Source/web/WebViewImpl.cpp Source/web/WebViewImpl.cpp diff --git Source/web/WebViewImpl.cpp Source/web/WebViewImpl.cpp
index 5b4dacf..aec9256 100644 index 966246f..a528578 100644
--- Source/web/WebViewImpl.cpp --- Source/web/WebViewImpl.cpp
+++ Source/web/WebViewImpl.cpp +++ Source/web/WebViewImpl.cpp
@@ -416,6 +416,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, WebPageVisibilityState visibilit @@ -405,6 +405,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client,
, m_enableFakePageScaleAnimationForTesting(false) m_enableFakePageScaleAnimationForTesting(false),
, m_fakePageScaleAnimationPageScaleFactor(0) m_fakePageScaleAnimationPageScaleFactor(0),
, m_fakePageScaleAnimationUseAnchor(false) m_fakePageScaleAnimationUseAnchor(false),
+ , m_shouldUseExternalPopupMenus(shouldUseExternalPopupMenus) + m_shouldUseExternalPopupMenus(shouldUseExternalPopupMenus),
, m_doingDragAndDrop(false) m_doingDragAndDrop(false),
, m_ignoreInputEvents(false) m_ignoreInputEvents(false),
, m_compositorDeviceScaleFactorOverride(0) m_compositorDeviceScaleFactorOverride(0),
@@ -4095,9 +4096,14 @@ void WebViewImpl::pageScaleFactorChanged() @@ -4249,8 +4250,13 @@ void WebViewImpl::mainFrameScrollOffsetChanged() {
m_client->pageScaleFactorChanged(); m_devToolsEmulator->mainFrameScrollOrScaleChanged();
} }
+void WebViewImpl::setUseExternalPopupMenusThisInstance(bool useExternalPopupMenus) +void WebViewImpl::setUseExternalPopupMenusThisInstance(
+{ + bool useExternalPopupMenus) {
+ m_shouldUseExternalPopupMenus = useExternalPopupMenus; + m_shouldUseExternalPopupMenus = useExternalPopupMenus;
+} +}
+ +
bool WebViewImpl::useExternalPopupMenus() bool WebViewImpl::useExternalPopupMenus() {
{ - return shouldUseExternalPopupMenus;
- return shouldUseExternalPopupMenus; + return m_shouldUseExternalPopupMenus;
+ return m_shouldUseExternalPopupMenus;
} }
void WebViewImpl::startDragging(LocalFrame* frame, void WebViewImpl::startDragging(LocalFrame* frame,
diff --git Source/web/WebViewImpl.h Source/web/WebViewImpl.h diff --git Source/web/WebViewImpl.h Source/web/WebViewImpl.h
index a69995d..de1bec7 100644 index 8e74ed5..6a37808 100644
--- Source/web/WebViewImpl.h --- Source/web/WebViewImpl.h
+++ Source/web/WebViewImpl.h +++ Source/web/WebViewImpl.h
@@ -384,7 +384,8 @@ public: @@ -380,7 +380,8 @@ class WEB_EXPORT WebViewImpl final
// Returns true if popup menus should be rendered by the browser, false if // Returns true if popup menus should be rendered by the browser, false if
// they should be rendered by WebKit (which is the default). // they should be rendered by WebKit (which is the default).
- static bool useExternalPopupMenus(); - static bool useExternalPopupMenus();
+ void setUseExternalPopupMenusThisInstance(bool); + void setUseExternalPopupMenusThisInstance(bool);
+ bool useExternalPopupMenus(); + bool useExternalPopupMenus();
bool shouldAutoResize() const bool shouldAutoResize() const { return m_shouldAutoResize; }
{
@@ -679,6 +680,8 @@ private:
float m_fakePageScaleAnimationPageScaleFactor;
bool m_fakePageScaleAnimationUseAnchor;
+ bool m_shouldUseExternalPopupMenus; @@ -685,6 +686,8 @@ class WEB_EXPORT WebViewImpl final
float m_fakePageScaleAnimationPageScaleFactor;
bool m_fakePageScaleAnimationUseAnchor;
+ bool m_shouldUseExternalPopupMenus;
+ +
bool m_doingDragAndDrop; bool m_doingDragAndDrop;
bool m_ignoreInputEvents; bool m_ignoreInputEvents;
diff --git public/web/WebView.h public/web/WebView.h diff --git public/web/WebView.h public/web/WebView.h
index 89a9582..2ba00bd 100644 index fde211e..fea968a 100644
--- public/web/WebView.h --- public/web/WebView.h
+++ public/web/WebView.h +++ public/web/WebView.h
@@ -438,6 +438,7 @@ public: @@ -443,6 +443,7 @@ class WebView : protected WebWidget {
// Sets whether select popup menus should be rendered by the browser. // Sets whether select popup menus should be rendered by the browser.
BLINK_EXPORT static void setUseExternalPopupMenus(bool); BLINK_EXPORT static void setUseExternalPopupMenus(bool);
+ virtual void setUseExternalPopupMenusThisInstance(bool) = 0; + virtual void setUseExternalPopupMenusThisInstance(bool) = 0;
// Hides any popup (suggestions, selects...) that might be showing. // Hides any popup (suggestions, selects...) that might be showing.
virtual void hidePopups() = 0; virtual void hidePopups() = 0;

View File

@ -0,0 +1,239 @@
diff --git chrome/app/generated_resources.grd chrome/app/generated_resources.grd
index dbd83a1..acf844e 100644
--- chrome/app/generated_resources.grd
+++ chrome/app/generated_resources.grd
@@ -7082,7 +7082,7 @@ Keep your key file in a safe place. You will need it to create new versions of y
</message>
</if>
<message name="IDS_PLUGIN_BLOCKED_BY_POLICY" desc="The placeholder text for a plugin blocked by enterprise policy.">
- <ph name="PLUGIN_NAME">$1<ex>Flash</ex></ph> is blocked by enterprise policy
+ <ph name="PLUGIN_NAME">$1<ex>Flash</ex></ph> is not allowed
</message>
<if expr="chromeos">
<message name="IDS_NACL_PLUGIN_BLOCKED" desc="The placeholder text for a blocked plugin.">
diff --git components/plugins/renderer/loadable_plugin_placeholder.cc components/plugins/renderer/loadable_plugin_placeholder.cc
index 9bc0478..d0263d3 100644
--- components/plugins/renderer/loadable_plugin_placeholder.cc
+++ components/plugins/renderer/loadable_plugin_placeholder.cc
@@ -127,11 +127,10 @@ void LoadablePluginPlaceholder::ReplacePlugin(blink::WebPlugin* new_plugin) {
// this point.
new_plugin = container->plugin();
+ plugin()->RestoreTitleText();
container->invalidate();
container->reportGeometry();
- if (plugin()->focused())
- new_plugin->updateFocus(true, blink::WebFocusTypeNone);
- container->element().setAttribute("title", plugin()->old_title());
+ plugin()->ReplayReceivedData(new_plugin);
plugin()->destroy();
}
diff --git components/plugins/renderer/webview_plugin.cc components/plugins/renderer/webview_plugin.cc
index af1d919..0429d59 100644
--- components/plugins/renderer/webview_plugin.cc
+++ components/plugins/renderer/webview_plugin.cc
@@ -17,7 +17,9 @@
#include "content/public/renderer/render_view.h"
#include "gin/converter.h"
#include "skia/ext/platform_canvas.h"
+#include "third_party/WebKit/public/platform/WebSize.h"
#include "third_party/WebKit/public/platform/WebURL.h"
+#include "third_party/WebKit/public/platform/WebURLRequest.h"
#include "third_party/WebKit/public/platform/WebURLResponse.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebElement.h"
@@ -40,8 +42,10 @@ using blink::WebPlugin;
using blink::WebPluginContainer;
using blink::WebPoint;
using blink::WebRect;
+using blink::WebSize;
using blink::WebString;
using blink::WebURLError;
+using blink::WebURLRequest;
using blink::WebURLResponse;
using blink::WebVector;
using blink::WebView;
@@ -54,16 +58,16 @@ WebViewPlugin::WebViewPlugin(content::RenderView* render_view,
delegate_(delegate),
container_(nullptr),
web_view_(WebView::create(this, blink::WebPageVisibilityStateVisible)),
+ finished_loading_(false),
focused_(false),
is_painting_(false),
is_resizing_(false),
- web_frame_client_(this),
weak_factory_(this) {
// ApplyWebPreferences before making a WebLocalFrame so that the frame sees a
// consistent view of our preferences.
content::RenderView::ApplyWebPreferences(preferences, web_view_);
- WebLocalFrame* web_frame = WebLocalFrame::create(
- blink::WebTreeScopeType::Document, &web_frame_client_);
+ WebLocalFrame* web_frame =
+ WebLocalFrame::create(blink::WebTreeScopeType::Document, this);
web_view_->setMainFrame(web_frame);
// TODO(dcheng): The main frame widget currently has a special case.
// Eliminate this once WebView is no longer a WebWidget.
@@ -87,6 +91,42 @@ WebViewPlugin::~WebViewPlugin() {
web_view_->close();
}
+void WebViewPlugin::ReplayReceivedData(WebPlugin* plugin) {
+ const WebURLResponse& response =
+ web_view_->mainFrame()->dataSource()->response();
+ if (!response.isNull()) {
+ plugin->didReceiveResponse(response);
+ size_t total_bytes = 0;
+ for (std::list<std::string>::iterator it = data_.begin(); it != data_.end();
+ ++it) {
+ plugin->didReceiveData(
+ it->c_str(), base::checked_cast<int, size_t>(it->length()));
+ total_bytes += it->length();
+ }
+ UMA_HISTOGRAM_MEMORY_KB(
+ "PluginDocument.Memory",
+ (base::checked_cast<int, size_t>(total_bytes / 1024)));
+ UMA_HISTOGRAM_COUNTS(
+ "PluginDocument.NumChunks",
+ (base::checked_cast<int, size_t>(data_.size())));
+ }
+ // We need to transfer the |focused_| to new plugin after it loaded.
+ if (focused_) {
+ plugin->updateFocus(true, blink::WebFocusTypeNone);
+ }
+ if (finished_loading_) {
+ plugin->didFinishLoading();
+ }
+ if (error_) {
+ plugin->didFailLoading(*error_);
+ }
+}
+
+void WebViewPlugin::RestoreTitleText() {
+ if (container_)
+ container_->element().setAttribute("title", old_title_);
+}
+
WebPluginContainer* WebViewPlugin::container() const { return container_; }
bool WebViewPlugin::initialize(WebPluginContainer* container) {
@@ -215,20 +255,18 @@ blink::WebInputEventResult WebViewPlugin::handleInputEvent(
return handled;
}
-void WebViewPlugin::didReceiveResponse(const WebURLResponse& response) {
- NOTREACHED();
-}
-
void WebViewPlugin::didReceiveData(const char* data, int data_length) {
- NOTREACHED();
+ data_.push_back(std::string(data, data_length));
}
void WebViewPlugin::didFinishLoading() {
- NOTREACHED();
+ DCHECK(!finished_loading_);
+ finished_loading_ = true;
}
void WebViewPlugin::didFailLoading(const WebURLError& error) {
- NOTREACHED();
+ DCHECK(!error_.get());
+ error_.reset(new WebURLError(error));
}
bool WebViewPlugin::acceptsLoadDrops() { return false; }
@@ -277,9 +315,8 @@ void WebViewPlugin::scheduleAnimation() {
}
}
-void WebViewPlugin::PluginWebFrameClient::didClearWindowObject(
- WebLocalFrame* frame) {
- if (!plugin_->delegate_)
+void WebViewPlugin::didClearWindowObject(WebLocalFrame* frame) {
+ if (!delegate_)
return;
v8::Isolate* isolate = blink::mainThreadIsolate();
@@ -291,7 +328,7 @@ void WebViewPlugin::PluginWebFrameClient::didClearWindowObject(
v8::Local<v8::Object> global = context->Global();
global->Set(gin::StringToV8(isolate, "plugin"),
- plugin_->delegate_->GetV8Handle(isolate));
+ delegate_->GetV8Handle(isolate));
}
void WebViewPlugin::OnDestruct() {}
diff --git components/plugins/renderer/webview_plugin.h components/plugins/renderer/webview_plugin.h
index 086fa6d..6f69dec 100644
--- components/plugins/renderer/webview_plugin.h
+++ components/plugins/renderer/webview_plugin.h
@@ -42,6 +42,7 @@ class Size;
class WebViewPlugin : public blink::WebPlugin,
public blink::WebViewClient,
+ public blink::WebFrameClient,
public content::RenderViewObserver {
public:
class Delegate {
@@ -74,8 +75,12 @@ class WebViewPlugin : public blink::WebPlugin,
blink::WebView* web_view() { return web_view_; }
- bool focused() const { return focused_; }
- const blink::WebString& old_title() const { return old_title_; }
+ // When loading a plugin document (i.e. a full page plugin not embedded in
+ // another page), we save all data that has been received, and replay it with
+ // this method on the actual plugin.
+ void ReplayReceivedData(blink::WebPlugin* plugin);
+
+ void RestoreTitleText();
// WebPlugin methods:
blink::WebPluginContainer* container() const override;
@@ -103,7 +108,7 @@ class WebViewPlugin : public blink::WebPlugin,
const blink::WebInputEvent& event,
blink::WebCursorInfo& cursor_info) override;
- void didReceiveResponse(const blink::WebURLResponse& response) override;
+ void didReceiveResponse(const blink::WebURLResponse& response) override {}
void didReceiveData(const char* data, int data_length) override;
void didFinishLoading() override;
void didFailLoading(const blink::WebURLError& error) override;
@@ -129,6 +134,9 @@ class WebViewPlugin : public blink::WebPlugin,
void didChangeCursor(const blink::WebCursorInfo& cursor) override;
void scheduleAnimation() override;
+ // WebFrameClient methods:
+ void didClearWindowObject(blink::WebLocalFrame* frame) override;
+
private:
friend class base::DeleteHelper<WebViewPlugin>;
WebViewPlugin(content::RenderView* render_view,
@@ -156,23 +164,14 @@ class WebViewPlugin : public blink::WebPlugin,
gfx::Rect rect_;
+ std::list<std::string> data_;
+ std::unique_ptr<blink::WebURLError> error_;
blink::WebString old_title_;
+ bool finished_loading_;
bool focused_;
bool is_painting_;
bool is_resizing_;
- // A helper needed to create a WebLocalFrame.
- class PluginWebFrameClient : public blink::WebFrameClient {
- public:
- PluginWebFrameClient(WebViewPlugin* plugin) : plugin_(plugin) {}
- ~PluginWebFrameClient() override {}
- void didClearWindowObject(blink::WebLocalFrame* frame) override;
-
- private:
- WebViewPlugin* plugin_;
- };
- PluginWebFrameClient web_frame_client_;
-
// Should be invalidated when destroy() is called.
base::WeakPtrFactory<WebViewPlugin> weak_factory_;
};

View File

@ -457,7 +457,7 @@ void TestChangeDirectory(CefRefPtr<CefCookieManager> manager,
DeleteAllCookies(manager, event); DeleteAllCookies(manager, event);
// Set the new temporary directory as the storage location. // Set the new temporary directory as the storage location.
EXPECT_TRUE(manager->SetStoragePath(temp_dir.path().value(), false, NULL)); EXPECT_TRUE(manager->SetStoragePath(temp_dir.GetPath().value(), false, NULL));
// Wait for the storage location change to complete on the IO thread. // Wait for the storage location change to complete on the IO thread.
WaitForIOThread(); WaitForIOThread();
@ -481,7 +481,7 @@ void TestChangeDirectory(CefRefPtr<CefCookieManager> manager,
VerifyNoCookies(manager, event, true); VerifyNoCookies(manager, event, true);
// Set the new temporary directory as the storage location. // Set the new temporary directory as the storage location.
EXPECT_TRUE(manager->SetStoragePath(temp_dir.path().value(), false, NULL)); EXPECT_TRUE(manager->SetStoragePath(temp_dir.GetPath().value(), false, NULL));
// Wait for the storage location change to complete on the IO thread. // Wait for the storage location change to complete on the IO thread.
WaitForIOThread(); WaitForIOThread();
@ -539,7 +539,7 @@ TEST(CookieTest, DomainCookieOnDisk) {
base::WaitableEvent::InitialState::NOT_SIGNALED); base::WaitableEvent::InitialState::NOT_SIGNALED);
CefRefPtr<CefCookieManager> manager = CefRefPtr<CefCookieManager> manager =
CefCookieManager::CreateManager(temp_dir.path().value(), false, CefCookieManager::CreateManager(temp_dir.GetPath().value(), false,
new TestCompletionCallback(&event)); new TestCompletionCallback(&event));
event.Wait(); event.Wait();
EXPECT_TRUE(manager.get()); EXPECT_TRUE(manager.get());
@ -593,7 +593,7 @@ TEST(CookieTest, HostCookieOnDisk) {
base::WaitableEvent::InitialState::NOT_SIGNALED); base::WaitableEvent::InitialState::NOT_SIGNALED);
CefRefPtr<CefCookieManager> manager = CefRefPtr<CefCookieManager> manager =
CefCookieManager::CreateManager(temp_dir.path().value(), false, CefCookieManager::CreateManager(temp_dir.GetPath().value(), false,
new TestCompletionCallback(&event)); new TestCompletionCallback(&event));
event.Wait(); event.Wait();
EXPECT_TRUE(manager.get()); EXPECT_TRUE(manager.get());
@ -647,7 +647,7 @@ TEST(CookieTest, MultipleCookiesOnDisk) {
base::WaitableEvent::InitialState::NOT_SIGNALED); base::WaitableEvent::InitialState::NOT_SIGNALED);
CefRefPtr<CefCookieManager> manager = CefRefPtr<CefCookieManager> manager =
CefCookieManager::CreateManager(temp_dir.path().value(), false, CefCookieManager::CreateManager(temp_dir.GetPath().value(), false,
new TestCompletionCallback(&event)); new TestCompletionCallback(&event));
event.Wait(); event.Wait();
EXPECT_TRUE(manager.get()); EXPECT_TRUE(manager.get());
@ -698,7 +698,7 @@ TEST(CookieTest, AllCookiesOnDisk) {
base::WaitableEvent::InitialState::NOT_SIGNALED); base::WaitableEvent::InitialState::NOT_SIGNALED);
CefRefPtr<CefCookieManager> manager = CefRefPtr<CefCookieManager> manager =
CefCookieManager::CreateManager(temp_dir.path().value(), false, CefCookieManager::CreateManager(temp_dir.GetPath().value(), false,
new TestCompletionCallback(&event)); new TestCompletionCallback(&event));
event.Wait(); event.Wait();
EXPECT_TRUE(manager.get()); EXPECT_TRUE(manager.get());
@ -752,7 +752,7 @@ TEST(CookieTest, SessionCookieNoPersist) {
EXPECT_TRUE(temp_dir.CreateUniqueTempDir()); EXPECT_TRUE(temp_dir.CreateUniqueTempDir());
CefRefPtr<CefCookieManager> manager = CefRefPtr<CefCookieManager> manager =
CefCookieManager::CreateManager(temp_dir.path().value(), false, CefCookieManager::CreateManager(temp_dir.GetPath().value(), false,
new TestCompletionCallback(&event)); new TestCompletionCallback(&event));
event.Wait(); event.Wait();
EXPECT_TRUE(manager.get()); EXPECT_TRUE(manager.get());
@ -768,7 +768,7 @@ TEST(CookieTest, SessionCookieNoPersist) {
event.Wait(); event.Wait();
// Create a new manager to read the same cookie store. // Create a new manager to read the same cookie store.
manager = CefCookieManager::CreateManager(temp_dir.path().value(), false, manager = CefCookieManager::CreateManager(temp_dir.GetPath().value(), false,
new TestCompletionCallback(&event)); new TestCompletionCallback(&event));
event.Wait(); event.Wait();
EXPECT_TRUE(manager.get()); EXPECT_TRUE(manager.get());
@ -788,7 +788,7 @@ TEST(CookieTest, SessionCookieWillPersist) {
EXPECT_TRUE(temp_dir.CreateUniqueTempDir()); EXPECT_TRUE(temp_dir.CreateUniqueTempDir());
CefRefPtr<CefCookieManager> manager = CefRefPtr<CefCookieManager> manager =
CefCookieManager::CreateManager(temp_dir.path().value(), true, CefCookieManager::CreateManager(temp_dir.GetPath().value(), true,
new TestCompletionCallback(&event)); new TestCompletionCallback(&event));
event.Wait(); event.Wait();
EXPECT_TRUE(manager.get()); EXPECT_TRUE(manager.get());
@ -804,7 +804,7 @@ TEST(CookieTest, SessionCookieWillPersist) {
event.Wait(); event.Wait();
// Create a new manager to read the same cookie store. // Create a new manager to read the same cookie store.
manager = CefCookieManager::CreateManager(temp_dir.path().value(), true, manager = CefCookieManager::CreateManager(temp_dir.GetPath().value(), true,
new TestCompletionCallback(&event)); new TestCompletionCallback(&event));
event.Wait(); event.Wait();
EXPECT_TRUE(manager.get()); EXPECT_TRUE(manager.get());

View File

@ -158,7 +158,7 @@ class DownloadTestHandler : public TestHandler {
// Create a new temporary directory. // Create a new temporary directory.
EXPECT_TRUE(temp_dir_.CreateUniqueTempDir()); EXPECT_TRUE(temp_dir_.CreateUniqueTempDir());
test_path_ = temp_dir_.path().AppendASCII(kTestFileName); test_path_ = temp_dir_.GetPath().AppendASCII(kTestFileName);
if (test_mode_ == NAVIGATED) { if (test_mode_ == NAVIGATED) {
// Add the resource that we'll navigate to. // Add the resource that we'll navigate to.

View File

@ -176,7 +176,7 @@ TEST(RequestContextTest, CreateContextSharedOnDisk) {
EXPECT_TRUE(tempdir.CreateUniqueTempDir()); EXPECT_TRUE(tempdir.CreateUniqueTempDir());
CefRequestContextSettings settings; CefRequestContextSettings settings;
CefString(&settings.cache_path) = tempdir.path().value(); CefString(&settings.cache_path) = tempdir.GetPath().value();
CefRefPtr<CefRequestContext> context1 = CefRefPtr<CefRequestContext> context1 =
CefRequestContext::CreateContext(settings, NULL); CefRequestContext::CreateContext(settings, NULL);

View File

@ -693,7 +693,7 @@ TEST(ResourceManagerTest, DirectoryProvider) {
EXPECT_TRUE(scoped_dir.CreateUniqueTempDir()); EXPECT_TRUE(scoped_dir.CreateUniqueTempDir());
// Write the files to disk. // Write the files to disk.
const base::FilePath& temp_dir = scoped_dir.path(); const base::FilePath& temp_dir = scoped_dir.GetPath();
WriteFile(temp_dir.AppendASCII(kFile1), CreateContents(success1_message)); WriteFile(temp_dir.AppendASCII(kFile1), CreateContents(success1_message));
WriteFile(temp_dir.AppendASCII(kFile2), CreateContents(success2_message)); WriteFile(temp_dir.AppendASCII(kFile2), CreateContents(success2_message));
@ -750,7 +750,7 @@ TEST(ResourceManagerTest, ArchiveProvider) {
base::ScopedTempDir scoped_dir; base::ScopedTempDir scoped_dir;
EXPECT_TRUE(scoped_dir.CreateUniqueTempDir()); EXPECT_TRUE(scoped_dir.CreateUniqueTempDir());
const base::FilePath& temp_dir = scoped_dir.path(); const base::FilePath& temp_dir = scoped_dir.GetPath();
// Write the files to disk. // Write the files to disk.
const base::FilePath& file_dir = temp_dir.AppendASCII("files"); const base::FilePath& file_dir = temp_dir.AppendASCII("files");

View File

@ -716,7 +716,7 @@ class RequestTestRunner : public base::RefCountedThreadSafe<RequestTestRunner> {
EXPECT_TRUE(post_file_tmpdir_.CreateUniqueTempDir()); EXPECT_TRUE(post_file_tmpdir_.CreateUniqueTempDir());
const base::FilePath& path = const base::FilePath& path =
post_file_tmpdir_.path().Append(FILE_PATH_LITERAL("example.txt")); post_file_tmpdir_.GetPath().Append(FILE_PATH_LITERAL("example.txt"));
const char content[] = "HELLO FRIEND!"; const char content[] = "HELLO FRIEND!";
int write_ct = base::WriteFile(path, content, sizeof(content) - 1); int write_ct = base::WriteFile(path, content, sizeof(content) - 1);
EXPECT_EQ(static_cast<int>(sizeof(content) - 1), write_ct); EXPECT_EQ(static_cast<int>(sizeof(content) - 1), write_ct);
@ -1009,7 +1009,7 @@ class RequestTestHandler : public TestHandler,
if (context_mode_ == CONTEXT_ONDISK) { if (context_mode_ == CONTEXT_ONDISK) {
EXPECT_TRUE(context_tmpdir_.CreateUniqueTempDir()); EXPECT_TRUE(context_tmpdir_.CreateUniqueTempDir());
CefString(&settings.cache_path) = context_tmpdir_.path().value(); CefString(&settings.cache_path) = context_tmpdir_.GetPath().value();
} }
// Create a new temporary request context. // Create a new temporary request context.