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

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

Issue 10837192: Speculative revert to see if this change introduced a performance regression on Mac intl perf bots. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 (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 1702 matching lines...) Expand 10 before | Expand all | Expand 10 after
1713 source_web_contents_->ViewSource(); 1713 source_web_contents_->ViewSource();
1714 break; 1714 break;
1715 1715
1716 case IDC_CONTENT_CONTEXT_INSPECTELEMENT: 1716 case IDC_CONTENT_CONTEXT_INSPECTELEMENT:
1717 Inspect(params_.x, params_.y); 1717 Inspect(params_.x, params_.y);
1718 break; 1718 break;
1719 1719
1720 case IDC_CONTENT_CONTEXT_VIEWPAGEINFO: { 1720 case IDC_CONTENT_CONTEXT_VIEWPAGEINFO: {
1721 NavigationController* controller = &source_web_contents_->GetController(); 1721 NavigationController* controller = &source_web_contents_->GetController();
1722 NavigationEntry* nav_entry = controller->GetActiveEntry(); 1722 NavigationEntry* nav_entry = controller->GetActiveEntry();
1723 Browser* browser = 1723 Browser* browser = browser::FindBrowserForController(controller, NULL);
1724 browser::FindBrowserWithWebContents(source_web_contents_);
1725 chrome::ShowPageInfo(browser, source_web_contents_, nav_entry->GetURL(), 1724 chrome::ShowPageInfo(browser, source_web_contents_, nav_entry->GetURL(),
1726 nav_entry->GetSSL(), true); 1725 nav_entry->GetSSL(), true);
1727 break; 1726 break;
1728 } 1727 }
1729 1728
1730 case IDC_CONTENT_CONTEXT_TRANSLATE: { 1729 case IDC_CONTENT_CONTEXT_TRANSLATE: {
1731 // A translation might have been triggered by the time the menu got 1730 // A translation might have been triggered by the time the menu got
1732 // selected, do nothing in that case. 1731 // selected, do nothing in that case.
1733 TabContents* tab_contents = 1732 TabContents* tab_contents =
1734 TabContents::FromWebContents(source_web_contents_); 1733 TabContents::FromWebContents(source_web_contents_);
(...skipping 20 matching lines...) Expand all
1755 case IDC_CONTENT_CONTEXT_RELOADFRAME: 1754 case IDC_CONTENT_CONTEXT_RELOADFRAME:
1756 rvh->ReloadFrame(); 1755 rvh->ReloadFrame();
1757 break; 1756 break;
1758 1757
1759 case IDC_CONTENT_CONTEXT_VIEWFRAMESOURCE: 1758 case IDC_CONTENT_CONTEXT_VIEWFRAMESOURCE:
1760 source_web_contents_->ViewFrameSource(params_.frame_url, 1759 source_web_contents_->ViewFrameSource(params_.frame_url,
1761 params_.frame_content_state); 1760 params_.frame_content_state);
1762 break; 1761 break;
1763 1762
1764 case IDC_CONTENT_CONTEXT_VIEWFRAMEINFO: { 1763 case IDC_CONTENT_CONTEXT_VIEWFRAMEINFO: {
1765 Browser* browser = browser::FindBrowserWithWebContents( 1764 Browser* browser = browser::FindBrowserForController(
1766 source_web_contents_); 1765 &source_web_contents_->GetController(), NULL);
1767 chrome::ShowPageInfo(browser, source_web_contents_, params_.frame_url, 1766 chrome::ShowPageInfo(browser, source_web_contents_, params_.frame_url,
1768 params_.security_info, false); 1767 params_.security_info, false);
1769 break; 1768 break;
1770 } 1769 }
1771 1770
1772 case IDC_CONTENT_CONTEXT_UNDO: 1771 case IDC_CONTENT_CONTEXT_UNDO:
1773 rvh->Undo(); 1772 rvh->Undo();
1774 break; 1773 break;
1775 1774
1776 case IDC_CONTENT_CONTEXT_REDO: 1775 case IDC_CONTENT_CONTEXT_REDO:
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
2009 source_web_contents_->GetRenderViewHost()-> 2008 source_web_contents_->GetRenderViewHost()->
2010 ExecuteMediaPlayerActionAtLocation(location, action); 2009 ExecuteMediaPlayerActionAtLocation(location, action);
2011 } 2010 }
2012 2011
2013 void RenderViewContextMenu::PluginActionAt( 2012 void RenderViewContextMenu::PluginActionAt(
2014 const gfx::Point& location, 2013 const gfx::Point& location,
2015 const WebPluginAction& action) { 2014 const WebPluginAction& action) {
2016 source_web_contents_->GetRenderViewHost()-> 2015 source_web_contents_->GetRenderViewHost()->
2017 ExecutePluginActionAtLocation(location, action); 2016 ExecutePluginActionAtLocation(location, action);
2018 } 2017 }
OLDNEW
« no previous file with comments | « chrome/browser/sessions/tab_restore_service_delegate.h ('k') | chrome/browser/tab_contents/web_drag_bookmark_handler_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698