diff options
author | scottmg <scottmg@chromium.org> | 2016-03-17 14:42:59 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-17 21:44:07 +0000 |
commit | fbb8280085f05360997eeab81d4e042928062ef6 (patch) | |
tree | 0e771ab513746e8ae0aa91c713c4a82153b988e6 | |
parent | 1bbe2d3a6aa7e138eb968dafd058efb8c440a84d (diff) | |
download | chromium_src-fbb8280085f05360997eeab81d4e042928062ef6.zip chromium_src-fbb8280085f05360997eeab81d4e042928062ef6.tar.gz chromium_src-fbb8280085f05360997eeab81d4e042928062ef6.tar.bz2 |
Remove hidePrintWithSystemDialog disableability
Only used for Metro on Windows, which no longer exists.
R=dpapad@chromium.org
BUG=558054
Review URL: https://codereview.chromium.org/1809213002
Cr-Commit-Position: refs/heads/master@{#381803}
4 files changed, 1 insertions, 30 deletions
diff --git a/chrome/browser/resources/print_preview/native_layer.js b/chrome/browser/resources/print_preview/native_layer.js index 7bda60e..2cf0eaf 100644 --- a/chrome/browser/resources/print_preview/native_layer.js +++ b/chrome/browser/resources/print_preview/native_layer.js @@ -481,7 +481,6 @@ cr.define('print_preview', function() { var nativeInitialSettings = new print_preview.NativeInitialSettings( initialSettings['printAutomaticallyInKioskMode'] || false, initialSettings['appKioskMode'] || false, - initialSettings['hidePrintWithSystemDialogLink'] || false, numberFormatSymbols[0] || ',', numberFormatSymbols[1] || '.', unitType, @@ -938,7 +937,6 @@ cr.define('print_preview', function() { function NativeInitialSettings( isInKioskAutoPrintMode, isInAppKioskMode, - hidePrintWithSystemDialogLink, thousandsDelimeter, decimalDelimeter, unitType, @@ -965,13 +963,6 @@ cr.define('print_preview', function() { this.isInAppKioskMode_ = isInAppKioskMode; /** - * Whether we should hide the link which shows the system print dialog. - * @type {boolean} - * @private - */ - this.hidePrintWithSystemDialogLink_ = hidePrintWithSystemDialogLink; - - /** * Character delimeter of thousands digits. * @type {string} * @private @@ -1059,14 +1050,6 @@ cr.define('print_preview', function() { return this.isInAppKioskMode_; }, - /** - * @return {boolean} Whether we should hide the link which shows the - system print dialog. - */ - get hidePrintWithSystemDialogLink() { - return this.hidePrintWithSystemDialogLink_; - }, - /** @return {string} Character delimeter of thousands digits. */ get thousandsDelimeter() { return this.thousandsDelimeter_; diff --git a/chrome/browser/resources/print_preview/print_preview.js b/chrome/browser/resources/print_preview/print_preview.js index f4936f3..41a8178 100644 --- a/chrome/browser/resources/print_preview/print_preview.js +++ b/chrome/browser/resources/print_preview/print_preview.js @@ -651,8 +651,7 @@ cr.define('print_preview', function() { this.appState_.setInitialized(); $('document-title').innerText = settings.documentTitle; - this.hideSystemDialogLink_ = settings.hidePrintWithSystemDialogLink || - settings.isInAppKioskMode; + this.hideSystemDialogLink_ = settings.isInAppKioskMode; if ($('system-dialog-link')) { setIsVisible($('system-dialog-link'), this.shouldShowSystemDialogLink_()); diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc index 10afc73..57ec8ea 100644 --- a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc +++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc @@ -167,9 +167,6 @@ const char kPrintAutomaticallyInKioskMode[] = "printAutomaticallyInKioskMode"; const char kAppKioskMode[] = "appKioskMode"; // Dictionary field to store Cloud Print base URL. const char kCloudPrintUrl[] = "cloudPrintUrl"; -#if defined(OS_WIN) -const char kHidePrintWithSystemDialogLink[] = "hidePrintWithSystemDialogLink"; -#endif // Name of a dictionary field holding the state of selection for document. const char kDocumentHasSelection[] = "documentHasSelection"; // Dictionary field holding the default destination selection rules. @@ -1293,13 +1290,6 @@ void PrintPreviewHandler::SendInitialSettings( cmdline->HasSwitch(switches::kKioskModePrinting)); initial_settings.SetBoolean(kAppKioskMode, chrome::IsRunningInForcedAppMode()); -#if defined(OS_WIN) - // In Win8 metro, the system print dialog can only open on the desktop. Doing - // so will cause the browser to appear hung, so we don't show the link in - // metro. - bool is_ash = (chrome::GetActiveDesktop() == chrome::HOST_DESKTOP_TYPE_ASH); - initial_settings.SetBoolean(kHidePrintWithSystemDialogLink, is_ash); -#endif if (prefs) { const std::string rules_str = prefs->GetString(prefs::kPrintPreviewDefaultDestinationSelectionRules); diff --git a/chrome/test/data/webui/print_preview.js b/chrome/test/data/webui/print_preview.js index 7d84ef9..5b93bd2 100644 --- a/chrome/test/data/webui/print_preview.js +++ b/chrome/test/data/webui/print_preview.js @@ -172,7 +172,6 @@ PrintPreviewWebUITest.prototype = { this.initialSettings_ = new print_preview.NativeInitialSettings( false /*isInKioskAutoPrintMode*/, false /*isInAppKioskMode*/, - false /*hidePrintWithSystemDialogLink*/, ',' /*thousandsDelimeter*/, '.' /*decimalDelimeter*/, 1 /*unitType*/, |