OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h" | 5 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 | 418 |
419 bool scaling_enabled = base::FeatureList::IsEnabled(features::kPrintScaling); | 419 bool scaling_enabled = base::FeatureList::IsEnabled(features::kPrintScaling); |
420 source->AddBoolean("scalingEnabled", scaling_enabled); | 420 source->AddBoolean("scalingEnabled", scaling_enabled); |
421 | 421 |
422 bool print_pdf_as_image_enabled = base::FeatureList::IsEnabled( | 422 bool print_pdf_as_image_enabled = base::FeatureList::IsEnabled( |
423 features::kPrintPdfAsImage); | 423 features::kPrintPdfAsImage); |
424 source->AddBoolean("printPdfAsImageEnabled", print_pdf_as_image_enabled); | 424 source->AddBoolean("printPdfAsImageEnabled", print_pdf_as_image_enabled); |
425 | 425 |
426 #if defined(OS_CHROMEOS) | 426 #if defined(OS_CHROMEOS) |
427 bool cups_and_md_settings_enabled = | 427 bool cups_and_md_settings_enabled = |
428 base::CommandLine::ForCurrentProcess()->HasSwitch( | 428 !base::CommandLine::ForCurrentProcess()->HasSwitch( |
429 ::switches::kEnableNativeCups); | 429 ::switches::kDisableNativeCups); |
430 source->AddBoolean("showLocalManageButton", cups_and_md_settings_enabled); | 430 source->AddBoolean("showLocalManageButton", cups_and_md_settings_enabled); |
431 #else | 431 #else |
432 source->AddBoolean("showLocalManageButton", true); | 432 source->AddBoolean("showLocalManageButton", true); |
433 #endif | 433 #endif |
434 return source; | 434 return source; |
435 } | 435 } |
436 | 436 |
437 PrintPreviewUI::TestingDelegate* g_testing_delegate = NULL; | 437 PrintPreviewUI::TestingDelegate* g_testing_delegate = NULL; |
438 | 438 |
439 } // namespace | 439 } // namespace |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 } | 692 } |
693 | 693 |
694 void PrintPreviewUI::SetSelectedFileForTesting(const base::FilePath& path) { | 694 void PrintPreviewUI::SetSelectedFileForTesting(const base::FilePath& path) { |
695 handler_->FileSelected(path, 0, NULL); | 695 handler_->FileSelected(path, 0, NULL); |
696 } | 696 } |
697 | 697 |
698 void PrintPreviewUI::SetPdfSavedClosureForTesting( | 698 void PrintPreviewUI::SetPdfSavedClosureForTesting( |
699 const base::Closure& closure) { | 699 const base::Closure& closure) { |
700 handler_->SetPdfSavedClosureForTesting(closure); | 700 handler_->SetPdfSavedClosureForTesting(closure); |
701 } | 701 } |
OLD | NEW |