OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include "chrome/browser/printing/printed_document.h" | 5 #include "chrome/browser/printing/printed_document.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 // Make sure the page is from our list. | 96 // Make sure the page is from our list. |
97 AutoLock lock(lock_); | 97 AutoLock lock(lock_); |
98 DCHECK(&page == mutable_.pages_.find(page.page_number() - 1)->second.get()); | 98 DCHECK(&page == mutable_.pages_.find(page.page_number() - 1)->second.get()); |
99 } | 99 } |
100 #endif | 100 #endif |
101 | 101 |
102 // Save the state to make sure the context this function call does not modify | 102 // Save the state to make sure the context this function call does not modify |
103 // the device context. | 103 // the device context. |
104 int saved_state = SaveDC(context); | 104 int saved_state = SaveDC(context); |
105 DCHECK_NE(saved_state, 0); | 105 DCHECK_NE(saved_state, 0); |
106 gfx::PlatformDeviceWin::InitializeDC(context); | 106 skia::PlatformDeviceWin::InitializeDC(context); |
107 { | 107 { |
108 // Save the state (again) to apply the necessary world transformation. | 108 // Save the state (again) to apply the necessary world transformation. |
109 int saved_state = SaveDC(context); | 109 int saved_state = SaveDC(context); |
110 DCHECK_NE(saved_state, 0); | 110 DCHECK_NE(saved_state, 0); |
111 | 111 |
112 // Setup the matrix to translate and scale to the right place. Take in | 112 // Setup the matrix to translate and scale to the right place. Take in |
113 // account the actual shrinking factor. | 113 // account the actual shrinking factor. |
114 XFORM xform = { 0 }; | 114 XFORM xform = { 0 }; |
115 xform.eDx = static_cast<float>( | 115 xform.eDx = static_cast<float>( |
116 immutable_.settings_.page_setup_pixels().content_area().x()); | 116 immutable_.settings_.page_setup_pixels().content_area().x()); |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 time_ = win_util::FormatSystemTime(systemtime, std::wstring()); | 377 time_ = win_util::FormatSystemTime(systemtime, std::wstring()); |
378 #else | 378 #else |
379 Time now = Time::Now(); | 379 Time now = Time::Now(); |
380 date_ = TimeFormat::ShortDateNumeric(now); | 380 date_ = TimeFormat::ShortDateNumeric(now); |
381 time_ = TimeFormat::TimeOfDay(now); | 381 time_ = TimeFormat::TimeOfDay(now); |
382 #endif // WIN32 | 382 #endif // WIN32 |
383 } | 383 } |
384 | 384 |
385 } // namespace printing | 385 } // namespace printing |
386 | 386 |
OLD | NEW |