Commit fbb82800 authored by scottmg's avatar scottmg Committed by Commit bot

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}
parent 1bbe2d3a
...@@ -481,7 +481,6 @@ cr.define('print_preview', function() { ...@@ -481,7 +481,6 @@ cr.define('print_preview', function() {
var nativeInitialSettings = new print_preview.NativeInitialSettings( var nativeInitialSettings = new print_preview.NativeInitialSettings(
initialSettings['printAutomaticallyInKioskMode'] || false, initialSettings['printAutomaticallyInKioskMode'] || false,
initialSettings['appKioskMode'] || false, initialSettings['appKioskMode'] || false,
initialSettings['hidePrintWithSystemDialogLink'] || false,
numberFormatSymbols[0] || ',', numberFormatSymbols[0] || ',',
numberFormatSymbols[1] || '.', numberFormatSymbols[1] || '.',
unitType, unitType,
...@@ -938,7 +937,6 @@ cr.define('print_preview', function() { ...@@ -938,7 +937,6 @@ cr.define('print_preview', function() {
function NativeInitialSettings( function NativeInitialSettings(
isInKioskAutoPrintMode, isInKioskAutoPrintMode,
isInAppKioskMode, isInAppKioskMode,
hidePrintWithSystemDialogLink,
thousandsDelimeter, thousandsDelimeter,
decimalDelimeter, decimalDelimeter,
unitType, unitType,
...@@ -964,13 +962,6 @@ cr.define('print_preview', function() { ...@@ -964,13 +962,6 @@ cr.define('print_preview', function() {
*/ */
this.isInAppKioskMode_ = isInAppKioskMode; 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. * Character delimeter of thousands digits.
* @type {string} * @type {string}
...@@ -1059,14 +1050,6 @@ cr.define('print_preview', function() { ...@@ -1059,14 +1050,6 @@ cr.define('print_preview', function() {
return this.isInAppKioskMode_; 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. */ /** @return {string} Character delimeter of thousands digits. */
get thousandsDelimeter() { get thousandsDelimeter() {
return this.thousandsDelimeter_; return this.thousandsDelimeter_;
......
...@@ -651,8 +651,7 @@ cr.define('print_preview', function() { ...@@ -651,8 +651,7 @@ cr.define('print_preview', function() {
this.appState_.setInitialized(); this.appState_.setInitialized();
$('document-title').innerText = settings.documentTitle; $('document-title').innerText = settings.documentTitle;
this.hideSystemDialogLink_ = settings.hidePrintWithSystemDialogLink || this.hideSystemDialogLink_ = settings.isInAppKioskMode;
settings.isInAppKioskMode;
if ($('system-dialog-link')) { if ($('system-dialog-link')) {
setIsVisible($('system-dialog-link'), setIsVisible($('system-dialog-link'),
this.shouldShowSystemDialogLink_()); this.shouldShowSystemDialogLink_());
......
...@@ -167,9 +167,6 @@ const char kPrintAutomaticallyInKioskMode[] = "printAutomaticallyInKioskMode"; ...@@ -167,9 +167,6 @@ const char kPrintAutomaticallyInKioskMode[] = "printAutomaticallyInKioskMode";
const char kAppKioskMode[] = "appKioskMode"; const char kAppKioskMode[] = "appKioskMode";
// Dictionary field to store Cloud Print base URL. // Dictionary field to store Cloud Print base URL.
const char kCloudPrintUrl[] = "cloudPrintUrl"; 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. // Name of a dictionary field holding the state of selection for document.
const char kDocumentHasSelection[] = "documentHasSelection"; const char kDocumentHasSelection[] = "documentHasSelection";
// Dictionary field holding the default destination selection rules. // Dictionary field holding the default destination selection rules.
...@@ -1293,13 +1290,6 @@ void PrintPreviewHandler::SendInitialSettings( ...@@ -1293,13 +1290,6 @@ void PrintPreviewHandler::SendInitialSettings(
cmdline->HasSwitch(switches::kKioskModePrinting)); cmdline->HasSwitch(switches::kKioskModePrinting));
initial_settings.SetBoolean(kAppKioskMode, initial_settings.SetBoolean(kAppKioskMode,
chrome::IsRunningInForcedAppMode()); 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) { if (prefs) {
const std::string rules_str = const std::string rules_str =
prefs->GetString(prefs::kPrintPreviewDefaultDestinationSelectionRules); prefs->GetString(prefs::kPrintPreviewDefaultDestinationSelectionRules);
......
...@@ -172,7 +172,6 @@ PrintPreviewWebUITest.prototype = { ...@@ -172,7 +172,6 @@ PrintPreviewWebUITest.prototype = {
this.initialSettings_ = new print_preview.NativeInitialSettings( this.initialSettings_ = new print_preview.NativeInitialSettings(
false /*isInKioskAutoPrintMode*/, false /*isInKioskAutoPrintMode*/,
false /*isInAppKioskMode*/, false /*isInAppKioskMode*/,
false /*hidePrintWithSystemDialogLink*/,
',' /*thousandsDelimeter*/, ',' /*thousandsDelimeter*/,
'.' /*decimalDelimeter*/, '.' /*decimalDelimeter*/,
1 /*unitType*/, 1 /*unitType*/,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment