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

Unified Diff: chrome/browser/local_discovery/privet_local_printer_lister.h

Issue 1553333002: Move cloud print specific files out of local_discovery (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@moveprn
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/local_discovery/privet_local_printer_lister.h
diff --git a/chrome/browser/local_discovery/privet_local_printer_lister.h b/chrome/browser/local_discovery/privet_local_printer_lister.h
deleted file mode 100644
index cdb99e90559a56037300aba20dbb73086048b3e7..0000000000000000000000000000000000000000
--- a/chrome/browser/local_discovery/privet_local_printer_lister.h
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_LOCAL_PRINTER_LISTER_H_
-#define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_LOCAL_PRINTER_LISTER_H_
-
-#include <map>
-#include <string>
-
-#include "base/memory/linked_ptr.h"
-#include "chrome/browser/local_discovery/privet_device_lister.h"
-#include "chrome/browser/local_discovery/privet_http.h"
-#include "chrome/browser/local_discovery/privet_http_asynchronous_factory.h"
-#include "chrome/common/local_discovery/service_discovery_client.h"
-#include "net/url_request/url_request_context.h"
-
-namespace local_discovery {
-
-// This is an adapter to PrivetDeviceLister that finds printers and checks if
-// they support Privet local printing.
-class PrivetLocalPrinterLister : PrivetDeviceLister::Delegate {
- public:
- class Delegate {
- public:
- virtual ~Delegate() {}
- virtual void LocalPrinterChanged(bool added,
- const std::string& name,
- bool has_local_printing,
- const DeviceDescription& description) = 0;
- virtual void LocalPrinterRemoved(const std::string& name) = 0;
- virtual void LocalPrinterCacheFlushed() = 0;
- };
-
- PrivetLocalPrinterLister(ServiceDiscoveryClient* service_discovery_client,
- net::URLRequestContextGetter* request_context,
- Delegate* delegate);
- virtual ~PrivetLocalPrinterLister();
-
- void Start();
-
- // Stops listening/listing, keeps the data.
- void Stop();
-
- const DeviceDescription* GetDeviceDescription(const std::string& name);
-
- // PrivetDeviceLister::Delegate implementation.
- void DeviceChanged(bool added,
- const std::string& name,
- const DeviceDescription& description) override;
- void DeviceRemoved(const std::string& name) override;
- void DeviceCacheFlushed() override;
-
- private:
- struct DeviceContext;
-
- typedef std::map<std::string, linked_ptr<DeviceContext> > DeviceContextMap;
-
- void OnPrivetInfoDone(DeviceContext* context,
- const std::string& name,
- const base::DictionaryValue* json_value);
-
- void OnPrivetResolved(const std::string& name,
- scoped_ptr<PrivetHTTPClient> http_client);
-
- scoped_ptr<PrivetHTTPAsynchronousFactory> privet_http_factory_;
- DeviceContextMap device_contexts_;
- Delegate* delegate_;
-
- scoped_ptr<PrivetDeviceLister> privet_lister_;
-};
-
-} // namespace local_discovery
-
-#endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_LOCAL_PRINTER_LISTER_H_
« no previous file with comments | « chrome/browser/local_discovery/privet_http_unittest.cc ('k') | chrome/browser/local_discovery/privet_local_printer_lister.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698