| 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 #include "chrome/browser/ui/find_bar/find_tab_helper.h" | 5 #include "chrome/browser/ui/find_bar/find_tab_helper.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/renderer_host/render_view_host.h" | |
| 11 #include "chrome/browser/tab_contents/tab_contents.h" | |
| 12 #include "chrome/browser/ui/find_bar/find_bar_state.h" | 10 #include "chrome/browser/ui/find_bar/find_bar_state.h" |
| 13 #include "chrome/common/notification_service.h" | 11 #include "chrome/common/notification_service.h" |
| 14 #include "chrome/common/render_messages.h" | 12 #include "chrome/common/render_messages.h" |
| 13 #include "content/browser/renderer_host/render_view_host.h" |
| 14 #include "content/browser/tab_contents/tab_contents.h" |
| 15 | 15 |
| 16 // static | 16 // static |
| 17 int FindTabHelper::find_request_id_counter_ = -1; | 17 int FindTabHelper::find_request_id_counter_ = -1; |
| 18 | 18 |
| 19 FindTabHelper::FindTabHelper(TabContents* tab_contents) | 19 FindTabHelper::FindTabHelper(TabContents* tab_contents) |
| 20 : TabContentsObserver(tab_contents), | 20 : TabContentsObserver(tab_contents), |
| 21 find_ui_active_(false), | 21 find_ui_active_(false), |
| 22 find_op_aborted_(false), | 22 find_op_aborted_(false), |
| 23 current_find_request_id_(find_request_id_counter_++), | 23 current_find_request_id_(find_request_id_counter_++), |
| 24 last_search_case_sensitive_(false), | 24 last_search_case_sensitive_(false), |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 } | 136 } |
| 137 | 137 |
| 138 // Send a notification to the renderer that we are ready to receive more | 138 // Send a notification to the renderer that we are ready to receive more |
| 139 // results from the scoping effort of the Find operation. The FindInPage | 139 // results from the scoping effort of the Find operation. The FindInPage |
| 140 // scoping is asynchronous and periodically sends results back up to the | 140 // scoping is asynchronous and periodically sends results back up to the |
| 141 // browser using IPC. In an effort to not spam the browser we have the | 141 // browser using IPC. In an effort to not spam the browser we have the |
| 142 // browser send an ACK for each FindReply message and have the renderer | 142 // browser send an ACK for each FindReply message and have the renderer |
| 143 // queue up the latest status message while waiting for this ACK. | 143 // queue up the latest status message while waiting for this ACK. |
| 144 Send(new ViewMsg_FindReplyACK(routing_id())); | 144 Send(new ViewMsg_FindReplyACK(routing_id())); |
| 145 } | 145 } |
| OLD | NEW |