summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-28 18:24:56 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-28 18:24:56 +0000
commit1dda4022a94ea32b79de8880541bce53d30a89a7 (patch)
tree7d6eb946ae1c1dd0d8f2d3b6798615d6bcdecdea /chrome/browser/tab_contents
parent468d0a051ed14b487321ff3535f2adc9b47f62a1 (diff)
downloadchromium_src-1dda4022a94ea32b79de8880541bce53d30a89a7.zip
chromium_src-1dda4022a94ea32b79de8880541bce53d30a89a7.tar.gz
chromium_src-1dda4022a94ea32b79de8880541bce53d30a89a7.tar.bz2
Added a "Reload Frame" command to context menu of a frame in the html page.
It was nessessary to add a IPC Message with no Paramter for the reload frame request to the webkit renderer and to add a menu string. The command should only reload the frame clicked in for opening the context menu and let the other parts of the webpage unmodified and unrefreshed. BUG=3858 TEST=Try to click on "Reload Frame" in the context menu of a frame and see if that frame reloads. Review URL: http://codereview.chromium.org/552126 Patch from alexander@sulfrian.net. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37414 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r--chrome/browser/tab_contents/render_view_context_menu.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc
index 4be28b5..aa25c83 100644
--- a/chrome/browser/tab_contents/render_view_context_menu.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu.cc
@@ -215,6 +215,7 @@ void RenderViewContextMenu::AppendFrameItems() {
AppendMenuItem(IDS_CONTENT_CONTEXT_BACK);
AppendMenuItem(IDS_CONTENT_CONTEXT_FORWARD);
AppendSeparator();
+ AppendMenuItem(IDS_CONTENT_CONTEXT_RELOADFRAME);
AppendMenuItem(IDS_CONTENT_CONTEXT_OPENFRAMENEWTAB);
AppendMenuItem(IDS_CONTENT_CONTEXT_OPENFRAMENEWWINDOW);
AppendMenuItem(IDS_CONTENT_CONTEXT_OPENFRAMEOFFTHERECORD);
@@ -458,6 +459,7 @@ bool RenderViewContextMenu::IsItemCommandEnabled(int id) const {
(active_entry) ? active_entry->url() : GURL());
}
+ case IDS_CONTENT_CONTEXT_RELOADFRAME:
case IDS_CONTENT_CONTEXT_OPENFRAMENEWTAB:
case IDS_CONTENT_CONTEXT_OPENFRAMENEWWINDOW:
return params_.frame_url.is_valid();
@@ -695,6 +697,10 @@ void RenderViewContextMenu::ExecuteItemCommand(int id) {
break;
}
+ case IDS_CONTENT_CONTEXT_RELOADFRAME:
+ source_tab_contents_->render_view_host()->ReloadFrame();
+ break;
+
case IDS_CONTENT_CONTEXT_OPENFRAMENEWTAB:
OpenURL(params_.frame_url, NEW_BACKGROUND_TAB, PageTransition::LINK);
break;