refactor: more cleanup of chromium_src (#15424)

This commit is contained in:
Milan Burda 2018-11-05 15:29:33 +01:00 committed by John Kleinschmidt
parent c422011d58
commit a19d20cfb8
13 changed files with 54 additions and 301 deletions

View file

@ -75,3 +75,4 @@ tts.patch
color_chooser.patch
printing.patch
verbose_generate_breakpad_symbols.patch
chrome_process_finder.patch

View file

@ -0,0 +1,41 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Milan Burda <miburda@microsoft.com>
Date: Fri, 26 Oct 2018 20:45:49 +0200
Subject: chrome_process_finder.patch
Fix some problems when using app.makeSingleInstance on POSIX systems
* The original command line of new instances are passed instead
of the one modified by Chromium.
* The command line is passed as Array.
Reference: https://github.com/electron/electron/pull/3175
diff --git a/chrome/browser/win/chrome_process_finder.cc b/chrome/browser/win/chrome_process_finder.cc
index 4fdea2af27020303a66a747304c5ecce5cc698d5..598ba8171631dbcf7ad23bc4b5c74a750bbaa47c 100644
--- a/chrome/browser/win/chrome_process_finder.cc
+++ b/chrome/browser/win/chrome_process_finder.cc
@@ -43,15 +43,6 @@ NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window,
if (!thread_id || !process_id)
return NOTIFY_FAILED;
- base::CommandLine command_line(*base::CommandLine::ForCurrentProcess());
- command_line.AppendSwitchASCII(
- switches::kOriginalProcessStartTime,
- base::Int64ToString(
- base::CurrentProcessInfo::CreationTime().ToInternalValue()));
-
- if (fast_start)
- command_line.AppendSwitch(switches::kFastStart);
-
// Send the command line to the remote chrome window.
// Format is "START\0<<<current directory>>>\0<<<commandline>>>".
std::wstring to_send(L"START\0", 6); // want the NULL in the string.
@@ -60,7 +51,7 @@ NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window,
return NOTIFY_FAILED;
to_send.append(cur_dir.value());
to_send.append(L"\0", 1); // Null separator.
- to_send.append(command_line.GetCommandLineString());
+ to_send.append(::GetCommandLineW());
to_send.append(L"\0", 1); // Null separator.
// Allow the current running browser window to make itself the foreground

View file

@ -7,10 +7,10 @@ Backports https://chromium-review.googlesource.com/c/chromium/src/+/1161391
Fixes webview not working after renderer process restarted.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 88211169a7d731cb805f34c48ae4caf2fdcd1c84..7b2715aea2afb9e939a6d5cf7fa7ec23f330194a 100644
index 64ad6ca91d9331a09d09f7e29b7c24a0c12852a2..ec3d1ccbad7e3e4184205f87b6b3fb7dcd4c07f2 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4906,6 +4906,12 @@ void WebContentsImpl::NotifyViewSwapped(RenderViewHost* old_host,
@@ -4886,6 +4886,12 @@ void WebContentsImpl::NotifyViewSwapped(RenderViewHost* old_host,
view_->RenderViewHostChanged(old_host, new_host);