2019-07-17 20:47:27 +02:00
|
|
|
diff --git chrome/browser/printing/print_preview_dialog_controller.cc chrome/browser/printing/print_preview_dialog_controller.cc
|
2024-02-22 19:36:15 +01:00
|
|
|
index 54efe456fd86e..a685c4e0722cc 100644
|
2019-07-17 20:47:27 +02:00
|
|
|
--- chrome/browser/printing/print_preview_dialog_controller.cc
|
|
|
|
+++ chrome/browser/printing/print_preview_dialog_controller.cc
|
2023-10-19 20:08:48 +02:00
|
|
|
@@ -16,6 +16,7 @@
|
2019-10-01 15:55:16 +02:00
|
|
|
#include "build/branding_buildflags.h"
|
2019-07-17 20:47:27 +02:00
|
|
|
#include "build/build_config.h"
|
2021-01-28 00:13:12 +01:00
|
|
|
#include "build/chromeos_buildflags.h"
|
2019-07-17 20:47:27 +02:00
|
|
|
+#include "cef/libcef/features/features.h"
|
|
|
|
#include "chrome/browser/browser_process.h"
|
2019-09-04 17:13:32 +02:00
|
|
|
#include "chrome/browser/printing/print_view_manager.h"
|
2023-05-30 10:55:32 +02:00
|
|
|
#include "chrome/browser/printing/print_view_manager_base.h"
|
2019-07-17 20:47:27 +02:00
|
|
|
diff --git chrome/browser/resources/print_preview/ui/destination_dialog.html chrome/browser/resources/print_preview/ui/destination_dialog.html
|
2022-05-19 12:28:44 +02:00
|
|
|
index 5d1658999d5bb..d1b7b7288c946 100644
|
2019-07-17 20:47:27 +02:00
|
|
|
--- chrome/browser/resources/print_preview/ui/destination_dialog.html
|
|
|
|
+++ chrome/browser/resources/print_preview/ui/destination_dialog.html
|
2022-04-21 20:58:48 +02:00
|
|
|
@@ -15,10 +15,7 @@
|
2021-01-28 00:13:12 +01:00
|
|
|
</print-preview-destination-list>
|
2020-02-10 18:10:17 +01:00
|
|
|
</div>
|
|
|
|
<div slot="button-container">
|
2020-12-02 23:31:49 +01:00
|
|
|
- <cr-button on-click="onManageButtonClick_">
|
2020-02-10 18:10:17 +01:00
|
|
|
- $i18n{manage}
|
2020-12-02 23:31:49 +01:00
|
|
|
- <iron-icon icon="cr:open-in-new" id="manageIcon"></iron-icon>
|
2020-02-10 18:10:17 +01:00
|
|
|
- </cr-button>
|
|
|
|
+ <div></div>
|
|
|
|
<cr-button class="cancel-button" on-click="onCancelButtonClick_">
|
|
|
|
$i18n{cancel}
|
|
|
|
</cr-button>
|
2019-07-17 20:47:27 +02:00
|
|
|
diff --git chrome/browser/ui/webui/constrained_web_dialog_ui.cc chrome/browser/ui/webui/constrained_web_dialog_ui.cc
|
2024-04-30 03:09:17 +02:00
|
|
|
index c85248ab0d0a0..1595d2aa62bce 100644
|
2019-07-17 20:47:27 +02:00
|
|
|
--- chrome/browser/ui/webui/constrained_web_dialog_ui.cc
|
|
|
|
+++ chrome/browser/ui/webui/constrained_web_dialog_ui.cc
|
2022-02-16 22:26:44 +01:00
|
|
|
@@ -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/render_frame_host.h"
|
|
|
|
#include "content/public/browser/web_contents.h"
|
2023-11-21 20:17:55 +01:00
|
|
|
#include "content/public/browser/web_ui.h"
|
2024-04-30 03:09:17 +02:00
|
|
|
@@ -56,7 +57,13 @@ class ConstrainedWebDialogDelegateUserData
|
2019-07-17 20:47:27 +02:00
|
|
|
ConstrainedWebDialogUI::ConstrainedWebDialogUI(content::WebUI* web_ui)
|
|
|
|
: WebUIController(web_ui) {
|
|
|
|
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
2024-04-30 03:09:17 +02:00
|
|
|
+#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
2022-02-16 22:26:44 +01:00
|
|
|
+ if (!cef::IsAlloyRuntimeEnabled()) {
|
2024-04-30 03:09:17 +02:00
|
|
|
+#endif
|
2019-07-17 20:47:27 +02:00
|
|
|
extensions::TabHelper::CreateForWebContents(web_ui->GetWebContents());
|
2024-04-30 03:09:17 +02:00
|
|
|
+#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
2022-02-16 22:26:44 +01:00
|
|
|
+ }
|
2024-04-30 03:09:17 +02:00
|
|
|
+#endif
|
2019-07-17 20:47:27 +02:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
diff --git chrome/browser/ui/webui/print_preview/print_preview_ui.cc chrome/browser/ui/webui/print_preview/print_preview_ui.cc
|
2024-04-30 03:09:17 +02:00
|
|
|
index 449f6f2db551e..96cc73b2ca43b 100644
|
2019-07-17 20:47:27 +02:00
|
|
|
--- chrome/browser/ui/webui/print_preview/print_preview_ui.cc
|
|
|
|
+++ chrome/browser/ui/webui/print_preview/print_preview_ui.cc
|
2023-11-21 20:17:55 +01:00
|
|
|
@@ -25,6 +25,7 @@
|
2019-07-17 20:47:27 +02:00
|
|
|
#include "base/values.h"
|
|
|
|
#include "build/build_config.h"
|
2021-01-28 00:13:12 +01:00
|
|
|
#include "build/chromeos_buildflags.h"
|
2021-06-04 03:34:56 +02:00
|
|
|
+#include "cef/libcef/features/runtime.h"
|
2019-07-17 20:47:27 +02:00
|
|
|
#include "chrome/browser/browser_process.h"
|
2023-09-15 21:51:43 +02:00
|
|
|
#include "chrome/browser/enterprise/browser_management/management_service_factory.h"
|
2020-07-08 19:23:29 +02:00
|
|
|
#include "chrome/browser/pdf/pdf_extension_util.h"
|
2024-04-30 03:09:17 +02:00
|
|
|
@@ -109,6 +110,15 @@ const char16_t kBasicPrintShortcut[] = u"(\u2325\u2318P)";
|
2022-08-23 03:37:40 +02:00
|
|
|
const char16_t kBasicPrintShortcut[] = u"(Ctrl+Shift+P)";
|
2019-07-17 20:47:27 +02:00
|
|
|
#endif
|
|
|
|
|
2021-06-04 03:34:56 +02:00
|
|
|
+const char16_t* GetBasicPrintShortcut() {
|
2024-04-30 03:09:17 +02:00
|
|
|
+#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
2021-06-04 03:34:56 +02:00
|
|
|
+ if (cef::IsAlloyRuntimeEnabled()) {
|
|
|
|
+ return u"";
|
|
|
|
+ }
|
2024-04-30 03:09:17 +02:00
|
|
|
+#endif
|
2021-06-04 03:34:56 +02:00
|
|
|
+ return kBasicPrintShortcut;
|
|
|
|
+}
|
|
|
|
+
|
2021-03-04 23:36:57 +01:00
|
|
|
constexpr char kInvalidArgsForDidStartPreview[] =
|
|
|
|
"Invalid arguments for DidStartPreview";
|
2023-09-15 21:51:43 +02:00
|
|
|
constexpr char kInvalidPageIndexForDidPreviewPage[] =
|
2024-04-30 03:09:17 +02:00
|
|
|
@@ -310,7 +320,7 @@ void AddPrintPreviewStrings(content::WebUIDataSource* source) {
|
2022-04-21 20:58:48 +02:00
|
|
|
source->AddLocalizedStrings(kLocalizedStrings);
|
2021-06-04 03:34:56 +02:00
|
|
|
|
2022-01-25 21:26:51 +01:00
|
|
|
#if !BUILDFLAG(IS_CHROMEOS)
|
2021-06-04 03:34:56 +02:00
|
|
|
- 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));
|