OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_TAB_CONTENTS_TAB_CONTENTS_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 // Used _only_ by testing to get or set the current request ID. | 523 // Used _only_ by testing to get or set the current request ID. |
524 int current_find_request_id() { return current_find_request_id_; } | 524 int current_find_request_id() { return current_find_request_id_; } |
525 void set_current_find_request_id(int current_find_request_id) { | 525 void set_current_find_request_id(int current_find_request_id) { |
526 current_find_request_id_ = current_find_request_id; | 526 current_find_request_id_ = current_find_request_id; |
527 } | 527 } |
528 | 528 |
529 // Accessor for find_text_. Used to determine if this TabContents has any | 529 // Accessor for find_text_. Used to determine if this TabContents has any |
530 // active searches. | 530 // active searches. |
531 string16 find_text() const { return find_text_; } | 531 string16 find_text() const { return find_text_; } |
532 | 532 |
| 533 // Accessor for the previous search we issued. |
| 534 string16 previous_find_text() const { return previous_find_text_; } |
| 535 |
533 // Accessor for last_search_prepopulate_text_. Used to access the last search | 536 // Accessor for last_search_prepopulate_text_. Used to access the last search |
534 // string entered, whatever tab that search was performed in. | 537 // string entered, whatever tab that search was performed in. |
535 string16 find_prepopulate_text() const { | 538 string16 find_prepopulate_text() const { |
536 return *last_search_prepopulate_text_; | 539 return *last_search_prepopulate_text_; |
537 } | 540 } |
538 | 541 |
539 // Accessor for find_result_. | 542 // Accessor for find_result_. |
540 const FindNotificationDetails& find_result() const { | 543 const FindNotificationDetails& find_result() const { |
541 return last_search_result_; | 544 return last_search_result_; |
542 } | 545 } |
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1098 // True if a Find operation was aborted. This can happen if the Find box is | 1101 // True if a Find operation was aborted. This can happen if the Find box is |
1099 // closed or if the search term inside the Find box is erased while a search | 1102 // closed or if the search term inside the Find box is erased while a search |
1100 // is in progress. This can also be set if a page has been reloaded, and will | 1103 // is in progress. This can also be set if a page has been reloaded, and will |
1101 // on FindNext result in a full Find operation so that the highlighting for | 1104 // on FindNext result in a full Find operation so that the highlighting for |
1102 // inactive matches can be repainted. | 1105 // inactive matches can be repainted. |
1103 bool find_op_aborted_; | 1106 bool find_op_aborted_; |
1104 | 1107 |
1105 // This variable keeps track of what the most recent request id is. | 1108 // This variable keeps track of what the most recent request id is. |
1106 int current_find_request_id_; | 1109 int current_find_request_id_; |
1107 | 1110 |
1108 // The last string we searched for. This is used to figure out if this is a | 1111 // The current string we are/just finished searching for. This is used to |
1109 // Find or a FindNext operation (FindNext should not increase the request id). | 1112 // figure out if this is a Find or a FindNext operation (FindNext should not |
| 1113 // increase the request id). |
1110 string16 find_text_; | 1114 string16 find_text_; |
1111 | 1115 |
| 1116 // The string we searched for before |find_text_|. |
| 1117 string16 previous_find_text_; |
| 1118 |
1112 // Whether the last search was case sensitive or not. | 1119 // Whether the last search was case sensitive or not. |
1113 bool last_search_case_sensitive_; | 1120 bool last_search_case_sensitive_; |
1114 | 1121 |
1115 // Keeps track of the last search string that was used to search in any tab. | 1122 // Keeps track of the last search string that was used to search in any tab. |
1116 string16* last_search_prepopulate_text_; | 1123 string16* last_search_prepopulate_text_; |
1117 | 1124 |
1118 // The last find result. This object contains details about the number of | 1125 // The last find result. This object contains details about the number of |
1119 // matches, the find selection rectangle, etc. The UI can access this | 1126 // matches, the find selection rectangle, etc. The UI can access this |
1120 // information to build its presentation. | 1127 // information to build its presentation. |
1121 FindNotificationDetails last_search_result_; | 1128 FindNotificationDetails last_search_result_; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1183 | 1190 |
1184 // The time that we started to close the tab. | 1191 // The time that we started to close the tab. |
1185 base::TimeTicks tab_close_start_time_; | 1192 base::TimeTicks tab_close_start_time_; |
1186 | 1193 |
1187 // --------------------------------------------------------------------------- | 1194 // --------------------------------------------------------------------------- |
1188 | 1195 |
1189 DISALLOW_COPY_AND_ASSIGN(TabContents); | 1196 DISALLOW_COPY_AND_ASSIGN(TabContents); |
1190 }; | 1197 }; |
1191 | 1198 |
1192 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 1199 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
OLD | NEW |