| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 void ActivateNearestFindResult(float x, float y); | 76 void ActivateNearestFindResult(float x, float y); |
| 77 | 77 |
| 78 // Asks the renderer to send the rects of the current find matches. | 78 // Asks the renderer to send the rects of the current find matches. |
| 79 void RequestFindMatchRects(int current_version); | 79 void RequestFindMatchRects(int current_version); |
| 80 #endif | 80 #endif |
| 81 | 81 |
| 82 void HandleFindReply(int request_id, | 82 void HandleFindReply(int request_id, |
| 83 int number_of_matches, | 83 int number_of_matches, |
| 84 const gfx::Rect& selection_rect, | 84 const gfx::Rect& selection_rect, |
| 85 int active_match_ordinal, | 85 int active_match_ordinal, |
| 86 bool final_update); | 86 bool final_update, |
| 87 bool was_frame_removal); |
| 87 | 88 |
| 88 private: | 89 private: |
| 89 explicit FindTabHelper(content::WebContents* web_contents); | 90 explicit FindTabHelper(content::WebContents* web_contents); |
| 90 friend class content::WebContentsUserData<FindTabHelper>; | 91 friend class content::WebContentsUserData<FindTabHelper>; |
| 91 | 92 |
| 92 // Each time a search request comes in we assign it an id before passing it | 93 // Each time a search request comes in we assign it an id before passing it |
| 93 // over the IPC so that when the results come in we can evaluate whether we | 94 // over the IPC so that when the results come in we can evaluate whether we |
| 94 // still care about the results of the search (in some cases we don't because | 95 // still care about the results of the search (in some cases we don't because |
| 95 // the user has issued a new search). | 96 // the user has issued a new search). |
| 96 static int find_request_id_counter_; | 97 static int find_request_id_counter_; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 129 |
| 129 // The last find result. This object contains details about the number of | 130 // The last find result. This object contains details about the number of |
| 130 // matches, the find selection rectangle, etc. The UI can access this | 131 // matches, the find selection rectangle, etc. The UI can access this |
| 131 // information to build its presentation. | 132 // information to build its presentation. |
| 132 FindNotificationDetails last_search_result_; | 133 FindNotificationDetails last_search_result_; |
| 133 | 134 |
| 134 DISALLOW_COPY_AND_ASSIGN(FindTabHelper); | 135 DISALLOW_COPY_AND_ASSIGN(FindTabHelper); |
| 135 }; | 136 }; |
| 136 | 137 |
| 137 #endif // CHROME_BROWSER_UI_FIND_BAR_FIND_TAB_HELPER_H_ | 138 #endif // CHROME_BROWSER_UI_FIND_BAR_FIND_TAB_HELPER_H_ |
| OLD | NEW |