summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/find_bar/find_bar_controller.h
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-10 09:02:28 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-10 09:02:28 +0000
commite8dd34d01fdb366d9b72c4f9a43fd8152bcf4fe0 (patch)
tree9cc2a3748e5ab40e0633dd5d2af1dc8840140f58 /chrome/browser/ui/find_bar/find_bar_controller.h
parent4315edf26260ee4b05d0170e890ef017615f3b71 (diff)
downloadchromium_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.h')
-rw-r--r--chrome/browser/ui/find_bar/find_bar_controller.h26
1 files changed, 18 insertions, 8 deletions
diff --git a/chrome/browser/ui/find_bar/find_bar_controller.h b/chrome/browser/ui/find_bar/find_bar_controller.h
index 6580718..566618b 100644
--- a/chrome/browser/ui/find_bar/find_bar_controller.h
+++ b/chrome/browser/ui/find_bar/find_bar_controller.h
@@ -20,11 +20,20 @@ class TabContentsWrapper;
class FindBarController : public content::NotificationObserver {
public:
- // An enum listing the possible actions to take on a find-in-page selection.
+ // An enum listing the possible actions to take on a find-in-page selection
+ // in the page when ending the find session.
enum SelectionAction {
- kKeepSelection, // Translate the find selection into a normal selection.
- kClearSelection, // Clear the find selection.
- kActivateSelection // Focus and click the selected node (for links).
+ kKeepSelectionOnPage, // Translate the find selection into a normal
+ // selection.
+ kClearSelectionOnPage, // Clear the find selection.
+ kActivateSelectionOnPage // Focus and click the selected node (for links).
+ };
+
+ // An enum listing the possible actions to take on a find-in-page results in
+ // the Find box when ending the find session.
+ enum ResultAction {
+ kClearResultsInFindBox, // Clear search string, ordinal and match count.
+ kKeepResultsInFindBox, // Leave the results untouched.
};
// FindBar takes ownership of |find_bar_view|.
@@ -35,10 +44,11 @@ class FindBarController : public content::NotificationObserver {
// Shows the find bar. Any previous search string will again be visible.
void Show();
- // Ends the current session. |action| specifies what to do with the selection
- // on the page created by the find operation. |force_clear| specifies whether
- // to clear the ordinal and match count from the Find box UI.
- void EndFindSession(SelectionAction action, bool force_clear);
+ // Ends the current session. |selection_action| specifies what to do with the
+ // selection on the page created by the find operation. |results_action|
+ // specifies what to do with the contents of the Find box (after ending).
+ void EndFindSession(SelectionAction selection_action,
+ ResultAction results_action);
// Accessor for the attached TabContentsWrapper.
TabContentsWrapper* tab_contents() const { return tab_contents_; }