Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Chromium 67 #13756

Merged
merged 42 commits into from Sep 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
7c32524
Use libcc based on Chromium 67.0.3396.99 and Node 10.6.0
alexeykuzmin Jul 20, 2018
7bd1b85
Rename net/proxy_resolution/proxy_service* files
alexeykuzmin Jul 20, 2018
00423b0
Migrate BrowserThread::IsMessageLoopValid to BrowserThread::IsThreadI…
alexeykuzmin Jul 20, 2018
0afebdc
The Great Blink mv for source files, part 2.
alexeykuzmin Jul 20, 2018
400b23c
Introduce additional Certificate Transparency preferences
deepak1556 Jul 20, 2018
d15d08b
Improve ClearOnExit behavior of cookies using domain matching
deepak1556 Jul 20, 2018
ed045c1
Replace ProxyConfigSource with ProxyConfigWithAnnotation.
deepak1556 Jul 20, 2018
67f6e21
No longer save the IO message loop in net::EnsureNSSHttpIOInit
deepak1556 Jul 20, 2018
ca28b39
Rename buildflag_headers for consistency
alexeykuzmin Jul 21, 2018
833b551
Plumb the RenderFrameHost through for CheckMediaAccessPermission
alexeykuzmin Sep 9, 2018
14df89f
Remove the 'getProcessMemoryInfo' API
MarshallOfSound Jul 21, 2018
dde194d
Remove the memory property from getAppMetrics
MarshallOfSound Jul 21, 2018
aa6d769
Handle external protocols with the network service.
MarshallOfSound Jul 21, 2018
8a6fccf
[GURL] (1 of 2) Prep for stripping "username:password" from internal …
MarshallOfSound Jul 21, 2018
a0a4c7b
Implement GetPermissionStatusForFrame in AtomPermissionManager
MarshallOfSound Jul 21, 2018
6e2bb72
Replace ProxyConfigSource with ProxyConfigWithAnnotation.
MarshallOfSound Jul 21, 2018
b381e85
media: Stop registering CDM adapter as a pepper plugin
MarshallOfSound Jul 21, 2018
dc5c49e
SetUserAgentOverride now takes a 2nd override_for_new_tabs argument
MarshallOfSound Jul 21, 2018
0b2b44b
Handle unknown symbols for media:: method
MarshallOfSound Jul 21, 2018
cad1d9a
Handle case where IO thread is not yet running, in C67 this results
MarshallOfSound Jul 21, 2018
8da2bd4
Include the node header at the end to avoid collisions
deepak1556 Jul 21, 2018
9264a00
Simplify EnsureProcessTerminated() implementations.
deepak1556 Jul 22, 2018
63006ae
REVIEW: Delete WidgetDelegate before widget is destroyed.
deepak1556 Jul 22, 2018
5b25c2d
Need new #include for base::UTF8ToUTF16
nornagon Jul 31, 2018
9a296fc
Fix code triggering new -Wmicrosoft-cast warning in M67
nornagon Jul 31, 2018
c6fbe5a
Fix path to blink resources
nornagon Jul 31, 2018
64e79ce
//printing/features/features.gni moved to buildflags.gni
nornagon Jul 31, 2018
d80ee51
printing compiles on windows, but is explosively wrong
nornagon Jul 31, 2018
f6080b0
Update test targets paths for Blink
alexeykuzmin Aug 20, 2018
186f8d1
gpu: Merge gpu_ipc_service_unittests into gpu_unittests
alexeykuzmin Aug 20, 2018
8bfad3a
build: use default value of the enable_widevine flag
alexeykuzmin Aug 27, 2018
1a9e253
fix: fix osr compilation on Windows
brenca Aug 30, 2018
9f6cf96
chore: fix a chromium-style error
alexeykuzmin Aug 28, 2018
11349eb
build: //service/viz mojo interfaces for osr
deepak1556 Aug 28, 2018
7589555
inspector: stop dragging platform pointer
alexeykuzmin Sep 4, 2018
829b230
fix: initialize tracing controller before starting platform (#14499)
nornagon Sep 8, 2018
917a905
fix: force SharedArrayBuffer feature to be enabled (#14498)
nornagon Sep 8, 2018
1ba7e36
ci: update Visual Studio version for AppVeyor
alexeykuzmin Sep 7, 2018
ba0a1cc
build: guard widevine related code behind flag
deepak1556 Sep 9, 2018
56f5d6f
FIXME: tests: disable a "unhandledrejection" test of the remote module
alexeykuzmin Sep 10, 2018
ce8e93b
tests: ignore nulls and undefined in the "util.promisify" test
alexeykuzmin Sep 10, 2018
f76a8c7
build: [m67] enable widevine support (#14519)
deepak1556 Sep 10, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 5 additions & 7 deletions BUILD.gn
Expand Up @@ -232,7 +232,7 @@ static_library("electron_lib") {
"//ppapi/shared_impl",
"//printing",
"//skia",
"//third_party/WebKit/public:blink",
"//third_party/blink/public:blink",
"//third_party/boringssl",
"//third_party/electron_node:node_lib",
"//third_party/leveldatabase",
Expand All @@ -258,7 +258,7 @@ static_library("electron_lib") {

# TODO(nornagon): replace usage of SchemeRegistry by an actually exported
# API of blink, then remove this from the include_dirs.
"//third_party/WebKit/Source",
"//third_party/blink/renderer",
]

defines = []
Expand Down Expand Up @@ -400,6 +400,7 @@ static_library("electron_lib") {
]
deps += [
"//components/viz/service",
"//services/viz/public/interfaces",
"//ui/compositor",
]
}
Expand Down Expand Up @@ -437,8 +438,6 @@ static_library("electron_lib") {

if (enable_widevine) {
sources += [
"//chrome/common/widevine_cdm_constants.cc",
"//chrome/common/widevine_cdm_constants.h",
"//chrome/renderer/media/chrome_key_systems.cc",
"//chrome/renderer/media/chrome_key_systems.h",
"//chrome/renderer/media/chrome_key_systems_provider.cc",
Expand Down Expand Up @@ -763,8 +762,8 @@ group("blink_unittests") {
testonly = true

deps = [
"//third_party/WebKit/public:all_blink",
"//third_party/WebKit/public:test_support",
"//third_party/blink/public:all_blink",
"//third_party/blink/public:test_support",
]
}

Expand All @@ -780,7 +779,6 @@ group("chromium_unittests") {
"//device:device_unittests",
"//gin:gin_unittests",
"//gpu:gpu_unittests",
"//gpu/ipc/service:gpu_ipc_service_unittests",
"//ipc:ipc_tests",
"//media:media_unittests",
"//media/capture:capture_unittests",
Expand Down
6 changes: 3 additions & 3 deletions DEPS
@@ -1,10 +1,10 @@
vars = {
'chromium_version':
'66.0.3359.181',
'67.0.3396.99',
'libchromiumcontent_revision':
'f3a3f588281aba034a0f1f85ca3c65eb5a3f7b66',
'5db6529f9663a48ee3e6f4265a6abe7806f1dfbf',
'node_version':
'6d1bdd3ebf860ff878a1b5db4fd26fdda3932e21',
'95bb1b1046a648994dfe85340aca21fee0179855',

'chromium_git':
'https://chromium.googlesource.com',
Expand Down
2 changes: 1 addition & 1 deletion appveyor-gn.yml
@@ -1,6 +1,6 @@
version: 1.0.{build}
build_cloud: libcc-20
image: libcc-20-vs2017-15.4.5
image: libcc-20-vs2017-15.7.4
environment:
GIT_CACHE_PATH: C:\Users\electron\libcc_cache
DISABLE_CRASH_REPORTER_TESTS: true
Expand Down
75 changes: 18 additions & 57 deletions atom/app/atom_content_client.cc
Expand Up @@ -18,7 +18,6 @@
#include "content/public/common/content_constants.h"
#include "content/public/common/pepper_plugin_info.h"
#include "content/public/common/user_agent.h"
#include "media/media_features.h"
#include "ppapi/shared_impl/ppapi_permissions.h"
#include "ui/base/l10n/l10n_util.h"
#include "url/url_constants.h"
Expand All @@ -27,8 +26,6 @@

#if defined(WIDEVINE_CDM_AVAILABLE)
#include "base/native_library.h"
#include "base/strings/stringprintf.h"
#include "chrome/common/widevine_cdm_constants.h"
#include "content/public/common/cdm_info.h"
#include "media/base/video_codecs.h"
#endif // defined(WIDEVINE_CDM_AVAILABLE)
Expand All @@ -43,69 +40,38 @@ namespace atom {
namespace {

#if defined(WIDEVINE_CDM_AVAILABLE)
bool IsWidevineAvailable(base::FilePath* adapter_path,
base::FilePath* cdm_path,
bool IsWidevineAvailable(base::FilePath* cdm_path,
std::vector<media::VideoCodec>* codecs_supported) {
static enum {
NOT_CHECKED,
FOUND,
NOT_FOUND,
} widevine_cdm_file_check = NOT_CHECKED;

base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
*adapter_path = command_line->GetSwitchValuePath(switches::kWidevineCdmPath);
if (!adapter_path->empty()) {
*cdm_path = adapter_path->DirName().AppendASCII(
base::GetNativeLibraryName(kWidevineCdmLibraryName));
if (widevine_cdm_file_check == NOT_CHECKED) {
widevine_cdm_file_check =
(base::PathExists(*adapter_path) && base::PathExists(*cdm_path))
? FOUND
: NOT_FOUND;
if (widevine_cdm_file_check == NOT_CHECKED) {
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
*cdm_path = command_line->GetSwitchValuePath(switches::kWidevineCdmPath);
if (!cdm_path->empty()) {
*cdm_path = cdm_path->AppendASCII(
base::GetNativeLibraryName(kWidevineCdmLibraryName));
widevine_cdm_file_check = base::PathExists(*cdm_path) ? FOUND : NOT_FOUND;
}
if (widevine_cdm_file_check == FOUND) {
// Add the supported codecs as if they came from the component manifest.
// This list must match the CDM that is being bundled with Chrome.
codecs_supported->push_back(media::VideoCodec::kCodecVP8);
codecs_supported->push_back(media::VideoCodec::kCodecVP9);
}

if (widevine_cdm_file_check == FOUND) {
// Add the supported codecs as if they came from the component manifest.
// This list must match the CDM that is being bundled with Chrome.
codecs_supported->push_back(media::VideoCodec::kCodecVP8);
codecs_supported->push_back(media::VideoCodec::kCodecVP9);
#if BUILDFLAG(USE_PROPRIETARY_CODECS)
codecs_supported->push_back(media::VideoCodec::kCodecH264);
codecs_supported->push_back(media::VideoCodec::kCodecH264);
#endif // BUILDFLAG(USE_PROPRIETARY_CODECS)

return true;
}
return true;
}

return false;
}

void AddWidevineAdapterFromCommandLine(
base::CommandLine* command_line,
std::vector<content::PepperPluginInfo>* plugins) {
base::FilePath adapter_path;
base::FilePath cdm_path;
std::vector<media::VideoCodec> video_codecs_supported;
if (IsWidevineAvailable(&adapter_path, &cdm_path, &video_codecs_supported)) {
auto cdm_version_string =
command_line->GetSwitchValueASCII(switches::kWidevineCdmVersion);
content::PepperPluginInfo info;
info.is_out_of_process = true;
info.path = adapter_path;
info.name = kWidevineCdmDisplayName;
info.description =
base::StringPrintf("%s (version: %s)", kWidevineCdmDescription,
cdm_version_string.c_str());
info.version = cdm_version_string;
info.permissions = kWidevineCdmPluginPermissions;

content::WebPluginMimeType mime_type(kWidevineCdmPluginMimeType,
kWidevineCdmPluginExtension,
kWidevineCdmPluginMimeTypeDescription);
info.mime_types.push_back(mime_type);

plugins->push_back(info);
}
}
#endif // defined(WIDEVINE_CDM_AVAILABLE)

#if defined(ENABLE_PEPPER_FLASH)
Expand Down Expand Up @@ -235,9 +201,6 @@ void AtomContentClient::AddPepperPlugins(
#if defined(ENABLE_PEPPER_FLASH)
AddPepperFlashFromCommandLine(command_line, plugins);
#endif // defined(ENABLE_PEPPER_FLASH)
#if defined(WIDEVINE_CDM_AVAILABLE)
AddWidevineAdapterFromCommandLine(command_line, plugins);
#endif // defined(WIDEVINE_CDM_AVAILABLE)
ComputeBuiltInPlugins(plugins);
}

Expand All @@ -246,12 +209,10 @@ void AtomContentClient::AddContentDecryptionModules(
std::vector<media::CdmHostFilePath>* cdm_host_file_paths) {
if (cdms) {
#if defined(WIDEVINE_CDM_AVAILABLE)
base::FilePath adapter_path;
base::FilePath cdm_path;
std::vector<media::VideoCodec> video_codecs_supported;
bool supports_persistent_license = false;
if (IsWidevineAvailable(&adapter_path, &cdm_path,
&video_codecs_supported)) {
if (IsWidevineAvailable(&cdm_path, &video_codecs_supported)) {
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
auto cdm_version_string =
command_line->GetSwitchValueASCII(switches::kWidevineCdmVersion);
Expand Down
2 changes: 1 addition & 1 deletion atom/app/atom_main_delegate.cc
Expand Up @@ -21,7 +21,7 @@
#include "base/logging.h"
#include "chrome/common/chrome_paths.h"
#include "content/public/common/content_switches.h"
#include "ipc/ipc_features.h"
#include "ipc/ipc_buildflags.h"
#include "services/service_manager/sandbox/switches.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
Expand Down
2 changes: 1 addition & 1 deletion atom/app/node_main.cc
Expand Up @@ -65,7 +65,7 @@ int NodeMain(int argc, char* argv[]) {

// Enable support for v8 inspector.
NodeDebugger node_debugger(env);
node_debugger.Start(gin_env.platform());
node_debugger.Start();

mate::Dictionary process(gin_env.isolate(), env->process_object());
#if defined(OS_WIN)
Expand Down
19 changes: 0 additions & 19 deletions atom/browser/api/atom_api_app.cc
Expand Up @@ -1112,30 +1112,11 @@ std::vector<mate::Dictionary> App::GetAppMetrics(v8::Isolate* isolate) {

for (const auto& process_metric : app_metrics_) {
mate::Dictionary pid_dict = mate::Dictionary::CreateEmpty(isolate);
mate::Dictionary memory_dict = mate::Dictionary::CreateEmpty(isolate);
mate::Dictionary cpu_dict = mate::Dictionary::CreateEmpty(isolate);

pid_dict.SetHidden("simple", true);
memory_dict.SetHidden("simple", true);
cpu_dict.SetHidden("simple", true);

memory_dict.Set(
"workingSetSize",
static_cast<double>(
process_metric.second->metrics->GetWorkingSetSize() >> 10));
memory_dict.Set(
"peakWorkingSetSize",
static_cast<double>(
process_metric.second->metrics->GetPeakWorkingSetSize() >> 10));

size_t private_bytes, shared_bytes;
if (process_metric.second->metrics->GetMemoryBytes(&private_bytes,
&shared_bytes)) {
memory_dict.Set("privateBytes", static_cast<double>(private_bytes >> 10));
memory_dict.Set("sharedBytes", static_cast<double>(shared_bytes >> 10));
}

pid_dict.Set("memory", memory_dict);
nornagon marked this conversation as resolved.
Show resolved Hide resolved
cpu_dict.Set(
"percentCPUUsage",
process_metric.second->metrics->GetPlatformIndependentCPUUsage() /
Expand Down
2 changes: 1 addition & 1 deletion atom/browser/api/atom_api_protocol.cc
Expand Up @@ -50,7 +50,7 @@ void RegisterStandardSchemes(const std::vector<std::string>& schemes,
// Dynamically register the schemes.
auto* policy = content::ChildProcessSecurityPolicy::GetInstance();
for (const std::string& scheme : schemes) {
url::AddStandardScheme(scheme.c_str(), url::SCHEME_WITHOUT_PORT);
url::AddStandardScheme(scheme.c_str(), url::SCHEME_WITH_HOST);
if (secure) {
url::AddSecureScheme(scheme.c_str());
}
Expand Down
7 changes: 5 additions & 2 deletions atom/browser/api/atom_api_session.cc
Expand Up @@ -47,7 +47,9 @@
#include "net/http/http_auth_handler_factory.h"
#include "net/http/http_auth_preferences.h"
#include "net/proxy_resolution/proxy_config_service_fixed.h"
#include "net/proxy_resolution/proxy_service.h"
#include "net/proxy_resolution/proxy_config_with_annotation.h"
#include "net/proxy_resolution/proxy_resolution_service.h"
#include "net/traffic_annotation/network_traffic_annotation.h"
#include "net/url_request/static_http_user_agent_settings.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
Expand Down Expand Up @@ -349,7 +351,8 @@ void SetProxyInIO(scoped_refptr<net::URLRequestContextGetter> getter,
auto* proxy_service =
getter->GetURLRequestContext()->proxy_resolution_service();
proxy_service->ResetConfigService(
base::WrapUnique(new net::ProxyConfigServiceFixed(config)));
base::WrapUnique(new net::ProxyConfigServiceFixed(
net::ProxyConfigWithAnnotation(config, NO_TRAFFIC_ANNOTATION_YET))));
// Refetches and applies the new pac script if provided.
proxy_service->ForceReloadProxyConfig();
RunCallbackInUI(callback);
Expand Down
23 changes: 14 additions & 9 deletions atom/browser/api/atom_api_web_contents.cc
Expand Up @@ -92,8 +92,8 @@
#include "native_mate/dictionary.h"
#include "native_mate/object_template_builder.h"
#include "net/url_request/url_request_context.h"
#include "third_party/WebKit/public/platform/WebInputEvent.h"
#include "third_party/WebKit/public/web/WebFindOptions.h"
#include "third_party/blink/public/platform/web_input_event.h"
#include "third_party/blink/public/web/web_find_options.h"
#include "ui/display/screen.h"
#include "ui/events/base_event_utils.h"

Expand Down Expand Up @@ -315,7 +315,8 @@ WebContents::WebContents(v8::Isolate* isolate,
: content::WebContentsObserver(web_contents), type_(type) {
const mate::Dictionary options = mate::Dictionary::CreateEmpty(isolate);
if (type == REMOTE) {
web_contents->SetUserAgentOverride(GetBrowserContext()->GetUserAgent());
web_contents->SetUserAgentOverride(GetBrowserContext()->GetUserAgent(),
false);
nornagon marked this conversation as resolved.
Show resolved Hide resolved
Init(isolate);
AttachAsUserData(web_contents);
InitZoomController(web_contents, options);
Expand Down Expand Up @@ -456,7 +457,8 @@ void WebContents::InitWithSessionAndOptions(v8::Isolate* isolate,
// Initialize zoom controller.
InitZoomController(web_contents, options);

web_contents->SetUserAgentOverride(GetBrowserContext()->GetUserAgent());
web_contents->SetUserAgentOverride(GetBrowserContext()->GetUserAgent(),
false);

if (IsGuest()) {
NativeWindow* owner_window = nullptr;
Expand Down Expand Up @@ -718,9 +720,12 @@ void WebContents::FindReply(content::WebContents* web_contents,
Emit("found-in-page", result);
}

bool WebContents::CheckMediaAccessPermission(content::WebContents* web_contents,
const GURL& security_origin,
content::MediaStreamType type) {
bool WebContents::CheckMediaAccessPermission(
content::RenderFrameHost* render_frame_host,
const GURL& security_origin,
content::MediaStreamType type) {
auto* web_contents =
content::WebContents::FromRenderFrameHost(render_frame_host);
auto* permission_helper =
WebContentsPermissionHelper::FromWebContents(web_contents);
return permission_helper->CheckMediaAccessPermission(security_origin, type);
Expand Down Expand Up @@ -1123,7 +1128,7 @@ void WebContents::LoadURL(const GURL& url, const mate::Dictionary& options) {

std::string user_agent;
if (options.Get("userAgent", &user_agent))
web_contents()->SetUserAgentOverride(user_agent);
web_contents()->SetUserAgentOverride(user_agent, false);
nornagon marked this conversation as resolved.
Show resolved Hide resolved

std::string extra_headers;
if (options.Get("extraHeaders", &extra_headers))
Expand Down Expand Up @@ -1233,7 +1238,7 @@ bool WebContents::IsCrashed() const {

void WebContents::SetUserAgent(const std::string& user_agent,
mate::Arguments* args) {
web_contents()->SetUserAgentOverride(user_agent);
web_contents()->SetUserAgentOverride(user_agent, false);
}

std::string WebContents::GetUserAgent() {
Expand Down
2 changes: 1 addition & 1 deletion atom/browser/api/atom_api_web_contents.h
Expand Up @@ -330,7 +330,7 @@ class WebContents : public mate::TrackableObject<WebContents>,
const gfx::Rect& selection_rect,
int active_match_ordinal,
bool final_update) override;
bool CheckMediaAccessPermission(content::WebContents* web_contents,
bool CheckMediaAccessPermission(content::RenderFrameHost* render_frame_host,
const GURL& security_origin,
content::MediaStreamType type) override;
void RequestMediaAccessPermission(
Expand Down