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

Side by Side Diff: chrome/service/cloud_print/print_system.h

Issue 10383262: RefCounted types should not have public destructors, delegate cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make win bot happy Created 8 years, 6 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 #ifndef CHROME_SERVICE_CLOUD_PRINT_PRINT_SYSTEM_H_ 5 #ifndef CHROME_SERVICE_CLOUD_PRINT_PRINT_SYSTEM_H_
6 #define CHROME_SERVICE_CLOUD_PRINT_PRINT_SYSTEM_H_ 6 #define CHROME_SERVICE_CLOUD_PRINT_PRINT_SYSTEM_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 protected: 113 protected:
114 friend class base::RefCountedThreadSafe<PrinterWatcher>; 114 friend class base::RefCountedThreadSafe<PrinterWatcher>;
115 virtual ~PrinterWatcher(); 115 virtual ~PrinterWatcher();
116 }; 116 };
117 117
118 class JobSpooler : public base::RefCountedThreadSafe<JobSpooler> { 118 class JobSpooler : public base::RefCountedThreadSafe<JobSpooler> {
119 public: 119 public:
120 // Callback interface for JobSpooler notifications. 120 // Callback interface for JobSpooler notifications.
121 class Delegate { 121 class Delegate {
122 public: 122 public:
123 virtual ~Delegate() { } 123 virtual void OnJobSpoolSucceeded(const PlatformJobId& job_id) = 0;
124 virtual void OnJobSpoolSucceeded(const PlatformJobId& job_id) = 0; 124 virtual void OnJobSpoolFailed() = 0;
125 virtual void OnJobSpoolFailed() = 0; 125
126 protected:
127 virtual ~Delegate() {}
126 }; 128 };
127 129
128 // Spool job to the printer asynchronously. Caller will be notified via 130 // Spool job to the printer asynchronously. Caller will be notified via
129 // |delegate|. Note that only one print job can be in progress at any given 131 // |delegate|. Note that only one print job can be in progress at any given
130 // time. Subsequent calls to Spool (before the Delegate::OnJobSpoolSucceeded 132 // time. Subsequent calls to Spool (before the Delegate::OnJobSpoolSucceeded
131 // or Delegate::OnJobSpoolFailed methods are called) can fail. 133 // or Delegate::OnJobSpoolFailed methods are called) can fail.
132 virtual bool Spool(const std::string& print_ticket, 134 virtual bool Spool(const std::string& print_ticket,
133 const FilePath& print_data_file_path, 135 const FilePath& print_data_file_path,
134 const std::string& print_data_mime_type, 136 const std::string& print_data_mime_type,
135 const std::string& printer_name, 137 const std::string& printer_name,
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 // Visual Studio where it gets confused between multiple Delegate 218 // Visual Studio where it gets confused between multiple Delegate
217 // classes and gives a C2500 error. (I saw this error on the try bots - 219 // classes and gives a C2500 error. (I saw this error on the try bots -
218 // the workaround was not needed for my machine). 220 // the workaround was not needed for my machine).
219 typedef PrintSystem::PrintServerWatcher::Delegate PrintServerWatcherDelegate; 221 typedef PrintSystem::PrintServerWatcher::Delegate PrintServerWatcherDelegate;
220 typedef PrintSystem::PrinterWatcher::Delegate PrinterWatcherDelegate; 222 typedef PrintSystem::PrinterWatcher::Delegate PrinterWatcherDelegate;
221 typedef PrintSystem::JobSpooler::Delegate JobSpoolerDelegate; 223 typedef PrintSystem::JobSpooler::Delegate JobSpoolerDelegate;
222 224
223 } // namespace cloud_print 225 } // namespace cloud_print
224 226
225 #endif // CHROME_SERVICE_CLOUD_PRINT_PRINT_SYSTEM_H_ 227 #endif // CHROME_SERVICE_CLOUD_PRINT_PRINT_SYSTEM_H_
OLDNEW
« no previous file with comments | « chrome/service/cloud_print/cloud_print_url_fetcher.h ('k') | chrome/test/automation/javascript_execution_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698