OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_UI_METRO_DRIVER_PRINT_DOCUMENT_SOURCE_H_ | 5 #ifndef CHROME_BROWSER_UI_METRO_DRIVER_PRINT_DOCUMENT_SOURCE_H_ |
6 #define CHROME_BROWSER_UI_METRO_DRIVER_PRINT_DOCUMENT_SOURCE_H_ | 6 #define CHROME_BROWSER_UI_METRO_DRIVER_PRINT_DOCUMENT_SOURCE_H_ |
7 | 7 |
8 #include <documentsource.h> | 8 #include <documentsource.h> |
9 #include <printpreview.h> | 9 #include <printpreview.h> |
| 10 #include <stddef.h> |
| 11 #include <stdint.h> |
10 #include <windows.graphics.printing.h> | 12 #include <windows.graphics.printing.h> |
11 | 13 |
12 #include <vector> | 14 #include <vector> |
13 | 15 |
14 #include "base/basictypes.h" | |
15 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
16 #include "base/memory/scoped_vector.h" | 17 #include "base/memory/scoped_vector.h" |
17 #include "base/synchronization/condition_variable.h" | 18 #include "base/synchronization/condition_variable.h" |
18 #include "base/synchronization/waitable_event.h" | 19 #include "base/synchronization/waitable_event.h" |
19 #include "win8/metro_driver/winrt_utils.h" | 20 #include "win8/metro_driver/winrt_utils.h" |
20 | 21 |
21 // Hack to be removed once we don't need to build with an SDK earlier than | 22 // Hack to be removed once we don't need to build with an SDK earlier than |
22 // 8441 where the name of the interface has been changed. | 23 // 8441 where the name of the interface has been changed. |
23 // TODO(mad): remove once we don't run mixed SDK/OS anymore. | 24 // TODO(mad): remove once we don't run mixed SDK/OS anymore. |
24 #ifndef __IPrintPreviewDxgiPackageTarget_FWD_DEFINED__ | 25 #ifndef __IPrintPreviewDxgiPackageTarget_FWD_DEFINED__ |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 void Abort(); | 81 void Abort(); |
81 | 82 |
82 // classic COM interface IPrintDocumentPageSource methods | 83 // classic COM interface IPrintDocumentPageSource methods |
83 STDMETHOD(GetPreviewPageCollection) ( | 84 STDMETHOD(GetPreviewPageCollection) ( |
84 IPrintDocumentPackageTarget* package_target, | 85 IPrintDocumentPackageTarget* package_target, |
85 IPrintPreviewPageCollection** page_collection); | 86 IPrintPreviewPageCollection** page_collection); |
86 STDMETHOD(MakeDocument)(IInspectable* options, | 87 STDMETHOD(MakeDocument)(IInspectable* options, |
87 IPrintDocumentPackageTarget* package_target); | 88 IPrintDocumentPackageTarget* package_target); |
88 | 89 |
89 // classic COM interface IPrintPreviewPageCollection methods | 90 // classic COM interface IPrintPreviewPageCollection methods |
90 STDMETHOD(Paginate)(uint32 page, IInspectable* options); | 91 STDMETHOD(Paginate)(uint32_t page, IInspectable* options); |
91 STDMETHOD(MakePage)(uint32 desired_page, float width, float height); | 92 STDMETHOD(MakePage)(uint32_t desired_page, float width, float height); |
92 | 93 |
93 // If the screen DPI changes, we must be warned here. | 94 // If the screen DPI changes, we must be warned here. |
94 void ResetDpi(float dpi); | 95 void ResetDpi(float dpi); |
95 | 96 |
96 // When the page count is known, this is called and we can setup our data. | 97 // When the page count is known, this is called and we can setup our data. |
97 void SetPageCount(size_t page_count); | 98 void SetPageCount(size_t page_count); |
98 | 99 |
99 // Every time a page is ready, this is called and we can read the data if | 100 // Every time a page is ready, this is called and we can read the data if |
100 // we were waiting for it, or store it for later use. | 101 // we were waiting for it, or store it for later use. |
101 void AddPage(size_t page_number, IStream* metafile_stream); | 102 void AddPage(size_t page_number, IStream* metafile_stream); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 // asynchronous callbacks. | 156 // asynchronous callbacks. |
156 bool aborted_; | 157 bool aborted_; |
157 | 158 |
158 // TODO(mad): remove once we don't run mixed SDK/OS anymore. | 159 // TODO(mad): remove once we don't run mixed SDK/OS anymore. |
159 bool using_old_preview_interface_; | 160 bool using_old_preview_interface_; |
160 }; | 161 }; |
161 | 162 |
162 } // namespace metro_driver | 163 } // namespace metro_driver |
163 | 164 |
164 #endif // CHROME_BROWSER_UI_METRO_DRIVER_PRINT_DOCUMENT_SOURCE_H_ | 165 #endif // CHROME_BROWSER_UI_METRO_DRIVER_PRINT_DOCUMENT_SOURCE_H_ |
OLD | NEW |