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

Side by Side Diff: chrome/browser/tab_contents/render_view_context_menu.cc

Issue 7202012: Print Preview: Display a throbber when the user requests the system print (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes. Created 9 years, 6 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 <algorithm> 5 #include <algorithm>
6 #include <set> 6 #include <set>
7 7
8 #include "chrome/browser/tab_contents/render_view_context_menu.h" 8 #include "chrome/browser/tab_contents/render_view_context_menu.h"
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after
1377 case IDC_PRINT: 1377 case IDC_PRINT:
1378 if (params_.media_type == WebContextMenuData::MediaTypeNone) { 1378 if (params_.media_type == WebContextMenuData::MediaTypeNone) {
1379 TabContentsWrapper* tab_contents_wrapper = 1379 TabContentsWrapper* tab_contents_wrapper =
1380 TabContentsWrapper::GetCurrentWrapperForContents( 1380 TabContentsWrapper::GetCurrentWrapperForContents(
1381 source_tab_contents_); 1381 source_tab_contents_);
1382 if (!tab_contents_wrapper) 1382 if (!tab_contents_wrapper)
1383 break; 1383 break;
1384 if (switches::IsPrintPreviewEnabled()) 1384 if (switches::IsPrintPreviewEnabled())
1385 tab_contents_wrapper->print_view_manager()->PrintPreviewNow(); 1385 tab_contents_wrapper->print_view_manager()->PrintPreviewNow();
1386 else 1386 else
1387 tab_contents_wrapper->print_view_manager()->PrintNow(); 1387 tab_contents_wrapper->print_view_manager()->PrintNow(NULL);
1388 } else { 1388 } else {
1389 rvh->Send(new PrintMsg_PrintNodeUnderContextMenu(rvh->routing_id())); 1389 rvh->Send(new PrintMsg_PrintNodeUnderContextMenu(rvh->routing_id()));
1390 } 1390 }
1391 break; 1391 break;
1392 1392
1393 case IDC_VIEW_SOURCE: 1393 case IDC_VIEW_SOURCE:
1394 source_tab_contents_->ViewSource(); 1394 source_tab_contents_->ViewSource();
1395 break; 1395 break;
1396 1396
1397 case IDC_CONTENT_CONTEXT_INSPECTELEMENT: 1397 case IDC_CONTENT_CONTEXT_INSPECTELEMENT:
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
1638 g_browser_process->clipboard()); 1638 g_browser_process->clipboard());
1639 } 1639 }
1640 1640
1641 void RenderViewContextMenu::MediaPlayerActionAt( 1641 void RenderViewContextMenu::MediaPlayerActionAt(
1642 const gfx::Point& location, 1642 const gfx::Point& location,
1643 const WebMediaPlayerAction& action) { 1643 const WebMediaPlayerAction& action) {
1644 RenderViewHost* rvh = source_tab_contents_->render_view_host(); 1644 RenderViewHost* rvh = source_tab_contents_->render_view_host();
1645 rvh->Send(new ViewMsg_MediaPlayerActionAt( 1645 rvh->Send(new ViewMsg_MediaPlayerActionAt(
1646 rvh->routing_id(), location, action)); 1646 rvh->routing_id(), location, action));
1647 } 1647 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698