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

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

Issue 460183002: Removed --disable-device-discovery switch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Mon 08/11/2014 18:23:33.89 Created 6 years, 4 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 | Annotate | Revision Log
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_handler.h" 5 #include "chrome/browser/ui/webui/print_preview/print_preview_handler.h"
6 6
7 #include <ctype.h> 7 #include <ctype.h>
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 base::Bind(&PrintPreviewHandler::HandleStopGetPrivetPrinters, 599 base::Bind(&PrintPreviewHandler::HandleStopGetPrivetPrinters,
600 base::Unretained(this))); 600 base::Unretained(this)));
601 web_ui()->RegisterMessageCallback("getPrivetPrinterCapabilities", 601 web_ui()->RegisterMessageCallback("getPrivetPrinterCapabilities",
602 base::Bind(&PrintPreviewHandler::HandleGetPrivetPrinterCapabilities, 602 base::Bind(&PrintPreviewHandler::HandleGetPrivetPrinterCapabilities,
603 base::Unretained(this))); 603 base::Unretained(this)));
604 RegisterForMergeSession(); 604 RegisterForMergeSession();
605 } 605 }
606 606
607 bool PrintPreviewHandler::PrivetPrintingEnabled() { 607 bool PrintPreviewHandler::PrivetPrintingEnabled() {
608 #if defined(ENABLE_SERVICE_DISCOVERY) 608 #if defined(ENABLE_SERVICE_DISCOVERY)
609 return !base::CommandLine::ForCurrentProcess()->HasSwitch( 609 return true;
610 switches::kDisableDeviceDiscovery);
611 #else 610 #else
612 return false; 611 return false;
613 #endif 612 #endif
614 } 613 }
615 614
616 WebContents* PrintPreviewHandler::preview_web_contents() const { 615 WebContents* PrintPreviewHandler::preview_web_contents() const {
617 return web_ui()->GetWebContents(); 616 return web_ui()->GetWebContents();
618 } 617 }
619 618
620 void PrintPreviewHandler::HandleGetPrinters(const base::ListValue* /*args*/) { 619 void PrintPreviewHandler::HandleGetPrinters(const base::ListValue* /*args*/) {
(...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after
1562 1561
1563 void PrintPreviewHandler::UnregisterForMergeSession() { 1562 void PrintPreviewHandler::UnregisterForMergeSession() {
1564 if (reconcilor_) 1563 if (reconcilor_)
1565 reconcilor_->RemoveMergeSessionObserver(this); 1564 reconcilor_->RemoveMergeSessionObserver(this);
1566 } 1565 }
1567 1566
1568 void PrintPreviewHandler::SetPdfSavedClosureForTesting( 1567 void PrintPreviewHandler::SetPdfSavedClosureForTesting(
1569 const base::Closure& closure) { 1568 const base::Closure& closure) {
1570 pdf_file_saved_closure_ = closure; 1569 pdf_file_saved_closure_ = closure;
1571 } 1570 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/browser_options_handler.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698