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

Side by Side Diff: chrome/renderer/print_web_view_helper_mac.mm

Issue 2841035: Fix style issues pointed in another change. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: Created 10 years, 5 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 | « chrome/renderer/print_web_view_helper.cc ('k') | no next file » | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/renderer/print_web_view_helper.h" 5 #include "chrome/renderer/print_web_view_helper.h"
6 6
7 #import <AppKit/AppKit.h> 7 #import <AppKit/AppKit.h>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 // Get the size of the compiled metafile. 63 // Get the size of the compiled metafile.
64 ViewHostMsg_DidPrintPage_Params page_params; 64 ViewHostMsg_DidPrintPage_Params page_params;
65 page_params.data_size = 0; 65 page_params.data_size = 0;
66 page_params.page_number = params.page_number; 66 page_params.page_number = params.page_number;
67 page_params.document_cookie = params.params.document_cookie; 67 page_params.document_cookie = params.params.document_cookie;
68 page_params.actual_shrink = scale_factor; 68 page_params.actual_shrink = scale_factor;
69 base::SharedMemory shared_buf; 69 base::SharedMemory shared_buf;
70 70
71 page_params.page_size = gfx::Size( 71 page_params.page_size = gfx::Size(
72 static_cast<int>(content_width_in_points 72 static_cast<int>(content_width_in_points +
73 + margin_left_in_points + margin_right_in_points), 73 margin_left_in_points + margin_right_in_points),
74 static_cast<int>(content_height_in_points 74 static_cast<int>(content_height_in_points +
75 + margin_top_in_points + margin_bottom_in_points)); 75 margin_top_in_points + margin_bottom_in_points));
76 page_params.content_area = gfx::Rect( 76 page_params.content_area = gfx::Rect(
77 static_cast<int>(margin_left_in_points), 77 static_cast<int>(margin_left_in_points),
78 static_cast<int>(margin_top_in_points), 78 static_cast<int>(margin_top_in_points),
79 static_cast<int>(content_width_in_points), 79 static_cast<int>(content_width_in_points),
80 static_cast<int>(content_height_in_points)); 80 static_cast<int>(content_height_in_points));
81 81
82 // Ask the browser to create the shared memory for us. 82 // Ask the browser to create the shared memory for us.
83 uint32 buf_size = metafile.GetDataSize(); 83 uint32 buf_size = metafile.GetDataSize();
84 base::SharedMemoryHandle shared_mem_handle; 84 base::SharedMemoryHandle shared_mem_handle;
85 if (Send(new ViewHostMsg_AllocatePDFTransport(routing_id(), buf_size, 85 if (Send(new ViewHostMsg_AllocatePDFTransport(routing_id(), buf_size,
(...skipping 11 matching lines...) Expand all
97 } else { 97 } else {
98 NOTREACHED() << "Browser failed to allocate shared memory"; 98 NOTREACHED() << "Browser failed to allocate shared memory";
99 } 99 }
100 } else { 100 } else {
101 NOTREACHED() << "Browser allocation request message failed"; 101 NOTREACHED() << "Browser allocation request message failed";
102 } 102 }
103 103
104 Send(new ViewHostMsg_DidPrintPage(routing_id(), page_params)); 104 Send(new ViewHostMsg_DidPrintPage(routing_id(), page_params));
105 } 105 }
106 106
OLDNEW
« no previous file with comments | « chrome/renderer/print_web_view_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698