Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(512)

Unified Diff: chrome/browser/ui/webui/print_preview/print_preview_ui.cc

Issue 2351023002: [CUPS] Add a "Manage..." button in the local destinations section of Print Preview Dialog on Chrome… (Closed)
Patch Set: Address dbeam@'s comments. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/print_preview/print_preview_ui.cc
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_ui.cc b/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
index 33422abbf9765fdaeaa31eed7545a273b8b7e51d..8a797b72abc32838a7217e752e0c0ecb9abd6af5 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
+++ b/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
@@ -42,6 +42,13 @@
#include "ui/web_dialogs/web_dialog_delegate.h"
#include "ui/web_dialogs/web_dialog_ui.h"
+#if defined(OS_CHROMEOS)
+#include "base/command_line.h"
+#include "base/feature_list.h"
+#include "chrome/common/chrome_features.h"
+#include "chrome/common/chrome_switches.h"
+#endif
+
using content::WebContents;
using printing::PageSizeMargins;
@@ -393,6 +400,15 @@ content::WebUIDataSource* CreatePrintPreviewUISource() {
source->OverrideContentSecurityPolicyObjectSrc("object-src 'self';");
source->AddLocalizedString("moreOptionsLabel", IDS_MORE_OPTIONS_LABEL);
source->AddLocalizedString("lessOptionsLabel", IDS_LESS_OPTIONS_LABEL);
+#if defined(OS_CHROMEOS)
+ source->AddBoolean("showLocalManageButton",
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
+ ::switches::kEnableNativeCups) &&
+ base::FeatureList::IsEnabled(
+ features::kMaterialDesignSettings));
+ source->AddString("localPrintersManagementURL",
+ chrome::kChromeUIMdCupsSettingsURL);
+#endif
return source;
}

Powered by Google App Engine
This is Rietveld 408576698