Skip to content
Snippets Groups Projects
Commit 347dc0a1 authored by ananta@chromium.org's avatar ananta@chromium.org
Browse files

Ensure that the context menu items displayed in ChromeFrame rendered pages are...

Ensure that the context menu items displayed in ChromeFrame rendered pages are enabled/disabled correctly. To achieve this we now
have a UpdateMenuItemStates function in the RenderViewContextMenuViews class which calls into the underlying menu's UpdateStates
function which enables/disables items correctly.

Fixes bug http://code.google.com/p/chromium/issues/detail?id=45785

Bug=45785

Review URL: http://codereview.chromium.org/2627005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49031 0039d316-1c4b-4281-b951-d872f2087c98
parent 9b363a7a
No related branches found
No related tags found
No related merge requests found
...@@ -521,6 +521,7 @@ bool ExternalTabContainer::HandleContextMenu(const ContextMenuParams& params) { ...@@ -521,6 +521,7 @@ bool ExternalTabContainer::HandleContextMenu(const ContextMenuParams& params) {
new RenderViewContextMenuViews(tab_contents(), params)); new RenderViewContextMenuViews(tab_contents(), params));
external_context_menu_->SetExternal(); external_context_menu_->SetExternal();
external_context_menu_->Init(); external_context_menu_->Init();
external_context_menu_->UpdateMenuItemStates();
POINT screen_pt = { params.x, params.y }; POINT screen_pt = { params.x, params.y };
MapWindowPoints(GetNativeView(), HWND_DESKTOP, &screen_pt, 1); MapWindowPoints(GetNativeView(), HWND_DESKTOP, &screen_pt, 1);
......
...@@ -35,6 +35,10 @@ void RenderViewContextMenuViews::SetExternal() { ...@@ -35,6 +35,10 @@ void RenderViewContextMenuViews::SetExternal() {
} }
#endif #endif
void RenderViewContextMenuViews::UpdateMenuItemStates() {
menu_->UpdateStates();
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// RenderViewContextMenuViews, protected: // RenderViewContextMenuViews, protected:
......
...@@ -30,6 +30,8 @@ class RenderViewContextMenuViews : public RenderViewContextMenu { ...@@ -30,6 +30,8 @@ class RenderViewContextMenuViews : public RenderViewContextMenu {
void SetExternal(); void SetExternal();
#endif #endif
void UpdateMenuItemStates();
protected: protected:
// RenderViewContextMenu implementation -------------------------------------- // RenderViewContextMenu implementation --------------------------------------
virtual void PlatformInit(); virtual void PlatformInit();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment