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

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

Issue 1087003002: Switch print preview to in browser mdns for per-user Chrome installs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tue Apr 14 12:03:18 PDT 2015 Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 base::Unretained(results)), 680 base::Unretained(results)),
681 base::Bind(&PrintPreviewHandler::SetupPrinterList, 681 base::Bind(&PrintPreviewHandler::SetupPrinterList,
682 weak_factory_.GetWeakPtr(), 682 weak_factory_.GetWeakPtr(),
683 base::Owned(results))); 683 base::Owned(results)));
684 } 684 }
685 685
686 void PrintPreviewHandler::HandleGetPrivetPrinters(const base::ListValue* args) { 686 void PrintPreviewHandler::HandleGetPrivetPrinters(const base::ListValue* args) {
687 if (!PrivetPrintingEnabled()) 687 if (!PrivetPrintingEnabled())
688 return web_ui()->CallJavascriptFunction("onPrivetPrinterSearchDone"); 688 return web_ui()->CallJavascriptFunction("onPrivetPrinterSearchDone");
689 #if defined(ENABLE_SERVICE_DISCOVERY) 689 #if defined(ENABLE_SERVICE_DISCOVERY)
690 local_discovery::ServiceDiscoverySharedClient::GetInstanceWithoutAlert( 690 using local_discovery::ServiceDiscoverySharedClient;
691 base::Bind(&PrintPreviewHandler::StartPrivetLister, 691 scoped_refptr<ServiceDiscoverySharedClient> service_discovery =
692 weak_factory_.GetWeakPtr())); 692 ServiceDiscoverySharedClient::GetInstance();
693 StartPrivetLister(service_discovery);
693 #endif // ENABLE_SERVICE_DISCOVERY 694 #endif // ENABLE_SERVICE_DISCOVERY
694 } 695 }
695 696
696 void PrintPreviewHandler::HandleStopGetPrivetPrinters( 697 void PrintPreviewHandler::HandleStopGetPrivetPrinters(
697 const base::ListValue* args) { 698 const base::ListValue* args) {
698 #if defined(ENABLE_SERVICE_DISCOVERY) 699 #if defined(ENABLE_SERVICE_DISCOVERY)
699 if (PrivetPrintingEnabled() && printer_lister_) { 700 if (PrivetPrintingEnabled() && printer_lister_) {
700 printer_lister_->Stop(); 701 printer_lister_->Stop();
701 } 702 }
702 #endif 703 #endif
(...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after
1714 1715
1715 void PrintPreviewHandler::UnregisterForGaiaCookieChanges() { 1716 void PrintPreviewHandler::UnregisterForGaiaCookieChanges() {
1716 if (gaia_cookie_manager_service_) 1717 if (gaia_cookie_manager_service_)
1717 gaia_cookie_manager_service_->RemoveObserver(this); 1718 gaia_cookie_manager_service_->RemoveObserver(this);
1718 } 1719 }
1719 1720
1720 void PrintPreviewHandler::SetPdfSavedClosureForTesting( 1721 void PrintPreviewHandler::SetPdfSavedClosureForTesting(
1721 const base::Closure& closure) { 1722 const base::Closure& closure) {
1722 pdf_file_saved_closure_ = closure; 1723 pdf_file_saved_closure_ = closure;
1723 } 1724 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698