| 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 "chrome/browser/ui/find_bar/find_bar_controller.h" | 8 #include "chrome/browser/ui/find_bar/find_bar_controller.h" |
| 9 #include "chrome/browser/ui/find_bar/find_notification_details.h" | 9 #include "chrome/browser/ui/find_bar/find_notification_details.h" |
| 10 #include "content/public/browser/web_contents_observer.h" | 10 #include "content/public/browser/web_contents_observer.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 // Asks the renderer to send the rects of the current find matches. | 76 // Asks the renderer to send the rects of the current find matches. |
| 77 void RequestFindMatchRects(int current_version); | 77 void RequestFindMatchRects(int current_version); |
| 78 #endif | 78 #endif |
| 79 | 79 |
| 80 void HandleFindReply(int request_id, | 80 void HandleFindReply(int request_id, |
| 81 int number_of_matches, | 81 int number_of_matches, |
| 82 const gfx::Rect& selection_rect, | 82 const gfx::Rect& selection_rect, |
| 83 int active_match_ordinal, | 83 int active_match_ordinal, |
| 84 bool final_update); | 84 bool final_update); |
| 85 | 85 |
| 86 bool isloading_at_tabchange() { return loading_at_tab_Change_; } |
| 87 |
| 88 void set_isloading_at_tabchange(bool isLoading) { |
| 89 loading_at_tab_Change_ = isLoading; |
| 90 } |
| 91 |
| 86 private: | 92 private: |
| 87 explicit FindTabHelper(content::WebContents* web_contents); | 93 explicit FindTabHelper(content::WebContents* web_contents); |
| 88 friend class content::WebContentsUserData<FindTabHelper>; | 94 friend class content::WebContentsUserData<FindTabHelper>; |
| 89 | 95 |
| 90 // Each time a search request comes in we assign it an id before passing it | 96 // Each time a search request comes in we assign it an id before passing it |
| 91 // over the IPC so that when the results come in we can evaluate whether we | 97 // over the IPC so that when the results come in we can evaluate whether we |
| 92 // still care about the results of the search (in some cases we don't because | 98 // still care about the results of the search (in some cases we don't because |
| 93 // the user has issued a new search). | 99 // the user has issued a new search). |
| 94 static int find_request_id_counter_; | 100 static int find_request_id_counter_; |
| 95 | 101 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 118 gfx::Range selected_range_; | 124 gfx::Range selected_range_; |
| 119 | 125 |
| 120 // Whether the last search was case sensitive or not. | 126 // Whether the last search was case sensitive or not. |
| 121 bool last_search_case_sensitive_; | 127 bool last_search_case_sensitive_; |
| 122 | 128 |
| 123 // The last find result. This object contains details about the number of | 129 // The last find result. This object contains details about the number of |
| 124 // matches, the find selection rectangle, etc. The UI can access this | 130 // matches, the find selection rectangle, etc. The UI can access this |
| 125 // information to build its presentation. | 131 // information to build its presentation. |
| 126 FindNotificationDetails last_search_result_; | 132 FindNotificationDetails last_search_result_; |
| 127 | 133 |
| 134 // This will set while tab switch happen and content is reloading or |
| 135 // reloading. |
| 136 bool loading_at_tab_Change_; |
| 137 |
| 128 DISALLOW_COPY_AND_ASSIGN(FindTabHelper); | 138 DISALLOW_COPY_AND_ASSIGN(FindTabHelper); |
| 129 }; | 139 }; |
| 130 | 140 |
| 131 #endif // CHROME_BROWSER_UI_FIND_BAR_FIND_TAB_HELPER_H_ | 141 #endif // CHROME_BROWSER_UI_FIND_BAR_FIND_TAB_HELPER_H_ |
| OLD | NEW |