Update to Chromium revision 6e53600d (#386251)

- Remove |accept_lang| parameter from CefJSDialogHandler::OnJSDialog
  and CefFormatUrlForSecurityDisplay (see https://crbug.com/336973#c36).
- Remove remaining NPAPI-related code including functions from
  cef_web_plugin.h (see https://crbug.com/493212#c55).
- Mac: 10.7+ deployment target is now required for client applications.
- Mac: Remove CefBrowserHost::SetWindowVisibility (issue #1375). No
  replacement is required for windowed rendering. Use WasHidden for
  off-screen rendering.
- Windows: Visual Studio 2015 Update 2 is now required when building
  CEF/Chromium.
This commit is contained in:
Marshall Greenblatt
2016-04-27 16:38:52 -04:00
parent 3c957f9257
commit e7ddc933c9
215 changed files with 869 additions and 1537 deletions

View File

@@ -65,7 +65,7 @@ StreamsPrivateAPI::~StreamsPrivateAPI() {
void StreamsPrivateAPI::ExecuteMimeTypeHandler(
const std::string& extension_id,
int tab_id,
scoped_ptr<content::StreamInfo> stream,
std::unique_ptr<content::StreamInfo> stream,
const std::string& view_id,
int64_t expected_content_size,
bool embedded,
@@ -84,7 +84,7 @@ void StreamsPrivateAPI::ExecuteMimeTypeHandler(
if (handler->HasPlugin()) {
GURL handler_url(Extension::GetBaseURLFromExtensionId(extension_id).spec() +
handler->handler_url());
scoped_ptr<StreamContainer> stream_container(new StreamContainer(
std::unique_ptr<StreamContainer> stream_container(new StreamContainer(
std::move(stream), tab_id, embedded, handler_url, extension_id));
MimeHandlerStreamManager::Get(browser_context_)
->AddStream(view_id, std::move(stream_container), render_process_id,
@@ -111,7 +111,7 @@ void StreamsPrivateAPI::ExecuteMimeTypeHandler(
CreateResponseHeadersDictionary(stream->response_headers.get(),
&info.response_headers.additional_properties);
scoped_ptr<Event> event(
std::unique_ptr<Event> event(
new Event(events::STREAMS_PRIVATE_ON_EXECUTE_MIME_TYPE_HANDLER,
streams_private::OnExecuteMimeTypeHandler::kEventName,
streams_private::OnExecuteMimeTypeHandler::Create(info)));

View File

@@ -41,7 +41,7 @@ class StreamsPrivateAPI : public BrowserContextKeyedAPI,
// should be set to whether the document is embedded within another document.
void ExecuteMimeTypeHandler(const std::string& extension_id,
int tab_id,
scoped_ptr<content::StreamInfo> stream,
std::unique_ptr<content::StreamInfo> stream,
const std::string& view_id,
int64_t expected_content_size,
bool embedded,

View File

@@ -29,7 +29,7 @@ EventRouterForwarder::~EventRouterForwarder() {
void EventRouterForwarder::BroadcastEventToRenderers(
events::HistogramValue histogram_value,
const std::string& event_name,
scoped_ptr<base::ListValue> event_args,
std::unique_ptr<base::ListValue> event_args,
const GURL& event_url) {
HandleEvent(std::string(), histogram_value, event_name, std::move(event_args),
0, true, event_url);
@@ -38,7 +38,7 @@ void EventRouterForwarder::BroadcastEventToRenderers(
void EventRouterForwarder::DispatchEventToRenderers(
events::HistogramValue histogram_value,
const std::string& event_name,
scoped_ptr<base::ListValue> event_args,
std::unique_ptr<base::ListValue> event_args,
void* profile,
bool use_profile_to_restrict_events,
const GURL& event_url) {
@@ -52,7 +52,7 @@ void EventRouterForwarder::BroadcastEventToExtension(
const std::string& extension_id,
events::HistogramValue histogram_value,
const std::string& event_name,
scoped_ptr<base::ListValue> event_args,
std::unique_ptr<base::ListValue> event_args,
const GURL& event_url) {
HandleEvent(extension_id, histogram_value, event_name, std::move(event_args),
0, true, event_url);
@@ -62,7 +62,7 @@ void EventRouterForwarder::DispatchEventToExtension(
const std::string& extension_id,
events::HistogramValue histogram_value,
const std::string& event_name,
scoped_ptr<base::ListValue> event_args,
std::unique_ptr<base::ListValue> event_args,
void* profile,
bool use_profile_to_restrict_events,
const GURL& event_url) {
@@ -72,13 +72,14 @@ void EventRouterForwarder::DispatchEventToExtension(
profile, use_profile_to_restrict_events, event_url);
}
void EventRouterForwarder::HandleEvent(const std::string& extension_id,
events::HistogramValue histogram_value,
const std::string& event_name,
scoped_ptr<base::ListValue> event_args,
void* profile_ptr,
bool use_profile_to_restrict_events,
const GURL& event_url) {
void EventRouterForwarder::HandleEvent(
const std::string& extension_id,
events::HistogramValue histogram_value,
const std::string& event_name,
std::unique_ptr<base::ListValue> event_args,
void* profile_ptr,
bool use_profile_to_restrict_events,
const GURL& event_url) {
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
@@ -102,7 +103,7 @@ void EventRouterForwarder::HandleEvent(const std::string& extension_id,
std::vector<CefBrowserContextImpl*> profiles(
CefBrowserContextImpl::GetAll());
for (size_t i = 0; i < profiles.size(); ++i) {
scoped_ptr<base::ListValue> per_profile_event_args(
std::unique_ptr<base::ListValue> per_profile_event_args(
event_args->DeepCopy());
CallEventRouter(profiles[i], extension_id, histogram_value, event_name,
std::move(per_profile_event_args),
@@ -117,10 +118,10 @@ void EventRouterForwarder::CallEventRouter(
const std::string& extension_id,
events::HistogramValue histogram_value,
const std::string& event_name,
scoped_ptr<base::ListValue> event_args,
std::unique_ptr<base::ListValue> event_args,
content::BrowserContext* restrict_to_profile,
const GURL& event_url) {
scoped_ptr<Event> event(
std::unique_ptr<Event> event(
new Event(histogram_value, event_name, std::move(event_args)));
event->restrict_to_browser_context = restrict_to_profile;
event->event_url = event_url;

View File

@@ -40,7 +40,7 @@ class EventRouterForwarder
// May be called on any thread.
void BroadcastEventToRenderers(events::HistogramValue histogram_value,
const std::string& event_name,
scoped_ptr<base::ListValue> event_args,
std::unique_ptr<base::ListValue> event_args,
const GURL& event_url);
// Calls
@@ -51,7 +51,7 @@ class EventRouterForwarder
void BroadcastEventToExtension(const std::string& extension_id,
events::HistogramValue histogram_value,
const std::string& event_name,
scoped_ptr<base::ListValue> event_args,
std::unique_ptr<base::ListValue> event_args,
const GURL& event_url);
// Calls
@@ -60,7 +60,7 @@ class EventRouterForwarder
// on |profile|'s EventRouter. May be called on any thread.
void DispatchEventToRenderers(events::HistogramValue histogram_value,
const std::string& event_name,
scoped_ptr<base::ListValue> event_args,
std::unique_ptr<base::ListValue> event_args,
void* profile,
bool use_profile_to_restrict_events,
const GURL& event_url);
@@ -72,7 +72,7 @@ class EventRouterForwarder
void DispatchEventToExtension(const std::string& extension_id,
events::HistogramValue histogram_value,
const std::string& event_name,
scoped_ptr<base::ListValue> event_args,
std::unique_ptr<base::ListValue> event_args,
void* profile,
bool use_profile_to_restrict_events,
const GURL& event_url);
@@ -86,7 +86,7 @@ class EventRouterForwarder
virtual void HandleEvent(const std::string& extension_id,
events::HistogramValue histogram_value,
const std::string& event_name,
scoped_ptr<base::ListValue> event_args,
std::unique_ptr<base::ListValue> event_args,
void* profile,
bool use_profile_to_restrict_events,
const GURL& event_url);
@@ -99,7 +99,7 @@ class EventRouterForwarder
const std::string& extension_id,
events::HistogramValue histogram_value,
const std::string& event_name,
scoped_ptr<base::ListValue> event_args,
std::unique_ptr<base::ListValue> event_args,
content::BrowserContext* restrict_to_profile,
const GURL& event_url);

View File

@@ -36,6 +36,7 @@
#include "extensions/browser/quota_service.h"
#include "extensions/browser/runtime_data.h"
#include "extensions/browser/service_worker_manager.h"
#include "extensions/browser/value_store/value_store_factory.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension_messages.h"
#include "extensions/common/file_util.h"
@@ -65,7 +66,7 @@ std::string GenerateId(const base::DictionaryValue* manifest,
base::DictionaryValue* ParseManifest(
const std::string& manifest_contents) {
JSONStringValueDeserializer deserializer(manifest_contents);
scoped_ptr<base::Value> manifest(deserializer.Deserialize(NULL, NULL));
std::unique_ptr<base::Value> manifest(deserializer.Deserialize(NULL, NULL));
if (!manifest.get() || !manifest->IsType(base::Value::TYPE_DICTIONARY)) {
LOG(ERROR) << "Failed to parse extension manifest.";
@@ -204,6 +205,10 @@ StateStore* CefExtensionSystem::rules_store() {
return nullptr;
}
scoped_refptr<ValueStoreFactory> CefExtensionSystem::store_factory() {
return nullptr;
}
InfoMap* CefExtensionSystem::info_map() {
if (!info_map_.get())
info_map_ = new InfoMap;
@@ -230,7 +235,7 @@ void CefExtensionSystem::RegisterExtensionWithRequestContexts(
FROM_HERE,
base::Bind(&InfoMap::AddExtension,
info_map(),
make_scoped_refptr(extension),
base::RetainedRef(extension),
base::Time::Now(),
true, // incognito_enabled
false), // notifications_disabled
@@ -256,7 +261,7 @@ ContentVerifier* CefExtensionSystem::content_verifier() {
return nullptr;
}
scoped_ptr<ExtensionSet> CefExtensionSystem::GetDependentExtensions(
std::unique_ptr<ExtensionSet> CefExtensionSystem::GetDependentExtensions(
const Extension* extension) {
return make_scoped_ptr(new ExtensionSet());
}
@@ -451,7 +456,6 @@ void CefExtensionSystem::NotifyExtensionUnloaded(
content::PluginService* plugin_service =
content::PluginService::GetInstance();
plugin_service->UnregisterInternalPlugin(path);
plugin_service->ForcePluginShutdown(path);
plugin_service->RefreshPlugins();
}

View File

@@ -30,6 +30,7 @@ class InfoMap;
class ProcessManager;
class RendererStartupHelper;
class SharedUserScriptMaster;
class ValueStoreFactory;
// Used to manage extensions.
class CefExtensionSystem : public ExtensionSystem {
@@ -60,6 +61,7 @@ class CefExtensionSystem : public ExtensionSystem {
SharedUserScriptMaster* shared_user_script_master() override;
StateStore* state_store() override;
StateStore* rules_store() override;
scoped_refptr<ValueStoreFactory> store_factory() override;
InfoMap* info_map() override;
QuotaService* quota_service() override;
AppSorting* app_sorting() override;
@@ -71,7 +73,7 @@ class CefExtensionSystem : public ExtensionSystem {
const UnloadedExtensionInfo::Reason reason) override;
const OneShotEvent& ready() const override;
ContentVerifier* content_verifier() override;
scoped_ptr<ExtensionSet> GetDependentExtensions(
std::unique_ptr<ExtensionSet> GetDependentExtensions(
const Extension* extension) override;
void InstallUpdate(const std::string& extension_id,
const base::FilePath& temp_dir) override;
@@ -121,10 +123,10 @@ class CefExtensionSystem : public ExtensionSystem {
// Data to be accessed on the IO thread. Must outlive process_manager_.
scoped_refptr<InfoMap> info_map_;
scoped_ptr<ServiceWorkerManager> service_worker_manager_;
scoped_ptr<RuntimeData> runtime_data_;
scoped_ptr<QuotaService> quota_service_;
scoped_ptr<AppSorting> app_sorting_;
std::unique_ptr<ServiceWorkerManager> service_worker_manager_;
std::unique_ptr<RuntimeData> runtime_data_;
std::unique_ptr<QuotaService> quota_service_;
std::unique_ptr<AppSorting> app_sorting_;
// Signaled when the extension system has completed its startup tasks.
OneShotEvent ready_;

View File

@@ -28,7 +28,7 @@ AppViewGuestDelegate* CefExtensionsAPIClient::CreateAppViewGuestDelegate()
return NULL;
}
scoped_ptr<guest_view::GuestViewManagerDelegate>
std::unique_ptr<guest_view::GuestViewManagerDelegate>
CefExtensionsAPIClient::CreateGuestViewManagerDelegate(
content::BrowserContext* context) const {
// The GuestViewManager instance associated with the returned Delegate, which
@@ -44,7 +44,7 @@ CefExtensionsAPIClient::CreateGuestViewManagerDelegate(
CefBrowserContextImpl::GetForContext(context).get()));
}
scoped_ptr<MimeHandlerViewGuestDelegate>
std::unique_ptr<MimeHandlerViewGuestDelegate>
CefExtensionsAPIClient::CreateMimeHandlerViewGuestDelegate(
MimeHandlerViewGuest* guest) const {
return make_scoped_ptr(new CefMimeHandlerViewGuestDelegate(guest));
@@ -56,7 +56,7 @@ void CefExtensionsAPIClient::AttachWebContentsHelpers(
printing::PrintViewManager::CreateForWebContents(web_contents);
pdf::PDFWebContentsHelper::CreateForWebContentsWithClient(
web_contents,
scoped_ptr<pdf::PDFWebContentsHelperClient>(
std::unique_ptr<pdf::PDFWebContentsHelperClient>(
new CefPDFWebContentsHelperClient()));
CefExtensionWebContentsObserver::CreateForWebContents(web_contents);
}

View File

@@ -16,10 +16,10 @@ class CefExtensionsAPIClient : public ExtensionsAPIClient {
// ExtensionsAPIClient implementation.
AppViewGuestDelegate* CreateAppViewGuestDelegate() const override;
scoped_ptr<guest_view::GuestViewManagerDelegate>
std::unique_ptr<guest_view::GuestViewManagerDelegate>
CreateGuestViewManagerDelegate(
content::BrowserContext* context) const override;
scoped_ptr<MimeHandlerViewGuestDelegate>
std::unique_ptr<MimeHandlerViewGuestDelegate>
CreateMimeHandlerViewGuestDelegate(
MimeHandlerViewGuest* guest) const override;
void AttachWebContentsHelpers(content::WebContents* web_contents) const

View File

@@ -139,11 +139,11 @@ CefExtensionsBrowserClient::GetProcessManagerDelegate() const {
return NULL;
}
scoped_ptr<ExtensionHostDelegate>
std::unique_ptr<ExtensionHostDelegate>
CefExtensionsBrowserClient::CreateExtensionHostDelegate() {
// TODO(extensions): Implement to support Apps.
NOTREACHED();
return scoped_ptr<ExtensionHostDelegate>();
return std::unique_ptr<ExtensionHostDelegate>();
}
bool CefExtensionsBrowserClient::DidVersionUpdate(BrowserContext* context) {
@@ -188,12 +188,12 @@ void CefExtensionsBrowserClient::RegisterMojoServices(
RegisterServicesForFrame(render_frame_host, extension);
}
scoped_ptr<RuntimeAPIDelegate>
std::unique_ptr<RuntimeAPIDelegate>
CefExtensionsBrowserClient::CreateRuntimeAPIDelegate(
content::BrowserContext* context) const {
// TODO(extensions): Implement to support Apps.
NOTREACHED();
return scoped_ptr<RuntimeAPIDelegate>();
return std::unique_ptr<RuntimeAPIDelegate>();
}
const ComponentExtensionResourceManager*
@@ -204,7 +204,7 @@ CefExtensionsBrowserClient::GetComponentExtensionResourceManager() {
void CefExtensionsBrowserClient::BroadcastEventToRenderers(
events::HistogramValue histogram_value,
const std::string& event_name,
scoped_ptr<base::ListValue> args) {
std::unique_ptr<base::ListValue> args) {
event_router_forwarder_->BroadcastEventToRenderers(
histogram_value, event_name, std::move(args), GURL());
}

View File

@@ -58,7 +58,7 @@ class CefExtensionsBrowserClient : public ExtensionsBrowserClient {
std::vector<ExtensionPrefsObserver*>* observers) const
override;
ProcessManagerDelegate* GetProcessManagerDelegate() const override;
scoped_ptr<ExtensionHostDelegate>
std::unique_ptr<ExtensionHostDelegate>
CreateExtensionHostDelegate() override;
bool DidVersionUpdate(content::BrowserContext* context) override;
void PermitExternalProtocolHandler() override;
@@ -71,13 +71,13 @@ class CefExtensionsBrowserClient : public ExtensionsBrowserClient {
ExtensionFunctionRegistry* registry) const override;
void RegisterMojoServices(content::RenderFrameHost* render_frame_host,
const Extension* extension) const override;
scoped_ptr<RuntimeAPIDelegate> CreateRuntimeAPIDelegate(
std::unique_ptr<RuntimeAPIDelegate> CreateRuntimeAPIDelegate(
content::BrowserContext* context) const override;
const ComponentExtensionResourceManager*
GetComponentExtensionResourceManager() override;
void BroadcastEventToRenderers(events::HistogramValue histogram_value,
const std::string& event_name,
scoped_ptr<base::ListValue> args) override;
std::unique_ptr<base::ListValue> args) override;
net::NetLog* GetNetLog() override;
ExtensionCache* GetExtensionCache() override;
bool IsBackgroundUpdateAllowed() override;
@@ -90,10 +90,10 @@ class CefExtensionsBrowserClient : public ExtensionsBrowserClient {
private:
// Support for extension APIs.
scoped_ptr<ExtensionsAPIClient> api_client_;
std::unique_ptr<ExtensionsAPIClient> api_client_;
// Resource manager used to supply resources from pak files.
scoped_ptr<ComponentExtensionResourceManager> resource_manager_;
std::unique_ptr<ComponentExtensionResourceManager> resource_manager_;
scoped_refptr<EventRouterForwarder> event_router_forwarder_;