| Index: chrome/browser/tab_contents/render_view_context_menu.cc
|
| diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc
|
| index 71aa90960e0266aabc5e26d8d426dbc4270735df..1142e21fa8d701ca9d552e8a379830db500b0e2e 100644
|
| --- a/chrome/browser/tab_contents/render_view_context_menu.cc
|
| +++ b/chrome/browser/tab_contents/render_view_context_menu.cc
|
| @@ -24,6 +24,7 @@
|
| #include "chrome/browser/download/download_manager.h"
|
| #include "chrome/browser/download/download_util.h"
|
| #include "chrome/browser/download/save_package.h"
|
| +#include "chrome/browser/event_disposition.h"
|
| #include "chrome/browser/extensions/extension_event_router.h"
|
| #include "chrome/browser/extensions/extension_service.h"
|
| #include "chrome/browser/net/browser_url_util.h"
|
| @@ -64,6 +65,7 @@
|
| #include "ui/base/l10n/l10n_util.h"
|
| #include "ui/gfx/favicon_size.h"
|
| #include "webkit/glue/webmenuitem.h"
|
| +#include "webkit/glue/window_open_disposition.h"
|
|
|
| using WebKit::WebContextMenuData;
|
| using WebKit::WebMediaPlayerAction;
|
| @@ -1200,6 +1202,20 @@ bool RenderViewContextMenu::IsCommandIdChecked(int id) const {
|
| (id - IDC_SPELLCHECK_LANGUAGES_FIRST);
|
| }
|
|
|
| +void RenderViewContextMenu::ExecuteCommandWithFlags(int id, int flags) {
|
| + switch (id) {
|
| + case IDC_BACK:
|
| + GoBack(flags);
|
| + return;
|
| + case IDC_FORWARD:
|
| + GoForward(flags);
|
| + return;
|
| + }
|
| +
|
| + // If not processed, call ExecuteCommand instead.
|
| + ExecuteCommand(id);
|
| +}
|
| +
|
| void RenderViewContextMenu::ExecuteCommand(int id) {
|
| // Check to see if one of the spell check language ids have been clicked.
|
| if (id >= IDC_SPELLCHECK_LANGUAGES_FIRST &&
|
| @@ -1621,6 +1637,20 @@ void RenderViewContextMenu::OpenURL(
|
| source_tab_contents_->OpenURL(url, referrer, disposition, transition);
|
| }
|
|
|
| +void RenderViewContextMenu::GoBack(int event_flags) {
|
| + WindowOpenDisposition disposition =
|
| + browser::DispositionFromEventFlags(event_flags);
|
| + if (source_tab_contents_->delegate())
|
| + source_tab_contents_->delegate()->GoBack(disposition);
|
| +}
|
| +
|
| +void RenderViewContextMenu::GoForward(int event_flags) {
|
| + WindowOpenDisposition disposition =
|
| + browser::DispositionFromEventFlags(event_flags);
|
| + if (source_tab_contents_->delegate())
|
| + source_tab_contents_->delegate()->GoForward(disposition);
|
| +}
|
| +
|
| void RenderViewContextMenu::CopyImageAt(int x, int y) {
|
| RenderViewHost* rvh = source_tab_contents_->render_view_host();
|
| rvh->Send(new ViewMsg_CopyImageAt(rvh->routing_id(), x, y));
|
|
|