Index: chrome/browser/ui/webui/print_preview/print_preview_handler.h |
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.h b/chrome/browser/ui/webui/print_preview/print_preview_handler.h |
index a6c69fa70dd8bd4f9caa14d27c23bd0618cb827c..992e8cb555a9113cfc5cb6bccfdeb9c6a51c9a61 100644 |
--- a/chrome/browser/ui/webui/print_preview/print_preview_handler.h |
+++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.h |
@@ -13,6 +13,7 @@ |
#include "base/macros.h" |
#include "base/memory/ref_counted.h" |
#include "base/memory/weak_ptr.h" |
+#include "base/timer/timer.h" |
#include "chrome/common/features.h" |
#include "components/signin/core/browser/gaia_cookie_manager_service.h" |
#include "content/public/browser/web_ui_message_handler.h" |
@@ -286,6 +287,7 @@ class PrintPreviewHandler |
#if BUILDFLAG(ENABLE_SERVICE_DISCOVERY) |
void StartPrivetLister(const scoped_refptr< |
local_discovery::ServiceDiscoverySharedClient>& client); |
+ void StopPrivetLister(); |
void OnPrivetCapabilities(const base::DictionaryValue* capabilities); |
void PrivetCapabilitiesUpdateClient( |
std::unique_ptr<cloud_print::PrivetHTTPClient> http_client); |
@@ -384,7 +386,7 @@ class PrintPreviewHandler |
scoped_refptr<local_discovery::ServiceDiscoverySharedClient> |
service_discovery_client_; |
std::unique_ptr<cloud_print::PrivetLocalPrinterLister> printer_lister_; |
- |
+ std::unique_ptr<base::OneShotTimer> privet_lister_timer_; |
std::unique_ptr<cloud_print::PrivetHTTPAsynchronousFactory> |
privet_http_factory_; |
std::unique_ptr<cloud_print::PrivetHTTPResolution> privet_http_resolution_; |
@@ -403,6 +405,9 @@ class PrintPreviewHandler |
// notify the test if it was a successful save, only that it was attempted. |
base::Closure pdf_file_saved_closure_; |
+ // Callback ID to be used to notify UI that privet search is finished. |
+ std::string privet_callback_id_ = ""; |
+ |
// Proxy for calls to the print backend. Lazily initialized since web_ui() is |
// not available at construction time. |
std::unique_ptr<printing::PrinterBackendProxy> printer_backend_proxy_; |