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

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

Issue 948413006: Move callback and host port args into Start method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@no_sdc
Patch Set: Created 5 years, 10 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 | « chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.cc ('k') | 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 1604 matching lines...) Expand 10 before | Expand all | Expand 10 after
1615 printer_lister_ ? printer_lister_->GetDeviceDescription(name) : NULL; 1615 printer_lister_ ? printer_lister_->GetDeviceDescription(name) : NULL;
1616 1616
1617 if (!device_description) { 1617 if (!device_description) {
1618 SendPrivetCapabilitiesError(name); 1618 SendPrivetCapabilitiesError(name);
1619 return false; 1619 return false;
1620 } 1620 }
1621 1621
1622 privet_http_factory_ = 1622 privet_http_factory_ =
1623 local_discovery::PrivetHTTPAsynchronousFactory::CreateInstance( 1623 local_discovery::PrivetHTTPAsynchronousFactory::CreateInstance(
1624 Profile::FromWebUI(web_ui())->GetRequestContext()); 1624 Profile::FromWebUI(web_ui())->GetRequestContext());
1625 privet_http_resolution_ = privet_http_factory_->CreatePrivetHTTP( 1625 privet_http_resolution_ = privet_http_factory_->CreatePrivetHTTP(name);
1626 name, device_description->address, callback); 1626 privet_http_resolution_->Start(device_description->address, callback);
1627 privet_http_resolution_->Start();
1628 1627
1629 return true; 1628 return true;
1630 } 1629 }
1631 1630
1632 void PrintPreviewHandler::OnPrivetPrintingDone( 1631 void PrintPreviewHandler::OnPrivetPrintingDone(
1633 const local_discovery::PrivetLocalPrintOperation* print_operation) { 1632 const local_discovery::PrivetLocalPrintOperation* print_operation) {
1634 ClosePreviewDialog(); 1633 ClosePreviewDialog();
1635 } 1634 }
1636 1635
1637 void PrintPreviewHandler::OnPrivetPrintingError( 1636 void PrintPreviewHandler::OnPrivetPrintingError(
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
1713 1712
1714 void PrintPreviewHandler::UnregisterForMergeSession() { 1713 void PrintPreviewHandler::UnregisterForMergeSession() {
1715 if (reconcilor_) 1714 if (reconcilor_)
1716 reconcilor_->RemoveMergeSessionObserver(this); 1715 reconcilor_->RemoveMergeSessionObserver(this);
1717 } 1716 }
1718 1717
1719 void PrintPreviewHandler::SetPdfSavedClosureForTesting( 1718 void PrintPreviewHandler::SetPdfSavedClosureForTesting(
1720 const base::Closure& closure) { 1719 const base::Closure& closure) {
1721 pdf_file_saved_closure_ = closure; 1720 pdf_file_saved_closure_ = closure;
1722 } 1721 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698