diff options
author | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-10 09:02:28 +0000 |
---|---|---|
committer | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-10 09:02:28 +0000 |
commit | e8dd34d01fdb366d9b72c4f9a43fd8152bcf4fe0 (patch) | |
tree | 9cc2a3748e5ab40e0633dd5d2af1dc8840140f58 /chrome/browser/ui/find_bar/find_bar_controller.cc | |
parent | 4315edf26260ee4b05d0170e890ef017615f3b71 (diff) | |
download | chromium_src-e8dd34d01fdb366d9b72c4f9a43fd8152bcf4fe0.zip chromium_src-e8dd34d01fdb366d9b72c4f9a43fd8152bcf4fe0.tar.gz chromium_src-e8dd34d01fdb366d9b72c4f9a43fd8152bcf4fe0.tar.bz2 |
Change the EndSession param from bool to an enum to improve readability.
BUG=126468
TEST=None, should be no functional change and relying on already active automated tests.
Review URL: https://chromiumcodereview.appspot.com/10356072
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136266 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/find_bar/find_bar_controller.cc')
-rw-r--r-- | chrome/browser/ui/find_bar/find_bar_controller.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/ui/find_bar/find_bar_controller.cc b/chrome/browser/ui/find_bar/find_bar_controller.cc index aaea22d..5be152c 100644 --- a/chrome/browser/ui/find_bar/find_bar_controller.cc +++ b/chrome/browser/ui/find_bar/find_bar_controller.cc @@ -51,8 +51,8 @@ void FindBarController::Show() { find_bar_->SetFocusAndSelection(); } -void FindBarController::EndFindSession(SelectionAction action, - bool force_clear) { +void FindBarController::EndFindSession(SelectionAction selection_action, + ResultAction result_action) { find_bar_->Hide(true); // |tab_contents_| can be NULL for a number of reasons, for example when the @@ -63,9 +63,9 @@ void FindBarController::EndFindSession(SelectionAction action, // 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. - find_tab_helper->StopFinding(action); + find_tab_helper->StopFinding(selection_action); - if (action != kKeepSelection || force_clear) + if (result_action == kClearResultsInFindBox) find_bar_->ClearResults(find_tab_helper->find_result()); // When we get dismissed we restore the focus to where it belongs. @@ -152,7 +152,7 @@ void FindBarController::Observe(int type, // Find box to disappear if the navigation is just to a fragment // within the page. if (commit_details->is_navigation_to_different_page()) - EndFindSession(kKeepSelection, true); + EndFindSession(kKeepSelectionOnPage, kClearResultsInFindBox); } else { // On Reload we want to make sure FindNext is converted to a full Find // to make sure highlights for inactive matches are repainted. |