summaryrefslogtreecommitdiffstats
path: root/chrome/browser/external_tab_container_win.cc
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-21 21:33:16 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-21 21:33:16 +0000
commita5500a1cc6aafe73ff19e0daeafdb935a3a0a6bc (patch)
treed73f8ea9aa66d82446f1629190e84c5013896507 /chrome/browser/external_tab_container_win.cc
parent679082058ce725b3bc6024c2bc01a7b99b79b3c6 (diff)
downloadchromium_src-a5500a1cc6aafe73ff19e0daeafdb935a3a0a6bc.zip
chromium_src-a5500a1cc6aafe73ff19e0daeafdb935a3a0a6bc.tar.gz
chromium_src-a5500a1cc6aafe73ff19e0daeafdb935a3a0a6bc.tar.bz2
Links opening up in the host browser in ChromeFrame would not show up as visited. This was because top level link navigations
are directly sent via the OpenURL mechanism to the host browser and as a result the visited link history is not updated. Fix is to update the navigation history in the ExternalTabContainer::OpenURLFromTab function. We currently use the UpdateHistoryForNavigation function in TabContents which is also used by regular navigations initiated within the renderer. Fixes bug http://code.google.com/p/chromium/issues/detail?id=37262 Bug=37262 Review URL: http://codereview.chromium.org/3020019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53247 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/external_tab_container_win.cc')
-rw-r--r--chrome/browser/external_tab_container_win.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/chrome/browser/external_tab_container_win.cc b/chrome/browser/external_tab_container_win.cc
index edbd310..3257cdc 100644
--- a/chrome/browser/external_tab_container_win.cc
+++ b/chrome/browser/external_tab_container_win.cc
@@ -28,8 +28,10 @@
#include "chrome/browser/views/tab_contents/tab_contents_container.h"
#include "chrome/common/bindings_policy.h"
#include "chrome/common/chrome_constants.h"
+#include "chrome/common/render_messages.h"
#include "chrome/common/native_web_keyboard_event.h"
#include "chrome/common/notification_service.h"
+#include "chrome/common/page_transition_types.h"
#include "chrome/test/automation/automation_messages.h"
#include "grit/generated_resources.h"
#include "views/grid_layout.h"
@@ -311,6 +313,20 @@ void ExternalTabContainer::OpenURLFromTab(TabContents* source,
automation_->Send(new AutomationMsg_OpenURL(0, tab_handle_,
url, referrer,
disposition));
+ // TODO(ananta)
+ // We should populate other fields in the
+ // ViewHostMsg_FrameNavigate_Params structure. Another option could be
+ // to refactor the UpdateHistoryForNavigation function in TabContents.
+ ViewHostMsg_FrameNavigate_Params params;
+ params.referrer = referrer;
+ params.url = url;
+ params.page_id = -1;
+ params.transition = PageTransition::LINK;
+
+ NavigationController::LoadCommittedDetails details;
+ details.did_replace_entry = false;
+
+ tab_contents_->UpdateHistoryForNavigation(url, details, params);
}
break;
default: