| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-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_WEB_CONTENTS_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_WEB_CONTENTS_H_ |
| 6 #define CHROME_BROWSER_TAB_CONTENTS_WEB_CONTENTS_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_WEB_CONTENTS_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 // StartFinding on the RenderViewHost directly, rather than by using | 218 // StartFinding on the RenderViewHost directly, rather than by using |
| 219 // StartFinding's more limited API. | 219 // StartFinding's more limited API. |
| 220 void set_current_find_request_id(int current_find_request_id) { | 220 void set_current_find_request_id(int current_find_request_id) { |
| 221 current_find_request_id_ = current_find_request_id; | 221 current_find_request_id_ = current_find_request_id; |
| 222 } | 222 } |
| 223 | 223 |
| 224 // Accessor for find_text_. Used to determine if this WebContents has any | 224 // Accessor for find_text_. Used to determine if this WebContents has any |
| 225 // active searches. | 225 // active searches. |
| 226 string16 find_text() const { return find_text_; } | 226 string16 find_text() const { return find_text_; } |
| 227 | 227 |
| 228 // Accessor for find_prepopulate_text_. Used to access the last search |
| 229 // string entered, whatever tab that search was performed in. |
| 230 string16 find_prepopulate_text() const { return *find_prepopulate_text_; } |
| 231 |
| 228 // Accessor for find_result_. | 232 // Accessor for find_result_. |
| 229 const FindNotificationDetails& find_result() const { return find_result_; } | 233 const FindNotificationDetails& find_result() const { return find_result_; } |
| 230 | 234 |
| 231 // Misc state & callbacks ---------------------------------------------------- | 235 // Misc state & callbacks ---------------------------------------------------- |
| 232 | 236 |
| 233 // Set whether the contents should block javascript message boxes or not. | 237 // Set whether the contents should block javascript message boxes or not. |
| 234 // Default is not to block any message boxes. | 238 // Default is not to block any message boxes. |
| 235 void set_suppress_javascript_messages(bool suppress_javascript_messages) { | 239 void set_suppress_javascript_messages(bool suppress_javascript_messages) { |
| 236 suppress_javascript_messages_ = suppress_javascript_messages; | 240 suppress_javascript_messages_ = suppress_javascript_messages; |
| 237 } | 241 } |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 // the user has issued a new search). | 694 // the user has issued a new search). |
| 691 static int find_request_id_counter_; | 695 static int find_request_id_counter_; |
| 692 | 696 |
| 693 // This variable keeps track of what the most recent request id is. | 697 // This variable keeps track of what the most recent request id is. |
| 694 int current_find_request_id_; | 698 int current_find_request_id_; |
| 695 | 699 |
| 696 // The last string we searched for. This is used to figure out if this is a | 700 // The last string we searched for. This is used to figure out if this is a |
| 697 // Find or a FindNext operation (FindNext should not increase the request id). | 701 // Find or a FindNext operation (FindNext should not increase the request id). |
| 698 string16 find_text_; | 702 string16 find_text_; |
| 699 | 703 |
| 704 // Keeps track of the last search string that was used to search in any tab. |
| 705 string16* find_prepopulate_text_; |
| 706 |
| 700 // The last find result. This object contains details about the number of | 707 // The last find result. This object contains details about the number of |
| 701 // matches, the find selection rectangle, etc. The UI can access this | 708 // matches, the find selection rectangle, etc. The UI can access this |
| 702 // information to build its presentation. | 709 // information to build its presentation. |
| 703 FindNotificationDetails find_result_; | 710 FindNotificationDetails find_result_; |
| 704 | 711 |
| 705 DISALLOW_COPY_AND_ASSIGN(WebContents); | 712 DISALLOW_COPY_AND_ASSIGN(WebContents); |
| 706 }; | 713 }; |
| 707 | 714 |
| 708 #endif // CHROME_BROWSER_TAB_CONTENTS_WEB_CONTENTS_H_ | 715 #endif // CHROME_BROWSER_TAB_CONTENTS_WEB_CONTENTS_H_ |
| OLD | NEW |