diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-17 08:21:35 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-17 08:21:35 +0000 |
commit | a15d4a42a5b5e1fc2390c45188c4d8fa3c381a3f (patch) | |
tree | b051c7d0daf57be61d3f226437d0775df84cb21f /chrome_frame/chrome_active_document.h | |
parent | 2e59325fed2416cd23d0b418cd46e302148aa584 (diff) | |
download | chromium_src-a15d4a42a5b5e1fc2390c45188c4d8fa3c381a3f.zip chromium_src-a15d4a42a5b5e1fc2390c45188c4d8fa3c381a3f.tar.gz chromium_src-a15d4a42a5b5e1fc2390c45188c4d8fa3c381a3f.tar.bz2 |
We need to support the following accelerators in the ChromeFrame Active document, to ensure that the following
accelerators navigate backwards and forwards in IE history.
1. VK_BACK and Alt + VK_LEFT to navigate back.
2. Shift + VK_BACK and Alt + VK_RIGHT to navigate forward.
This CL adds support for this. We load the accelerator table in our Active document and when we receive an
accelerator from Chrome, we first call the Windows API TranslateAccelerator to translate any accelerators
and then continue with the default handling. Added handlers for navigating back and forward.
Test=covered by unit test.
Fixes bug http://code.google.com/p/chromium/issues/detail?id=35629
Bug=35629
Review URL: http://codereview.chromium.org/600117
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39208 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_active_document.h')
-rw-r--r-- | chrome_frame/chrome_active_document.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome_frame/chrome_active_document.h b/chrome_frame/chrome_active_document.h index aeec2d82..e7a4397 100644 --- a/chrome_frame/chrome_active_document.h +++ b/chrome_frame/chrome_active_document.h @@ -146,6 +146,8 @@ BEGIN_COM_MAP(ChromeActiveDocument) END_COM_MAP() BEGIN_MSG_MAP(ChromeActiveDocument) + COMMAND_ID_HANDLER(IDC_FORWARD, OnForward) + COMMAND_ID_HANDLER(IDC_BACK, OnBack) CHAIN_MSG_MAP(Base) END_MSG_MAP() @@ -299,6 +301,10 @@ END_EXEC_COMMAND_MAP() // Get the travel log from the client site HRESULT GetBrowserServiceAndTravelLog(IBrowserService** browser_service, ITravelLog** travel_log); + LRESULT OnForward(WORD notify_code, WORD id, HWND control_window, + BOOL& bHandled); + LRESULT OnBack(WORD notify_code, WORD id, HWND control_window, + BOOL& bHandled); protected: typedef std::map<int, bool> EnabledCommandsMap; @@ -324,6 +330,8 @@ END_EXEC_COMMAND_MAP() ScopedComPtr<IInternetSecurityManager> security_manager_; + HACCEL accelerator_table_; + public: ScopedComPtr<IOleInPlaceFrame> in_place_frame_; OLEINPLACEFRAMEINFO frame_info_; |