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

Side by Side Diff: chrome/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: '' Created 9 years, 10 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
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 "chrome/browser/renderer_host/render_view_host.h" 5 #include "chrome/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 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after
1257 1257
1258 void RenderViewHost::ContextMenuClosed( 1258 void RenderViewHost::ContextMenuClosed(
1259 const webkit_glue::CustomContextMenuContext& custom_context) { 1259 const webkit_glue::CustomContextMenuContext& custom_context) {
1260 Send(new ViewMsg_ContextMenuClosed(routing_id(), custom_context)); 1260 Send(new ViewMsg_ContextMenuClosed(routing_id(), custom_context));
1261 } 1261 }
1262 1262
1263 void RenderViewHost::PrintNodeUnderContextMenu() { 1263 void RenderViewHost::PrintNodeUnderContextMenu() {
1264 Send(new ViewMsg_PrintNodeUnderContextMenu(routing_id())); 1264 Send(new ViewMsg_PrintNodeUnderContextMenu(routing_id()));
1265 } 1265 }
1266 1266
1267 void RenderViewHost::PrintForPrintPreview(const std::string& job_settings) {
1268 Send(new ViewMsg_PrintForPrintPreview(routing_id(), job_settings));
1269 }
1270
1267 void RenderViewHost::OnMsgStartDragging( 1271 void RenderViewHost::OnMsgStartDragging(
1268 const WebDropData& drop_data, 1272 const WebDropData& drop_data,
1269 WebDragOperationsMask drag_operations_mask, 1273 WebDragOperationsMask drag_operations_mask,
1270 const SkBitmap& image, 1274 const SkBitmap& image,
1271 const gfx::Point& image_offset) { 1275 const gfx::Point& image_offset) {
1272 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); 1276 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate();
1273 if (view) 1277 if (view)
1274 view->StartDragging(drop_data, drag_operations_mask, image, image_offset); 1278 view->StartDragging(drop_data, drag_operations_mask, image, image_offset);
1275 } 1279 }
1276 1280
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
1713 LOG(DFATAL) << "Invalid checked state " << checked_state; 1717 LOG(DFATAL) << "Invalid checked state " << checked_state;
1714 return; 1718 return;
1715 } 1719 }
1716 1720
1717 CommandState state; 1721 CommandState state;
1718 state.is_enabled = is_enabled; 1722 state.is_enabled = is_enabled;
1719 state.checked_state = 1723 state.checked_state =
1720 static_cast<RenderViewCommandCheckedState>(checked_state); 1724 static_cast<RenderViewCommandCheckedState>(checked_state);
1721 command_states_[static_cast<RenderViewCommand>(command)] = state; 1725 command_states_[static_cast<RenderViewCommand>(command)] = state;
1722 } 1726 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698