Introduce ProfilerMetricsProvider
[chromium-blink-merge.git] / chrome / browser / printing / print_job_worker_owner.h
blob8f9f58509f1fd3e5b92461fa1ddfc891f18eec15
1 // Copyright (c) 2011 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.
5 #ifndef CHROME_BROWSER_PRINTING_PRINT_JOB_WORKER_OWNER_H__
6 #define CHROME_BROWSER_PRINTING_PRINT_JOB_WORKER_OWNER_H__
8 #include "base/memory/ref_counted.h"
9 #include "printing/printing_context.h"
11 namespace base {
12 class MessageLoop;
16 namespace printing {
18 class PrintJobWorker;
19 class PrintSettings;
21 class PrintJobWorkerOwner
22 : public base::RefCountedThreadSafe<PrintJobWorkerOwner> {
23 public:
24 // Finishes the initialization began by PrintJobWorker::GetSettings().
25 // Creates a new PrintedDocument if necessary. Solely meant to be called by
26 // PrintJobWorker.
27 virtual void GetSettingsDone(const PrintSettings& new_settings,
28 PrintingContext::Result result) = 0;
30 // Detach the PrintJobWorker associated to this object.
31 virtual PrintJobWorker* DetachWorker(PrintJobWorkerOwner* new_owner) = 0;
33 // Retrieves the message loop that is expected to process GetSettingsDone.
34 virtual base::MessageLoop* message_loop() = 0;
36 // Access the current settings.
37 virtual const PrintSettings& settings() const = 0;
39 // Cookie uniquely identifying the PrintedDocument and/or loaded settings.
40 virtual int cookie() const = 0;
42 protected:
43 friend class base::RefCountedThreadSafe<PrintJobWorkerOwner>;
45 virtual ~PrintJobWorkerOwner() {}
48 } // namespace printing
50 #endif // CHROME_BROWSER_PRINTING_PRINT_JOB_WORKER_OWNER_H__