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..caa6985e874c750c51483c99dc0fd903e149ada5 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,17 @@ 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", |
Dan Beam
2016/09/21 20:56:25
what do you think about this?
#if defined(OS_CHRO
xdai1
2016/09/21 23:38:53
Done.
|
+ chrome::kChromeUIMdCupsSettingsURL); |
+#else |
+ source->AddBoolean("showLocalManageButton", true); |
Dan Beam
2016/09/21 19:12:02
i'm confused. why should this be true on !chromeo
xdai1
2016/09/21 19:56:24
"Manage" button has been on other systems before t
|
+#endif |
return source; |
} |