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

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

Issue 488853002: Removed --disable-print-preview switch and policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tue Aug 19 16:35:18 PDT 2014 Created 6 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_context_menu/render_view_context_menu.h" 5 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after
1491 1491
1492 case IDC_PRINT: 1492 case IDC_PRINT:
1493 #if defined(ENABLE_PRINTING) 1493 #if defined(ENABLE_PRINTING)
1494 if (params_.media_type == WebContextMenuData::MediaTypeNone) { 1494 if (params_.media_type == WebContextMenuData::MediaTypeNone) {
1495 #if defined(ENABLE_FULL_PRINTING) 1495 #if defined(ENABLE_FULL_PRINTING)
1496 printing::PrintViewManager* print_view_manager = 1496 printing::PrintViewManager* print_view_manager =
1497 printing::PrintViewManager::FromWebContents(source_web_contents_); 1497 printing::PrintViewManager::FromWebContents(source_web_contents_);
1498 1498
1499 if (!print_view_manager) 1499 if (!print_view_manager)
1500 break; 1500 break;
1501 if (GetPrefs(browser_context_) 1501 print_view_manager->PrintPreviewNow(!params_.selection_text.empty());
1502 ->GetBoolean(prefs::kPrintPreviewDisabled)) {
1503 print_view_manager->PrintNow();
Lei Zhang 2014/08/20 00:01:15 Is PrintNow() dead code?
Vitaly Buka (NO REVIEWS) 2014/08/20 01:16:14 Done.
1504 } else {
1505 print_view_manager->PrintPreviewNow(!params_.selection_text.empty());
1506 }
1507 #else 1502 #else
1508 printing::PrintViewManagerBasic* print_view_manager = 1503 printing::PrintViewManagerBasic* print_view_manager =
1509 printing::PrintViewManagerBasic::FromWebContents( 1504 printing::PrintViewManagerBasic::FromWebContents(
1510 source_web_contents_); 1505 source_web_contents_);
1511 if (!print_view_manager) 1506 if (!print_view_manager)
1512 break; 1507 break;
1513 print_view_manager->PrintNow(); 1508 print_view_manager->PrintNow();
1514 #endif // defined(ENABLE_FULL_PRINTING) 1509 #endif // defined(ENABLE_FULL_PRINTING)
1515 } else { 1510 } else {
1516 if (render_frame_host) { 1511 if (render_frame_host) {
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
1786 source_web_contents_->GetRenderViewHost()-> 1781 source_web_contents_->GetRenderViewHost()->
1787 ExecuteMediaPlayerActionAtLocation(location, action); 1782 ExecuteMediaPlayerActionAtLocation(location, action);
1788 } 1783 }
1789 1784
1790 void RenderViewContextMenu::PluginActionAt( 1785 void RenderViewContextMenu::PluginActionAt(
1791 const gfx::Point& location, 1786 const gfx::Point& location,
1792 const WebPluginAction& action) { 1787 const WebPluginAction& action) {
1793 source_web_contents_->GetRenderViewHost()-> 1788 source_web_contents_->GetRenderViewHost()->
1794 ExecutePluginActionAtLocation(location, action); 1789 ExecutePluginActionAtLocation(location, action);
1795 } 1790 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698