chore: bump chromium to 92.0.4511.0 (master) (#29173)
This commit is contained in:
parent
d79ebc6dc6
commit
039f3d5cd2
80 changed files with 426 additions and 322 deletions
|
@ -328,8 +328,7 @@ Session::Session(v8::Isolate* isolate, ElectronBrowserContext* browser_context)
|
|||
network_emulation_token_(base::UnguessableToken::Create()),
|
||||
browser_context_(browser_context) {
|
||||
// Observe DownloadManager to get download notifications.
|
||||
content::BrowserContext::GetDownloadManager(browser_context)
|
||||
->AddObserver(this);
|
||||
browser_context->GetDownloadManager()->AddObserver(this);
|
||||
|
||||
new SessionPreferences(browser_context);
|
||||
|
||||
|
@ -352,8 +351,7 @@ Session::Session(v8::Isolate* isolate, ElectronBrowserContext* browser_context)
|
|||
}
|
||||
|
||||
Session::~Session() {
|
||||
content::BrowserContext::GetDownloadManager(browser_context())
|
||||
->RemoveObserver(this);
|
||||
browser_context()->GetDownloadManager()->RemoveObserver(this);
|
||||
|
||||
#if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
|
||||
SpellcheckService* service =
|
||||
|
@ -726,8 +724,7 @@ v8::Local<v8::Promise> Session::GetBlobData(v8::Isolate* isolate,
|
|||
}
|
||||
|
||||
void Session::DownloadURL(const GURL& url) {
|
||||
auto* download_manager =
|
||||
content::BrowserContext::GetDownloadManager(browser_context());
|
||||
auto* download_manager = browser_context()->GetDownloadManager();
|
||||
auto download_params = std::make_unique<download::DownloadUrlParameters>(
|
||||
url, MISSING_TRAFFIC_ANNOTATION);
|
||||
download_manager->DownloadUrl(std::move(download_params));
|
||||
|
@ -757,8 +754,7 @@ void Session::CreateInterruptedDownload(const gin_helper::Dictionary& options) {
|
|||
isolate_, "Must pass an offset value less than length.")));
|
||||
return;
|
||||
}
|
||||
auto* download_manager =
|
||||
content::BrowserContext::GetDownloadManager(browser_context());
|
||||
auto* download_manager = browser_context()->GetDownloadManager();
|
||||
download_manager->GetNextId(base::BindRepeating(
|
||||
&DownloadIdCallback, download_manager, path, url_chain, mime_type, offset,
|
||||
length, last_modified, etag, base::Time::FromDoubleT(start_time)));
|
||||
|
|
|
@ -162,11 +162,11 @@
|
|||
#endif
|
||||
|
||||
#if BUILDFLAG(ENABLE_PRINTING)
|
||||
#include "chrome/browser/printing/print_view_manager_basic.h"
|
||||
#include "components/printing/browser/print_manager_utils.h"
|
||||
#include "printing/backend/print_backend.h" // nogncheck
|
||||
#include "printing/mojom/print.mojom.h"
|
||||
#include "shell/browser/printing/print_preview_message_handler.h"
|
||||
#include "shell/browser/printing/print_view_manager_electron.h"
|
||||
|
||||
#if defined(OS_WIN)
|
||||
#include "printing/backend/win_helper.h"
|
||||
|
@ -557,7 +557,7 @@ void AppendToFile(const base::FilePath& path, const std::string& content) {
|
|||
base::BlockingType::WILL_BLOCK);
|
||||
DCHECK(!path.empty());
|
||||
|
||||
base::AppendToFile(path, content.data(), content.size());
|
||||
base::AppendToFile(path, content);
|
||||
}
|
||||
|
||||
PrefService* GetPrefService(content::WebContents* web_contents) {
|
||||
|
@ -886,7 +886,7 @@ void WebContents::InitWithWebContents(content::WebContents* web_contents,
|
|||
|
||||
#if BUILDFLAG(ENABLE_PRINTING)
|
||||
PrintPreviewMessageHandler::CreateForWebContents(web_contents);
|
||||
printing::PrintViewManagerBasic::CreateForWebContents(web_contents);
|
||||
PrintViewManagerElectron::CreateForWebContents(web_contents);
|
||||
printing::CreateCompositeClientIfNeeded(web_contents,
|
||||
browser_context->GetUserAgent());
|
||||
#endif
|
||||
|
@ -2014,8 +2014,7 @@ void WebContents::ReloadIgnoringCache() {
|
|||
|
||||
void WebContents::DownloadURL(const GURL& url) {
|
||||
auto* browser_context = web_contents()->GetBrowserContext();
|
||||
auto* download_manager =
|
||||
content::BrowserContext::GetDownloadManager(browser_context);
|
||||
auto* download_manager = browser_context->GetDownloadManager();
|
||||
std::unique_ptr<download::DownloadUrlParameters> download_params(
|
||||
content::DownloadRequestUtils::CreateDownloadForWebContentsMainFrame(
|
||||
web_contents(), url, MISSING_TRAFFIC_ANNOTATION));
|
||||
|
@ -2366,7 +2365,7 @@ void WebContents::OnGetDefaultPrinter(
|
|||
bool silent,
|
||||
std::u16string default_printer) {
|
||||
// The content::WebContents might be already deleted at this point, and the
|
||||
// PrintViewManagerBasic class does not do null check.
|
||||
// PrintViewManagerElectron class does not do null check.
|
||||
if (!web_contents()) {
|
||||
if (print_callback)
|
||||
std::move(print_callback).Run(false, "failed");
|
||||
|
@ -2386,7 +2385,10 @@ void WebContents::OnGetDefaultPrinter(
|
|||
print_settings.SetStringKey(printing::kSettingDeviceName, printer_name);
|
||||
|
||||
auto* print_view_manager =
|
||||
printing::PrintViewManagerBasic::FromWebContents(web_contents());
|
||||
PrintViewManagerElectron::FromWebContents(web_contents());
|
||||
if (!print_view_manager)
|
||||
return;
|
||||
|
||||
auto* focused_frame = web_contents()->GetFocusedFrame();
|
||||
auto* rfh = focused_frame && focused_frame->HasSelection()
|
||||
? focused_frame
|
||||
|
|
|
@ -43,8 +43,8 @@
|
|||
#include "ui/gfx/image/image.h"
|
||||
|
||||
#if BUILDFLAG(ENABLE_PRINTING)
|
||||
#include "chrome/browser/printing/print_view_manager_basic.h"
|
||||
#include "shell/browser/printing/print_preview_message_handler.h"
|
||||
#include "shell/browser/printing/print_view_manager_electron.h"
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
||||
|
|
|
@ -31,8 +31,8 @@ void SavePageHandler::OnDownloadCreated(content::DownloadManager* manager,
|
|||
|
||||
bool SavePageHandler::Handle(const base::FilePath& full_path,
|
||||
const content::SavePageType& save_type) {
|
||||
auto* download_manager = content::BrowserContext::GetDownloadManager(
|
||||
web_contents_->GetBrowserContext());
|
||||
auto* download_manager =
|
||||
web_contents_->GetBrowserContext()->GetDownloadManager();
|
||||
download_manager->AddObserver(this);
|
||||
// Chromium will create a 'foo_files' directory under the directory of saving
|
||||
// page 'foo.html' for holding other resource files of 'foo.html'.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue