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

Side by Side Diff: content/browser/renderer_host/render_view_host.cc

Issue 6533006: Print Preview: Hook up the print button to initiate printing without displaying a print dialog. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Addressed review comments. Created 9 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/renderer_host/render_view_host.h ('k') | printing/printing_context.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/browser/renderer_host/render_view_host.h" 5 #include "content/browser/renderer_host/render_view_host.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after
1251 1251
1252 void RenderViewHost::ContextMenuClosed( 1252 void RenderViewHost::ContextMenuClosed(
1253 const webkit_glue::CustomContextMenuContext& custom_context) { 1253 const webkit_glue::CustomContextMenuContext& custom_context) {
1254 Send(new ViewMsg_ContextMenuClosed(routing_id(), custom_context)); 1254 Send(new ViewMsg_ContextMenuClosed(routing_id(), custom_context));
1255 } 1255 }
1256 1256
1257 void RenderViewHost::PrintNodeUnderContextMenu() { 1257 void RenderViewHost::PrintNodeUnderContextMenu() {
1258 Send(new ViewMsg_PrintNodeUnderContextMenu(routing_id())); 1258 Send(new ViewMsg_PrintNodeUnderContextMenu(routing_id()));
1259 } 1259 }
1260 1260
1261 void RenderViewHost::PrintForPrintPreview() { 1261 void RenderViewHost::PrintForPrintPreview(const DictionaryValue& job_settings) {
1262 Send(new ViewMsg_PrintForPrintPreview(routing_id())); 1262 Send(new ViewMsg_PrintForPrintPreview(routing_id(), job_settings));
1263 } 1263 }
1264 1264
1265 void RenderViewHost::OnMsgStartDragging( 1265 void RenderViewHost::OnMsgStartDragging(
1266 const WebDropData& drop_data, 1266 const WebDropData& drop_data,
1267 WebDragOperationsMask drag_operations_mask, 1267 WebDragOperationsMask drag_operations_mask,
1268 const SkBitmap& image, 1268 const SkBitmap& image,
1269 const gfx::Point& image_offset) { 1269 const gfx::Point& image_offset) {
1270 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); 1270 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate();
1271 if (view) 1271 if (view)
1272 view->StartDragging(drop_data, drag_operations_mask, image, image_offset); 1272 view->StartDragging(drop_data, drag_operations_mask, image, image_offset);
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
1702 LOG(DFATAL) << "Invalid checked state " << checked_state; 1702 LOG(DFATAL) << "Invalid checked state " << checked_state;
1703 return; 1703 return;
1704 } 1704 }
1705 1705
1706 CommandState state; 1706 CommandState state;
1707 state.is_enabled = is_enabled; 1707 state.is_enabled = is_enabled;
1708 state.checked_state = 1708 state.checked_state =
1709 static_cast<RenderViewCommandCheckedState>(checked_state); 1709 static_cast<RenderViewCommandCheckedState>(checked_state);
1710 command_states_[static_cast<RenderViewCommand>(command)] = state; 1710 command_states_[static_cast<RenderViewCommand>(command)] = state;
1711 } 1711 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host.h ('k') | printing/printing_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698