From a15d4a42a5b5e1fc2390c45188c4d8fa3c381a3f Mon Sep 17 00:00:00 2001
From: "ananta@chromium.org"
 <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Wed, 17 Feb 2010 08:21:35 +0000
Subject: 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
---
 chrome_frame/resources/chrome_frame_resources.grd | 4 ++++
 chrome_frame/resources/structured_resources.rc    | 8 ++++++++
 2 files changed, 12 insertions(+)

(limited to 'chrome_frame/resources')

diff --git a/chrome_frame/resources/chrome_frame_resources.grd b/chrome_frame/resources/chrome_frame_resources.grd
index ebb9e11..ea9f98f 100644
--- a/chrome_frame/resources/chrome_frame_resources.grd
+++ b/chrome_frame/resources/chrome_frame_resources.grd
@@ -40,6 +40,10 @@ for localizable strings
       <structure name="IDD_FIND_DIALOG" file="structured_resources.rc" type="dialog" >
       </structure>
     </structures>
+    <structures first_id="50005">
+      <structure name="IDR_CHROME_FRAME_IE_FULL_TAB" file="structured_resources.rc" type="accelerators" >
+      </structure>
+    </structures>
     <includes>
       <include name="IDR_BHO" file="../bho.rgs" type="REGISTRY" />
       <include name="IDR_CHROMETAB" file="../chrome_tab.rgs" type="REGISTRY" />
diff --git a/chrome_frame/resources/structured_resources.rc b/chrome_frame/resources/structured_resources.rc
index 22e0337..d2dbed3 100644
--- a/chrome_frame/resources/structured_resources.rc
+++ b/chrome_frame/resources/structured_resources.rc
@@ -22,3 +22,11 @@ BEGIN
     CONTROL         "&Up",IDC_DIRECTION_UP,"Button",BS_AUTORADIOBUTTON,155,34,38,10
     LTEXT           "Fi&nd what:",IDC_STATIC,6,7,35,8
 END
+
+IDR_CHROME_FRAME_IE_FULL_TAB ACCELERATORS
+BEGIN
+    VK_LEFT,        IDC_BACK,                   VIRTKEY, ALT
+    VK_BACK,        IDC_BACK,                   VIRTKEY
+    VK_BACK,        IDC_FORWARD,                VIRTKEY, SHIFT
+    VK_RIGHT,       IDC_FORWARD,                VIRTKEY, ALT
+END
-- 
cgit v1.1