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

Side by Side Diff: chrome/browser/chromeos/printing/fake_cups_print_job_manager.h

Issue 2435303003: [CUPS] Implement the Print Job notification. (Closed)
Patch Set: Bug fix. Created 4 years, 1 month 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
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_PRINTING_FAKE_CUPS_PRINT_JOB_MANAGER_H_
6 #define CHROME_BROWSER_CHROMEOS_PRINTING_FAKE_CUPS_PRINT_JOB_MANAGER_H_
7
8 #include "base/memory/weak_ptr.h"
9 #include "chrome/browser/chromeos/printing/cups_print_job_manager.h"
10
11 class Profile;
12
13 namespace chromeos {
14
15 class FakeCUPSPrintJobManager : public CUPSPrintJobManager {
16 public:
17 explicit FakeCUPSPrintJobManager(Profile* profile);
18 ~FakeCUPSPrintJobManager() override;
19
20 bool CreatePrintJob(const std::string& printer_name,
21 const std::string& title,
22 int total_page_number) override;
23 bool CancelPrintJob(CUPSPrintJob* job) override;
24 bool SuspendPrintJob(CUPSPrintJob* job) override;
25 bool ResumePrintJob(CUPSPrintJob* job) override;
26
27 private:
28 void ChangePrintJobState(CUPSPrintJob* job);
29
30 static int next_job_id_;
31 base::WeakPtrFactory<FakeCUPSPrintJobManager> weak_ptr_factory_;
32
33 DISALLOW_COPY_AND_ASSIGN(FakeCUPSPrintJobManager);
34 };
35
36 } // namespace chromeos
37
38 #endif // CHROME_BROWSER_CHROMEOS_PRINTING_FAKE_CUPS_PRINT_JOB_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698