| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "chrome/browser/tab_contents/render_view_context_menu.h" | 9 #include "chrome/browser/tab_contents/render_view_context_menu.h" |
| 10 | 10 |
| (...skipping 1692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1703 break; | 1703 break; |
| 1704 | 1704 |
| 1705 case IDC_RELOAD: | 1705 case IDC_RELOAD: |
| 1706 // Prevent the modal "Resubmit form post" dialog from appearing in the | 1706 // Prevent the modal "Resubmit form post" dialog from appearing in the |
| 1707 // context of an external context menu. | 1707 // context of an external context menu. |
| 1708 source_web_contents_->GetController().Reload(!external_); | 1708 source_web_contents_->GetController().Reload(!external_); |
| 1709 break; | 1709 break; |
| 1710 | 1710 |
| 1711 case IDC_PRINT: | 1711 case IDC_PRINT: |
| 1712 if (params_.media_type == WebContextMenuData::MediaTypeNone) { | 1712 if (params_.media_type == WebContextMenuData::MediaTypeNone) { |
| 1713 TabContents* tab_contents = | 1713 printing::PrintViewManager* print_view_manager = |
| 1714 TabContents::FromWebContents(source_web_contents_); | 1714 printing::PrintViewManager::FromWebContents(source_web_contents_); |
| 1715 if (!tab_contents) | 1715 if (!print_view_manager) |
| 1716 break; | 1716 break; |
| 1717 if (profile_->GetPrefs()->GetBoolean(prefs::kPrintPreviewDisabled)) { | 1717 if (profile_->GetPrefs()->GetBoolean(prefs::kPrintPreviewDisabled)) { |
| 1718 tab_contents->print_view_manager()->PrintNow(); | 1718 print_view_manager->PrintNow(); |
| 1719 } else { | 1719 } else { |
| 1720 tab_contents->print_view_manager()->PrintPreviewNow(); | 1720 print_view_manager->PrintPreviewNow(); |
| 1721 } | 1721 } |
| 1722 } else { | 1722 } else { |
| 1723 rvh->Send(new PrintMsg_PrintNodeUnderContextMenu(rvh->GetRoutingID())); | 1723 rvh->Send(new PrintMsg_PrintNodeUnderContextMenu(rvh->GetRoutingID())); |
| 1724 } | 1724 } |
| 1725 break; | 1725 break; |
| 1726 | 1726 |
| 1727 case IDC_VIEW_SOURCE: | 1727 case IDC_VIEW_SOURCE: |
| 1728 source_web_contents_->ViewSource(); | 1728 source_web_contents_->ViewSource(); |
| 1729 break; | 1729 break; |
| 1730 | 1730 |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2024 source_web_contents_->GetRenderViewHost()-> | 2024 source_web_contents_->GetRenderViewHost()-> |
| 2025 ExecuteMediaPlayerActionAtLocation(location, action); | 2025 ExecuteMediaPlayerActionAtLocation(location, action); |
| 2026 } | 2026 } |
| 2027 | 2027 |
| 2028 void RenderViewContextMenu::PluginActionAt( | 2028 void RenderViewContextMenu::PluginActionAt( |
| 2029 const gfx::Point& location, | 2029 const gfx::Point& location, |
| 2030 const WebPluginAction& action) { | 2030 const WebPluginAction& action) { |
| 2031 source_web_contents_->GetRenderViewHost()-> | 2031 source_web_contents_->GetRenderViewHost()-> |
| 2032 ExecutePluginActionAtLocation(location, action); | 2032 ExecutePluginActionAtLocation(location, action); |
| 2033 } | 2033 } |
| OLD | NEW |