OLD | NEW |
---|---|
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 PDF will be written. | |
26 void SetFileDescriptor(const base::FileDescriptor& file_descriptor); | |
Lei Zhang
2013/08/13 23:26:37
nit: add a blank line after this.
cimamoglu1
2013/08/14 16:10:36
Done.
| |
27 // Gets the file descriptor into which PDF will be written. | |
28 base::FileDescriptor GetFileDescriptor(); | |
Lei Zhang
2013/08/13 23:26:37
const method
cimamoglu1
2013/08/14 16:10:36
Done.
| |
29 #endif | |
30 | |
20 private: | 31 private: |
21 explicit PrintViewManagerBasic(content::WebContents* web_contents); | 32 explicit PrintViewManagerBasic(content::WebContents* web_contents); |
22 friend class content::WebContentsUserData<PrintViewManagerBasic>; | 33 friend class content::WebContentsUserData<PrintViewManagerBasic>; |
23 | 34 |
35 #if defined(OS_ANDROID) | |
36 // The file descriptor the PDF of the page will be written. | |
37 base::FileDescriptor file_descriptor_; | |
38 #endif | |
39 | |
24 DISALLOW_COPY_AND_ASSIGN(PrintViewManagerBasic); | 40 DISALLOW_COPY_AND_ASSIGN(PrintViewManagerBasic); |
25 }; | 41 }; |
26 | 42 |
27 } // namespace printing | 43 } // namespace printing |
28 | 44 |
29 #endif // CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_BASIC_H_ | 45 #endif // CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_BASIC_H_ |
OLD | NEW |