| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_FIND_BAR_FIND_BAR_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_FIND_BAR_FIND_BAR_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_FIND_BAR_FIND_BAR_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_FIND_BAR_FIND_BAR_CONTROLLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "content/public/browser/notification_observer.h" | 11 #include "content/public/browser/notification_observer.h" |
| 12 #include "content/public/browser/notification_registrar.h" | 12 #include "content/public/browser/notification_registrar.h" |
| 13 | 13 |
| 14 namespace gfx { | 14 namespace gfx { |
| 15 class Rect; | 15 class Rect; |
| 16 } | 16 } |
| 17 | 17 |
| 18 class FindBar; | 18 class FindBar; |
| 19 class TabContentsWrapper; | 19 class TabContents; |
| 20 typedef TabContents TabContentsWrapper; |
| 20 | 21 |
| 21 class FindBarController : public content::NotificationObserver { | 22 class FindBarController : public content::NotificationObserver { |
| 22 public: | 23 public: |
| 23 // An enum listing the possible actions to take on a find-in-page selection | 24 // An enum listing the possible actions to take on a find-in-page selection |
| 24 // in the page when ending the find session. | 25 // in the page when ending the find session. |
| 25 enum SelectionAction { | 26 enum SelectionAction { |
| 26 kKeepSelectionOnPage, // Translate the find selection into a normal | 27 kKeepSelectionOnPage, // Translate the find selection into a normal |
| 27 // selection. | 28 // selection. |
| 28 kClearSelectionOnPage, // Clear the find selection. | 29 kClearSelectionOnPage, // Clear the find selection. |
| 29 kActivateSelectionOnPage // Focus and click the selected node (for links). | 30 kActivateSelectionOnPage // Focus and click the selected node (for links). |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 TabContentsWrapper* tab_contents_; | 94 TabContentsWrapper* tab_contents_; |
| 94 | 95 |
| 95 // The last match count we reported to the user. This is used by | 96 // The last match count we reported to the user. This is used by |
| 96 // UpdateFindBarForCurrentResult to avoid flickering. | 97 // UpdateFindBarForCurrentResult to avoid flickering. |
| 97 int last_reported_matchcount_; | 98 int last_reported_matchcount_; |
| 98 | 99 |
| 99 DISALLOW_COPY_AND_ASSIGN(FindBarController); | 100 DISALLOW_COPY_AND_ASSIGN(FindBarController); |
| 100 }; | 101 }; |
| 101 | 102 |
| 102 #endif // CHROME_BROWSER_UI_FIND_BAR_FIND_BAR_CONTROLLER_H_ | 103 #endif // CHROME_BROWSER_UI_FIND_BAR_FIND_BAR_CONTROLLER_H_ |
| OLD | NEW |