OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
11 #include "chrome/browser/ui/find_bar/find_bar_state.h" | 11 #include "chrome/browser/ui/find_bar/find_bar_state.h" |
12 #include "chrome/browser/ui/find_bar/find_bar_state_factory.h" | 12 #include "chrome/browser/ui/find_bar/find_bar_state_factory.h" |
13 #include "content/public/browser/notification_service.h" | 13 #include "content/public/browser/notification_service.h" |
14 #include "content/public/browser/render_view_host.h" | 14 #include "content/public/browser/render_view_host.h" |
15 #include "content/public/browser/web_contents.h" | 15 #include "content/public/browser/web_contents.h" |
16 #include "content/public/common/stop_find_action.h" | 16 #include "content/public/common/stop_find_action.h" |
17 #include "third_party/WebKit/public/web/WebFindOptions.h" | 17 #include "third_party/WebKit/public/web/WebFindOptions.h" |
18 #include "ui/gfx/rect_f.h" | 18 #include "ui/gfx/rect_f.h" |
19 | 19 |
20 using WebKit::WebFindOptions; | 20 using blink::WebFindOptions; |
21 using content::WebContents; | 21 using content::WebContents; |
22 | 22 |
23 DEFINE_WEB_CONTENTS_USER_DATA_KEY(FindTabHelper); | 23 DEFINE_WEB_CONTENTS_USER_DATA_KEY(FindTabHelper); |
24 | 24 |
25 // static | 25 // static |
26 int FindTabHelper::find_request_id_counter_ = -1; | 26 int FindTabHelper::find_request_id_counter_ = -1; |
27 | 27 |
28 FindTabHelper::FindTabHelper(WebContents* web_contents) | 28 FindTabHelper::FindTabHelper(WebContents* web_contents) |
29 : content::WebContentsObserver(web_contents), | 29 : content::WebContentsObserver(web_contents), |
30 find_ui_active_(false), | 30 find_ui_active_(false), |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 // found. | 166 // found. |
167 last_search_result_ = FindNotificationDetails( | 167 last_search_result_ = FindNotificationDetails( |
168 request_id, number_of_matches, selection, active_match_ordinal, | 168 request_id, number_of_matches, selection, active_match_ordinal, |
169 final_update); | 169 final_update); |
170 content::NotificationService::current()->Notify( | 170 content::NotificationService::current()->Notify( |
171 chrome::NOTIFICATION_FIND_RESULT_AVAILABLE, | 171 chrome::NOTIFICATION_FIND_RESULT_AVAILABLE, |
172 content::Source<WebContents>(web_contents()), | 172 content::Source<WebContents>(web_contents()), |
173 content::Details<FindNotificationDetails>(&last_search_result_)); | 173 content::Details<FindNotificationDetails>(&last_search_result_)); |
174 } | 174 } |
175 } | 175 } |
OLD | NEW |