Skip to content

Commit

Permalink
Merge pull request #16494 from electron/chromium-upgrade/73
Browse files Browse the repository at this point in the history
feat: upgrade to Chromium 73.0.3683.27
  • Loading branch information
MarshallOfSound committed Feb 14, 2019
2 parents e769b86 + 46a49b7 commit 5904544
Show file tree
Hide file tree
Showing 174 changed files with 1,288 additions and 2,572 deletions.
26 changes: 1 addition & 25 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import("//build/config/locales.gni")
import("//build/config/ui.gni")
import("//build/config/win/manifest.gni")
import("//pdf/features.gni")
import("//services/service_manager/public/service_manifest.gni")
import("//third_party/ffmpeg/ffmpeg_options.gni")
import("//tools/generate_library_loader/generate_library_loader.gni")
import("//tools/grit/grit_rule.gni")
Expand Down Expand Up @@ -281,7 +280,6 @@ grit("resources") {

deps = [
":copy_shell_devtools_discovery_page",
":electron_content_manifest_overlays",
]

output_dir = "$target_gen_dir"
Expand Down Expand Up @@ -330,6 +328,7 @@ static_library("electron_lib") {
":atom_js2c",
"buildflags",
"chromium_src:chrome",
"manifests",
"native_mate",
"//base",
"//base:base_static",
Expand Down Expand Up @@ -1055,26 +1054,3 @@ group("electron") {
":electron_app",
]
}

group("electron_content_manifest_overlays") {
deps = [
":electron_content_browser_manifest_overlay",
":electron_content_packaged_services_manifest_overlay",
]
}

service_manifest("electron_content_packaged_services_manifest_overlay") {
source = "//electron/manifests/electron_content_packaged_services_manifest_overlay.json"
packaged_services = [ "//services/proxy_resolver:proxy_resolver_manifest" ]

if (enable_basic_printing) {
packaged_services += [
"//chrome/services/printing:manifest",
"//components/services/pdf_compositor:pdf_compositor_manifest",
]
}
}

service_manifest("electron_content_browser_manifest_overlay") {
source = "//electron/manifests/electron_content_browser_manifest_overlay.json"
}
4 changes: 2 additions & 2 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ gclient_gn_args = [

vars = {
'chromium_version':
'72.0.3626.110',
'73.0.3683.27',
'node_version':
'ad2c89ec3be0f5db3ea02b0f591d36a5d84c51ad',
'fac6d766c143db8db05bb3b0c0871df8f032363c',

'boto_version': 'f7574aa6cc2c819430c1f05e9a1a1a666ef8169b',
'pyyaml_version': '3.12',
Expand Down
13 changes: 0 additions & 13 deletions atom/app/atom_content_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,14 @@
#include <string>
#include <vector>

#include "atom/common/atom_version.h"
#include "atom/common/options_switches.h"
#include "base/command_line.h"
#include "base/files/file_util.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/common/chrome_version.h"
#include "content/public/common/content_constants.h"
#include "content/public/common/pepper_plugin_info.h"
#include "content/public/common/user_agent.h"
#include "electron/buildflags/buildflags.h"
#include "ppapi/shared_impl/ppapi_permissions.h"
#include "ui/base/l10n/l10n_util.h"
Expand Down Expand Up @@ -180,16 +177,6 @@ AtomContentClient::AtomContentClient() {}

AtomContentClient::~AtomContentClient() {}

std::string AtomContentClient::GetProduct() const {
return "Chrome/" CHROME_VERSION_STRING;
}

std::string AtomContentClient::GetUserAgent() const {
return content::BuildUserAgentFromProduct("Chrome/" CHROME_VERSION_STRING
" " ATOM_PRODUCT_NAME
"/" ATOM_VERSION_STRING);
}

base::string16 AtomContentClient::GetLocalizedString(int message_id) const {
return l10n_util::GetStringUTF16(message_id);
}
Expand Down
2 changes: 0 additions & 2 deletions atom/app/atom_content_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ class AtomContentClient : public content::ContentClient {

protected:
// content::ContentClient:
std::string GetProduct() const override;
std::string GetUserAgent() const override;
base::string16 GetLocalizedString(int message_id) const override;
base::StringPiece GetDataResource(int resource_id,
ui::ScaleFactor) const override;
Expand Down
44 changes: 44 additions & 0 deletions atom/app/manifests.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Copyright (c) 2019 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.

#include "atom/app/manifests.h"

#include "base/no_destructor.h"
#include "printing/buildflags/buildflags.h"
#include "services/proxy_resolver/proxy_resolver_manifest.h"
#include "services/service_manager/public/cpp/manifest_builder.h"

#if BUILDFLAG(ENABLE_PRINTING)
#include "components/services/pdf_compositor/pdf_compositor_manifest.h"
#endif

#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
#include "chrome/services/printing/manifest.h"
#endif

const service_manager::Manifest& GetElectronContentBrowserOverlayManifest() {
static base::NoDestructor<service_manager::Manifest> manifest{
service_manager::ManifestBuilder()
.WithDisplayName("Electron (browser process)")
.RequireCapability("device", "device:geolocation_control")
.RequireCapability("proxy_resolver", "factory")
.RequireCapability("chrome_printing", "converter")
.RequireCapability("pdf_compositor", "compositor")
.Build()};
return *manifest;
}

const std::vector<service_manager::Manifest>&
GetElectronPackagedServicesOverlayManifest() {
static base::NoDestructor<std::vector<service_manager::Manifest>> manifests{{
proxy_resolver::GetManifest(),
#if BUILDFLAG(ENABLE_PRINTING)
pdf_compositor::GetManifest(),
#endif
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
chrome_printing::GetManifest(),
#endif
}};
return *manifests;
}
16 changes: 16 additions & 0 deletions atom/app/manifests.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright (c) 2019 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.

#ifndef ATOM_APP_MANIFESTS_H_
#define ATOM_APP_MANIFESTS_H_

#include <vector>

#include "services/service_manager/public/cpp/manifest.h"

const service_manager::Manifest& GetElectronContentBrowserOverlayManifest();
const std::vector<service_manager::Manifest>&
GetElectronPackagedServicesOverlayManifest();

#endif // ATOM_APP_MANIFESTS_H_
2 changes: 1 addition & 1 deletion atom/browser/api/atom_api_app.cc
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ bool App::CanCreateWindow(
content::RenderFrameHost* opener,
const GURL& opener_url,
const GURL& opener_top_level_frame_url,
const GURL& source_origin,
const url::Origin& source_origin,
content::mojom::WindowContainerType container_type,
const GURL& target_url,
const content::Referrer& referrer,
Expand Down
2 changes: 1 addition & 1 deletion atom/browser/api/atom_api_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class App : public AtomBrowserClient::Delegate,
bool CanCreateWindow(content::RenderFrameHost* opener,
const GURL& opener_url,
const GURL& opener_top_level_frame_url,
const GURL& source_origin,
const url::Origin& source_origin,
content::mojom::WindowContainerType container_type,
const GURL& target_url,
const content::Referrer& referrer,
Expand Down
6 changes: 4 additions & 2 deletions atom/browser/api/atom_api_browser_window.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "atom/common/options_switches.h"
#include "base/threading/thread_task_runner_handle.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/browser/renderer_host/render_widget_host_owner_delegate.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "gin/converter.h"
Expand Down Expand Up @@ -130,7 +131,7 @@ void BrowserWindow::RenderViewCreated(
render_view_host->GetProcess()->GetID(),
render_view_host->GetRoutingID());
if (impl)
impl->SetBackgroundOpaque(false);
impl->owner_delegate()->SetBackgroundOpaque(false);
}

void BrowserWindow::DidFirstVisuallyNonEmptyPaint() {
Expand Down Expand Up @@ -349,7 +350,8 @@ void BrowserWindow::SetVibrancy(v8::Isolate* isolate,
render_view_host->GetProcess()->GetID(),
render_view_host->GetRoutingID());
if (impl)
impl->SetBackgroundOpaque(type.empty() ? !window_->transparent() : false);
impl->owner_delegate()->SetBackgroundOpaque(
type.empty() ? !window_->transparent() : false);
}

TopLevelWindow::SetVibrancy(isolate, value);
Expand Down
2 changes: 1 addition & 1 deletion atom/browser/api/atom_api_download_item.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ bool DownloadItem::IsPaused() const {
}

void DownloadItem::Resume() {
download_item_->Resume();
download_item_->Resume(true /* user_gesture */);
}

bool DownloadItem::CanResume() const {
Expand Down
16 changes: 8 additions & 8 deletions atom/browser/api/atom_api_power_monitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,19 @@ void PowerMonitor::OnResume() {
Emit("resume");
}

void PowerMonitor::QuerySystemIdleState(v8::Isolate* isolate,
int idle_threshold,
const ui::IdleCallback& callback) {
ui::IdleState PowerMonitor::QuerySystemIdleState(v8::Isolate* isolate,
int idle_threshold) {
if (idle_threshold > 0) {
ui::CalculateIdleState(idle_threshold, callback);
return ui::CalculateIdleState(idle_threshold);
} else {
isolate->ThrowException(v8::Exception::TypeError(mate::StringToV8(
isolate, "Invalid idle threshold, must be greater than 0")));
return ui::IDLE_STATE_UNKNOWN;
}
}

void PowerMonitor::QuerySystemIdleTime(const ui::IdleTimeCallback& callback) {
ui::CalculateIdleTime(callback);
int PowerMonitor::QuerySystemIdleTime() {
return ui::CalculateIdleTime();
}

// static
Expand All @@ -122,8 +122,8 @@ void PowerMonitor::BuildPrototype(v8::Isolate* isolate,
.SetMethod("blockShutdown", &PowerMonitor::BlockShutdown)
.SetMethod("unblockShutdown", &PowerMonitor::UnblockShutdown)
#endif
.SetMethod("querySystemIdleState", &PowerMonitor::QuerySystemIdleState)
.SetMethod("querySystemIdleTime", &PowerMonitor::QuerySystemIdleTime);
.SetMethod("_querySystemIdleState", &PowerMonitor::QuerySystemIdleState)
.SetMethod("_querySystemIdleTime", &PowerMonitor::QuerySystemIdleTime);
}

} // namespace api
Expand Down
6 changes: 2 additions & 4 deletions atom/browser/api/atom_api_power_monitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,8 @@ class PowerMonitor : public mate::TrackableObject<PowerMonitor>,
void OnResume() override;

private:
void QuerySystemIdleState(v8::Isolate* isolate,
int idle_threshold,
const ui::IdleCallback& callback);
void QuerySystemIdleTime(const ui::IdleTimeCallback& callback);
ui::IdleState QuerySystemIdleState(v8::Isolate* isolate, int idle_threshold);
int QuerySystemIdleTime();

#if defined(OS_WIN)
// Static callback invoked when a message comes in to our messaging window.
Expand Down
7 changes: 3 additions & 4 deletions atom/browser/api/atom_api_web_contents.cc
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ void WebContents::FindReply(content::WebContents* web_contents,
bool WebContents::CheckMediaAccessPermission(
content::RenderFrameHost* render_frame_host,
const GURL& security_origin,
content::MediaStreamType type) {
blink::MediaStreamType type) {
auto* web_contents =
content::WebContents::FromRenderFrameHost(render_frame_host);
auto* permission_helper =
Expand Down Expand Up @@ -999,8 +999,7 @@ void WebContents::DevToolsOpened() {

// Inherit owner window in devtools when it doesn't have one.
auto* devtools = managed_web_contents()->GetDevToolsWebContents();
bool has_window =
devtools->GetUserData(NativeWindowRelay::kNativeWindowRelayUserDataKey);
bool has_window = devtools->GetUserData(NativeWindowRelay::UserDataKey());
if (owner_window() && !has_window)
handle->SetOwnerWindow(devtools, owner_window());

Expand Down Expand Up @@ -1127,7 +1126,7 @@ void WebContents::SetBackgroundThrottling(bool allowed) {
return;
}

const auto* render_process_host = render_view_host->GetProcess();
auto* render_process_host = render_view_host->GetProcess();
if (!render_process_host) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion atom/browser/api/atom_api_web_contents.h
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ class WebContents : public mate::TrackableObject<WebContents>,
bool final_update) override;
bool CheckMediaAccessPermission(content::RenderFrameHost* render_frame_host,
const GURL& security_origin,
content::MediaStreamType type) override;
blink::MediaStreamType type) override;
void RequestMediaAccessPermission(
content::WebContents* web_contents,
const content::MediaStreamRequest& request,
Expand Down
4 changes: 4 additions & 0 deletions atom/browser/api/atom_api_web_contents_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,13 @@ class WebContentsViewRelay

atom::api::WebContentsView* view_ = nullptr;

WEB_CONTENTS_USER_DATA_KEY_DECL();

DISALLOW_COPY_AND_ASSIGN(WebContentsViewRelay);
};

WEB_CONTENTS_USER_DATA_KEY_IMPL(WebContentsViewRelay)

} // namespace

namespace atom {
Expand Down

0 comments on commit 5904544

Please sign in to comment.