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

Side by Side Diff: chrome/browser/printing/print_view_manager_basic.h

Issue 23116003: Adds PrintingContext implementation stub for Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addresses code review issues. Solves infinite recursion bug. Improves the interface between Java an… Created 7 years, 4 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_BROWSER_PRINTING_PRINT_VIEW_MANAGER_BASIC_H_ 5 #ifndef CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_BASIC_H_
6 #define CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_BASIC_H_ 6 #define CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_BASIC_H_
7 7
8 #include "chrome/browser/printing/print_view_manager_base.h" 8 #include "chrome/browser/printing/print_view_manager_base.h"
9 #include "content/public/browser/web_contents_user_data.h" 9 #include "content/public/browser/web_contents_user_data.h"
10 10
11 #if defined(OS_ANDROID)
12 #include "base/file_descriptor_posix.h"
13 #endif
14
11 namespace printing { 15 namespace printing {
12 16
13 // Manages the print commands for a WebContents - basic version. 17 // Manages the print commands for a WebContents - basic version.
14 class PrintViewManagerBasic 18 class PrintViewManagerBasic
15 : public PrintViewManagerBase, 19 : public PrintViewManagerBase,
16 public content::WebContentsUserData<PrintViewManagerBasic> { 20 public content::WebContentsUserData<PrintViewManagerBasic> {
17 public: 21 public:
18 virtual ~PrintViewManagerBasic(); 22 virtual ~PrintViewManagerBasic();
19 23
24 #if defined(OS_ANDROID)
25 // Sets the file descriptor into which the PDF will be written.
26 void set_file_descriptor(const base::FileDescriptor& file_descriptor) {
27 file_descriptor_ = file_descriptor;
28 }
29
30 // Gets the file descriptor into which the PDF will be written.
31 base::FileDescriptor get_file_descriptor() const { return file_descriptor_; }
whywhat 2013/08/16 23:31:36 nit: s/get_file_descriptor/file_descriptor
cimamoglu1 2013/08/19 13:47:26 Done.
32
33 // content::WebContentsObserver implementation.
34 // Terminates or cancels the print job if one was pending.
35 virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE;
36
37 // content::WebContentsObserver implementation.
38 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
39 #endif
40
20 private: 41 private:
21 explicit PrintViewManagerBasic(content::WebContents* web_contents); 42 explicit PrintViewManagerBasic(content::WebContents* web_contents);
22 friend class content::WebContentsUserData<PrintViewManagerBasic>; 43 friend class content::WebContentsUserData<PrintViewManagerBasic>;
23 44
45 #if defined(OS_ANDROID)
46 virtual void OnPrintingFailed(int cookie);
Lei Zhang 2013/08/18 09:56:26 OVERRIDE
cimamoglu1 2013/08/19 13:47:26 Done.
47
48 // The file descriptor into which the PDF of the page will be written.
49 base::FileDescriptor file_descriptor_;
50 #endif
51
24 DISALLOW_COPY_AND_ASSIGN(PrintViewManagerBasic); 52 DISALLOW_COPY_AND_ASSIGN(PrintViewManagerBasic);
25 }; 53 };
26 54
27 } // namespace printing 55 } // namespace printing
28 56
29 #endif // CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_BASIC_H_ 57 #endif // CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_BASIC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698