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 #include "printing/printing_context_win.h" | 5 #include "printing/printing_context_win.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 CancelDC(context_); | 316 CancelDC(context_); |
317 } | 317 } |
318 | 318 |
319 void PrintingContextWin::ReleaseContext() { | 319 void PrintingContextWin::ReleaseContext() { |
320 if (context_) { | 320 if (context_) { |
321 DeleteDC(context_); | 321 DeleteDC(context_); |
322 context_ = nullptr; | 322 context_ = nullptr; |
323 } | 323 } |
324 } | 324 } |
325 | 325 |
326 gfx::NativeDrawingContext PrintingContextWin::context() const { | 326 skia::NativeDrawingContext PrintingContextWin::context() const { |
327 return context_; | 327 return context_; |
328 } | 328 } |
329 | 329 |
330 // static | 330 // static |
331 BOOL PrintingContextWin::AbortProc(HDC hdc, int nCode) { | 331 BOOL PrintingContextWin::AbortProc(HDC hdc, int nCode) { |
332 if (nCode) { | 332 if (nCode) { |
333 // TODO(maruel): Need a way to find the right instance to set. Should | 333 // TODO(maruel): Need a way to find the right instance to set. Should |
334 // leverage PrintJobManager here? | 334 // leverage PrintJobManager here? |
335 // abort_printing_ = true; | 335 // abort_printing_ = true; |
336 } | 336 } |
(...skipping 26 matching lines...) Expand all Loading... |
363 if (view && view->GetHost()) | 363 if (view && view->GetHost()) |
364 window = view->GetHost()->GetAcceleratedWidget(); | 364 window = view->GetHost()->GetAcceleratedWidget(); |
365 if (!window) { | 365 if (!window) { |
366 // TODO(maruel): b/1214347 Get the right browser window instead. | 366 // TODO(maruel): b/1214347 Get the right browser window instead. |
367 return GetDesktopWindow(); | 367 return GetDesktopWindow(); |
368 } | 368 } |
369 return window; | 369 return window; |
370 } | 370 } |
371 | 371 |
372 } // namespace printing | 372 } // namespace printing |
OLD | NEW |