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

Side by Side Diff: printing/printing_context_win.cc

Issue 2400873002: keep only one typedef for the native drawing context (Closed)
Patch Set: native_drawing_context.h Created 4 years, 2 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
« no previous file with comments | « printing/printing_context_win.h ('k') | skia/ext/bitmap_platform_device_mac_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « printing/printing_context_win.h ('k') | skia/ext/bitmap_platform_device_mac_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698