| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TAB_HELPER_H_ | 5 #ifndef CHROME_BROWSER_UI_FIND_BAR_FIND_TAB_HELPER_H_ |
| 6 #define CHROME_BROWSER_UI_FIND_BAR_FIND_TAB_HELPER_H_ | 6 #define CHROME_BROWSER_UI_FIND_BAR_FIND_TAB_HELPER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "chrome/browser/ui/find_bar/find_bar_controller.h" | 10 #include "chrome/browser/ui/find_bar/find_bar_controller.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 // True if the Find UI is active for this Tab. | 102 // True if the Find UI is active for this Tab. |
| 103 bool find_ui_active_; | 103 bool find_ui_active_; |
| 104 | 104 |
| 105 // True if a Find operation was aborted. This can happen if the Find box is | 105 // True if a Find operation was aborted. This can happen if the Find box is |
| 106 // closed or if the search term inside the Find box is erased while a search | 106 // closed or if the search term inside the Find box is erased while a search |
| 107 // is in progress. This can also be set if a page has been reloaded, and will | 107 // is in progress. This can also be set if a page has been reloaded, and will |
| 108 // on FindNext result in a full Find operation so that the highlighting for | 108 // on FindNext result in a full Find operation so that the highlighting for |
| 109 // inactive matches can be repainted. | 109 // inactive matches can be repainted. |
| 110 bool find_op_aborted_; | 110 bool find_op_aborted_; |
| 111 | 111 |
| 112 // This variable keeps track of what the most recent request id is. | 112 // This variable keeps track of what the most recent request ID is. |
| 113 int current_find_request_id_; | 113 int current_find_request_id_; |
| 114 | 114 |
| 115 // This variable keeps track of the ID of the first find request in the |
| 116 // current session, which also uniquely identifies the session. |
| 117 int current_find_session_id_; |
| 118 |
| 115 // The current string we are/just finished searching for. This is used to | 119 // The current string we are/just finished searching for. This is used to |
| 116 // figure out if this is a Find or a FindNext operation (FindNext should not | 120 // figure out if this is a Find or a FindNext operation (FindNext should not |
| 117 // increase the request id). | 121 // increase the request id). |
| 118 base::string16 find_text_; | 122 base::string16 find_text_; |
| 119 | 123 |
| 120 // The string we searched for before |find_text_|. | 124 // The string we searched for before |find_text_|. |
| 121 base::string16 previous_find_text_; | 125 base::string16 previous_find_text_; |
| 122 | 126 |
| 123 // The selection within the text. | 127 // The selection within the text. |
| 124 gfx::Range selected_range_; | 128 gfx::Range selected_range_; |
| 125 | 129 |
| 126 // Whether the last search was case sensitive or not. | 130 // Whether the last search was case sensitive or not. |
| 127 bool last_search_case_sensitive_; | 131 bool last_search_case_sensitive_; |
| 128 | 132 |
| 129 // The last find result. This object contains details about the number of | 133 // The last find result. This object contains details about the number of |
| 130 // matches, the find selection rectangle, etc. The UI can access this | 134 // matches, the find selection rectangle, etc. The UI can access this |
| 131 // information to build its presentation. | 135 // information to build its presentation. |
| 132 FindNotificationDetails last_search_result_; | 136 FindNotificationDetails last_search_result_; |
| 133 | 137 |
| 134 DISALLOW_COPY_AND_ASSIGN(FindTabHelper); | 138 DISALLOW_COPY_AND_ASSIGN(FindTabHelper); |
| 135 }; | 139 }; |
| 136 | 140 |
| 137 #endif // CHROME_BROWSER_UI_FIND_BAR_FIND_TAB_HELPER_H_ | 141 #endif // CHROME_BROWSER_UI_FIND_BAR_FIND_TAB_HELPER_H_ |
| OLD | NEW |