121 lines
5.0 KiB
Diff
121 lines
5.0 KiB
Diff
diff --git chrome/browser/download/download_prefs.cc chrome/browser/download/download_prefs.cc
|
|
index 578e66a7e8209..e25eff9c4e6d5 100644
|
|
--- chrome/browser/download/download_prefs.cc
|
|
+++ chrome/browser/download/download_prefs.cc
|
|
@@ -23,6 +23,7 @@
|
|
#include "base/strings/utf_string_conversions.h"
|
|
#include "build/build_config.h"
|
|
#include "build/chromeos_buildflags.h"
|
|
+#include "cef/libcef/features/runtime.h"
|
|
#include "chrome/browser/download/chrome_download_manager_delegate.h"
|
|
#include "chrome/browser/download/download_core_service_factory.h"
|
|
#include "chrome/browser/download/download_core_service_impl.h"
|
|
@@ -63,6 +64,10 @@
|
|
#include "chrome/browser/download/bubble/download_bubble_prefs.h"
|
|
#endif
|
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
|
+#include "cef/libcef/browser/alloy/alloy_download_util.h"
|
|
+#endif
|
|
+
|
|
using content::BrowserContext;
|
|
using content::BrowserThread;
|
|
using content::DownloadManager;
|
|
@@ -360,6 +365,11 @@ DownloadPrefs* DownloadPrefs::FromDownloadManager(
|
|
// static
|
|
DownloadPrefs* DownloadPrefs::FromBrowserContext(
|
|
content::BrowserContext* context) {
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
|
+ if (cef::IsAlloyRuntimeEnabled()) {
|
|
+ return alloy::GetDownloadPrefsFromBrowserContext(context);
|
|
+ }
|
|
+#endif
|
|
return FromDownloadManager(context->GetDownloadManager());
|
|
}
|
|
|
|
diff --git chrome/browser/printing/print_preview_dialog_controller.cc chrome/browser/printing/print_preview_dialog_controller.cc
|
|
index 1a6740b36343b..6c1a3fe19cf07 100644
|
|
--- chrome/browser/printing/print_preview_dialog_controller.cc
|
|
+++ chrome/browser/printing/print_preview_dialog_controller.cc
|
|
@@ -15,6 +15,7 @@
|
|
#include "build/branding_buildflags.h"
|
|
#include "build/build_config.h"
|
|
#include "build/chromeos_buildflags.h"
|
|
+#include "cef/libcef/features/features.h"
|
|
#include "chrome/browser/browser_process.h"
|
|
#include "chrome/browser/printing/print_view_manager.h"
|
|
#include "chrome/browser/printing/print_view_manager_base.h"
|
|
diff --git chrome/browser/resources/print_preview/ui/destination_dialog.html chrome/browser/resources/print_preview/ui/destination_dialog.html
|
|
index 5d1658999d5bb..d1b7b7288c946 100644
|
|
--- chrome/browser/resources/print_preview/ui/destination_dialog.html
|
|
+++ chrome/browser/resources/print_preview/ui/destination_dialog.html
|
|
@@ -15,10 +15,7 @@
|
|
</print-preview-destination-list>
|
|
</div>
|
|
<div slot="button-container">
|
|
- <cr-button on-click="onManageButtonClick_">
|
|
- $i18n{manage}
|
|
- <iron-icon icon="cr:open-in-new" id="manageIcon"></iron-icon>
|
|
- </cr-button>
|
|
+ <div></div>
|
|
<cr-button class="cancel-button" on-click="onCancelButtonClick_">
|
|
$i18n{cancel}
|
|
</cr-button>
|
|
diff --git chrome/browser/ui/webui/constrained_web_dialog_ui.cc chrome/browser/ui/webui/constrained_web_dialog_ui.cc
|
|
index d5767fe27db0d..5778847a68208 100644
|
|
--- chrome/browser/ui/webui/constrained_web_dialog_ui.cc
|
|
+++ chrome/browser/ui/webui/constrained_web_dialog_ui.cc
|
|
@@ -13,6 +13,7 @@
|
|
#include "base/memory/ptr_util.h"
|
|
#include "base/memory/raw_ptr.h"
|
|
#include "base/values.h"
|
|
+#include "cef/libcef/features/runtime.h"
|
|
#include "content/public/browser/notification_service.h"
|
|
#include "content/public/browser/render_frame_host.h"
|
|
#include "content/public/browser/web_contents.h"
|
|
@@ -57,7 +58,9 @@ class ConstrainedWebDialogDelegateUserData
|
|
ConstrainedWebDialogUI::ConstrainedWebDialogUI(content::WebUI* web_ui)
|
|
: WebUIController(web_ui) {
|
|
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
|
+ if (!cef::IsAlloyRuntimeEnabled()) {
|
|
extensions::TabHelper::CreateForWebContents(web_ui->GetWebContents());
|
|
+ }
|
|
#endif
|
|
}
|
|
|
|
diff --git chrome/browser/ui/webui/print_preview/print_preview_ui.cc chrome/browser/ui/webui/print_preview/print_preview_ui.cc
|
|
index 9e616396c9c97..87803d244eda3 100644
|
|
--- chrome/browser/ui/webui/print_preview/print_preview_ui.cc
|
|
+++ chrome/browser/ui/webui/print_preview/print_preview_ui.cc
|
|
@@ -24,6 +24,7 @@
|
|
#include "base/values.h"
|
|
#include "build/build_config.h"
|
|
#include "build/chromeos_buildflags.h"
|
|
+#include "cef/libcef/features/runtime.h"
|
|
#include "chrome/browser/browser_process.h"
|
|
#include "chrome/browser/enterprise/browser_management/management_service_factory.h"
|
|
#include "chrome/browser/pdf/pdf_extension_util.h"
|
|
@@ -106,6 +107,13 @@ const char16_t kBasicPrintShortcut[] = u"(\u2325\u2318P)";
|
|
const char16_t kBasicPrintShortcut[] = u"(Ctrl+Shift+P)";
|
|
#endif
|
|
|
|
+const char16_t* GetBasicPrintShortcut() {
|
|
+ if (cef::IsAlloyRuntimeEnabled()) {
|
|
+ return u"";
|
|
+ }
|
|
+ return kBasicPrintShortcut;
|
|
+}
|
|
+
|
|
constexpr char kInvalidArgsForDidStartPreview[] =
|
|
"Invalid arguments for DidStartPreview";
|
|
constexpr char kInvalidPageIndexForDidPreviewPage[] =
|
|
@@ -303,7 +311,7 @@ void AddPrintPreviewStrings(content::WebUIDataSource* source) {
|
|
source->AddLocalizedStrings(kLocalizedStrings);
|
|
|
|
#if !BUILDFLAG(IS_CHROMEOS)
|
|
- const std::u16string shortcut_text(kBasicPrintShortcut);
|
|
+ const std::u16string shortcut_text(GetBasicPrintShortcut());
|
|
source->AddString("systemDialogOption",
|
|
l10n_util::GetStringFUTF16(
|
|
IDS_PRINT_PREVIEW_SYSTEM_DIALOG_OPTION, shortcut_text));
|