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

Side by Side Diff: components/printing/browser/print_manager.h

Issue 2508923003: Make printing work better with OOPIF. (try 2) (Closed)
Patch Set: Fix android_webview 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 COMPONENTS_PRINTING_BROWSER_PRINT_MANAGER_H_ 5 #ifndef COMPONENTS_PRINTING_BROWSER_PRINT_MANAGER_H_
6 #define COMPONENTS_PRINTING_BROWSER_PRINT_MANAGER_H_ 6 #define COMPONENTS_PRINTING_BROWSER_PRINT_MANAGER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "content/public/browser/web_contents_observer.h" 10 #include "content/public/browser/web_contents_observer.h"
(...skipping 21 matching lines...) Expand all
32 } 32 }
33 33
34 // Gets the file descriptor into which the PDF will be written. 34 // Gets the file descriptor into which the PDF will be written.
35 base::FileDescriptor file_descriptor() const { return file_descriptor_; } 35 base::FileDescriptor file_descriptor() const { return file_descriptor_; }
36 #endif 36 #endif
37 37
38 protected: 38 protected:
39 explicit PrintManager(content::WebContents* contents); 39 explicit PrintManager(content::WebContents* contents);
40 40
41 // Terminates or cancels the print job if one was pending. 41 // Terminates or cancels the print job if one was pending.
42 void RenderProcessGone(base::TerminationStatus status) override; 42 void PrintingRenderFrameDeleted();
43 43
44 // content::WebContentsObserver 44 // content::WebContentsObserver
45 bool OnMessageReceived(const IPC::Message& message) override; 45 bool OnMessageReceived(const IPC::Message& message,
46 content::RenderFrameHost* render_frame_host) override;
46 47
47 // IPC handlers 48 // IPC handlers
48 virtual void OnDidGetPrintedPagesCount(int cookie, int number_pages); 49 virtual void OnDidGetPrintedPagesCount(int cookie, int number_pages);
49 virtual void OnPrintingFailed(int cookie); 50 virtual void OnPrintingFailed(int cookie);
50 51
51 int number_pages_; // Number of pages to print in the print job. 52 int number_pages_; // Number of pages to print in the print job.
52 int cookie_; // The current document cookie. 53 int cookie_; // The current document cookie.
53 54
54 #if defined(OS_ANDROID) 55 #if defined(OS_ANDROID)
55 // The file descriptor into which the PDF of the page will be written. 56 // The file descriptor into which the PDF of the page will be written.
56 base::FileDescriptor file_descriptor_; 57 base::FileDescriptor file_descriptor_;
57 58
58 // Callback to execute when done writing pdf. 59 // Callback to execute when done writing pdf.
59 PdfWritingDoneCallback pdf_writing_done_callback_; 60 PdfWritingDoneCallback pdf_writing_done_callback_;
60 #endif 61 #endif
61 62
62 private: 63 private:
63 void OnDidGetDocumentCookie(int cookie); 64 void OnDidGetDocumentCookie(int cookie);
64 65
65 DISALLOW_COPY_AND_ASSIGN(PrintManager); 66 DISALLOW_COPY_AND_ASSIGN(PrintManager);
66 }; 67 };
67 68
68 } // namespace printing 69 } // namespace printing
69 70
70 #endif // COMPONENTS_PRINTING_BROWSER_PRINT_MANAGER_H_ 71 #endif // COMPONENTS_PRINTING_BROWSER_PRINT_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/renderer/printing/chrome_print_web_view_helper_delegate.cc ('k') | components/printing/browser/print_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698