summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-14 00:03:03 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-14 00:03:03 +0000
commitb731a1476cd4a9380902463e467bfdcc0c2a9cca (patch)
tree7aa2f03c3804ed816a9d23dd0af645d790d9bcfd /chrome_frame
parent8ef47724cb5177e01b85e500bc8a8603874dc8cc (diff)
downloadchromium_src-b731a1476cd4a9380902463e467bfdcc0c2a9cca.zip
chromium_src-b731a1476cd4a9380902463e467bfdcc0c2a9cca.tar.gz
chromium_src-b731a1476cd4a9380902463e467bfdcc0c2a9cca.tar.bz2
Fix the chrome frame context menu back forward test which regressed in revision 47187 due to a change in the context
menu resource ids. Solution is to include the chrome_dll_resources.h file in a way to reduce conflicts with existing chrome frame resources. We have two new files chrome_imported_resources.cc/.h to achieve that. Fixes bug http://code.google.com/p/chromium/issues/detail?id=44134 Bug=44134 Review URL: http://codereview.chromium.org/2067006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47223 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/chrome_active_document.cc24
-rw-r--r--chrome_frame/chrome_frame.gyp2
-rw-r--r--chrome_frame/chrome_imported_resources.cc13
-rw-r--r--chrome_frame/chrome_imported_resources.h10
4 files changed, 34 insertions, 15 deletions
diff --git a/chrome_frame/chrome_active_document.cc b/chrome_frame/chrome_active_document.cc
index 9403e41..19a42a8 100644
--- a/chrome_frame/chrome_active_document.cc
+++ b/chrome_frame/chrome_active_document.cc
@@ -37,6 +37,7 @@
#include "chrome/test/automation/tab_proxy.h"
#include "chrome_frame/bho.h"
#include "chrome_frame/bind_context_info.h"
+#include "chrome_frame/chrome_imported_resources.h"
#include "chrome_frame/utils.h"
const wchar_t kChromeAttachExternalTabPrefix[] = L"attach_external_tab";
@@ -870,21 +871,14 @@ bool ChromeActiveDocument::HandleContextMenuCommand(UINT cmd,
ScopedComPtr<IWebBrowser2> web_browser2;
DoQueryService(SID_SWebBrowserApp, m_spClientSite, web_browser2.Receive());
- switch (cmd) {
- case IDS_CONTENT_CONTEXT_BACK:
- web_browser2->GoBack();
- break;
-
- case IDS_CONTENT_CONTEXT_FORWARD:
- web_browser2->GoForward();
- break;
-
- case IDS_CONTENT_CONTEXT_RELOAD:
- web_browser2->Refresh();
- break;
-
- default:
- return BaseActiveX::HandleContextMenuCommand(cmd, params);
+ if (cmd == context_menu_IDC_BACK) {
+ web_browser2->GoBack();
+ } else if (cmd == context_menu_IDC_FORWARD) {
+ web_browser2->GoForward();
+ } else if (cmd == context_menu_IDC_RELOAD) {
+ web_browser2->Refresh();
+ } else {
+ return BaseActiveX::HandleContextMenuCommand(cmd, params);
}
return true;
diff --git a/chrome_frame/chrome_frame.gyp b/chrome_frame/chrome_frame.gyp
index d47348a..2f8f19f 100644
--- a/chrome_frame/chrome_frame.gyp
+++ b/chrome_frame/chrome_frame.gyp
@@ -641,6 +641,8 @@
'chrome_frame_histograms.h',
'chrome_frame_reporting.cc',
'chrome_frame_reporting.h',
+ 'chrome_imported_resources.cc',
+ 'chrome_imported_resources.h',
'chrome_protocol.cc',
'chrome_protocol.h',
'chrome_protocol.rgs',
diff --git a/chrome_frame/chrome_imported_resources.cc b/chrome_frame/chrome_imported_resources.cc
new file mode 100644
index 0000000..966fadf
--- /dev/null
+++ b/chrome_frame/chrome_imported_resources.cc
@@ -0,0 +1,13 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+// Defines resource ids included from Chrome. This is done to prevent resource
+// id conflicts.
+#pragma once
+
+#include "chrome/app/chrome_dll_resource.h"
+
+int context_menu_IDC_FORWARD = IDC_FORWARD;
+int context_menu_IDC_RELOAD = IDC_RELOAD;
+int context_menu_IDC_BACK = IDC_BACK;
+
diff --git a/chrome_frame/chrome_imported_resources.h b/chrome_frame/chrome_imported_resources.h
new file mode 100644
index 0000000..6b950ea
--- /dev/null
+++ b/chrome_frame/chrome_imported_resources.h
@@ -0,0 +1,10 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+// Defines resource ids included from Chrome. This is done to prevent resource
+// id conflicts.
+
+extern int context_menu_IDC_FORWARD;
+extern int context_menu_IDC_RELOAD;
+extern int context_menu_IDC_BACK;
+