summaryrefslogtreecommitdiffstats
path: root/chrome/browser/find_bar_controller.cc
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-11 18:19:00 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-11 18:19:00 +0000
commit5bc8fe91607f20f2d43dc461ca188dd07b55d435 (patch)
treeca6551f9d816757942485ee7d3542c5aeb4d2fed /chrome/browser/find_bar_controller.cc
parent3148c0ae4462e01f4b830b8d2150dcd7fee2cb3b (diff)
downloadchromium_src-5bc8fe91607f20f2d43dc461ca188dd07b55d435.zip
chromium_src-5bc8fe91607f20f2d43dc461ca188dd07b55d435.tar.gz
chromium_src-5bc8fe91607f20f2d43dc461ca188dd07b55d435.tar.bz2
Allow users to close the find session and activate the current link via ctrl-enter.
this only hooks up ctrl-enter on gtk for now, but adding it on windows/mac should be trivial webkit side, which needs to land first, is here: https://bugs.webkit.org/show_bug.cgi?id=35407 This also enables the FindInPageControllerTest tests on linux/gtk. BUG=29500 TEST=FindInPageControllerTest.ActivateLinkNavigatesPage Review URL: http://codereview.chromium.org/660137 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41291 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/find_bar_controller.cc')
-rw-r--r--chrome/browser/find_bar_controller.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/chrome/browser/find_bar_controller.cc b/chrome/browser/find_bar_controller.cc
index 9b5bc7d..b7ddf69 100644
--- a/chrome/browser/find_bar_controller.cc
+++ b/chrome/browser/find_bar_controller.cc
@@ -34,7 +34,7 @@ void FindBarController::Show() {
find_bar_->SetFocusAndSelection();
}
-void FindBarController::EndFindSession() {
+void FindBarController::EndFindSession(SelectionAction action) {
find_bar_->Hide(true);
// |tab_contents_| can be NULL for a number of reasons, for example when the
@@ -43,8 +43,7 @@ void FindBarController::EndFindSession() {
// When we hide the window, we need to notify the renderer that we are done
// for now, so that we can abort the scoping effort and clear all the
// tickmarks and highlighting.
- tab_contents_->StopFinding(false); // false = don't clear selection on
- // page.
+ tab_contents_->StopFinding(action);
find_bar_->ClearResults(tab_contents_->find_result());
// When we get dismissed we restore the focus to where it belongs.
@@ -139,7 +138,7 @@ void FindBarController::Observe(NotificationType type,
if (find_bar_->IsFindBarVisible()) {
if (PageTransition::StripQualifier(transition_type) !=
PageTransition::RELOAD) {
- EndFindSession();
+ EndFindSession(kKeepSelection);
} else {
// On Reload we want to make sure FindNext is converted to a full Find
// to make sure highlights for inactive matches are repainted.