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

Side by Side Diff: chrome/browser/ui/webui/print_preview/print_preview_ui.cc

Issue 2475813002: Enable Native CUPS printing on Chrome OS. (Closed)
Patch Set: inverted conditional Created 3 years, 8 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 unified diff | Download patch
OLDNEW
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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 416
417 bool scaling_enabled = base::FeatureList::IsEnabled(features::kPrintScaling); 417 bool scaling_enabled = base::FeatureList::IsEnabled(features::kPrintScaling);
418 source->AddBoolean("scalingEnabled", scaling_enabled); 418 source->AddBoolean("scalingEnabled", scaling_enabled);
419 419
420 bool print_pdf_as_image_enabled = base::FeatureList::IsEnabled( 420 bool print_pdf_as_image_enabled = base::FeatureList::IsEnabled(
421 features::kPrintPdfAsImage); 421 features::kPrintPdfAsImage);
422 source->AddBoolean("printPdfAsImageEnabled", print_pdf_as_image_enabled); 422 source->AddBoolean("printPdfAsImageEnabled", print_pdf_as_image_enabled);
423 423
424 #if defined(OS_CHROMEOS) 424 #if defined(OS_CHROMEOS)
425 bool cups_and_md_settings_enabled = 425 bool cups_and_md_settings_enabled =
426 base::CommandLine::ForCurrentProcess()->HasSwitch( 426 !base::CommandLine::ForCurrentProcess()->HasSwitch(
427 ::switches::kEnableNativeCups); 427 ::switches::kDisableNativeCups);
428 source->AddBoolean("showLocalManageButton", cups_and_md_settings_enabled); 428 source->AddBoolean("showLocalManageButton", cups_and_md_settings_enabled);
429 #else 429 #else
430 source->AddBoolean("showLocalManageButton", true); 430 source->AddBoolean("showLocalManageButton", true);
431 #endif 431 #endif
432 return source; 432 return source;
433 } 433 }
434 434
435 PrintPreviewUI::TestingDelegate* g_testing_delegate = NULL; 435 PrintPreviewUI::TestingDelegate* g_testing_delegate = NULL;
436 436
437 } // namespace 437 } // namespace
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 } 689 }
690 690
691 void PrintPreviewUI::SetSelectedFileForTesting(const base::FilePath& path) { 691 void PrintPreviewUI::SetSelectedFileForTesting(const base::FilePath& path) {
692 handler_->FileSelected(path, 0, NULL); 692 handler_->FileSelected(path, 0, NULL);
693 } 693 }
694 694
695 void PrintPreviewUI::SetPdfSavedClosureForTesting( 695 void PrintPreviewUI::SetPdfSavedClosureForTesting(
696 const base::Closure& closure) { 696 const base::Closure& closure) {
697 handler_->SetPdfSavedClosureForTesting(closure); 697 handler_->SetPdfSavedClosureForTesting(closure);
698 } 698 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698