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_frame_host.h" | 14 #include "content/public/browser/render_frame_host.h" |
15 #include "content/public/browser/render_view_host.h" | 15 #include "content/public/browser/render_view_host.h" |
16 #include "content/public/browser/web_contents.h" | 16 #include "content/public/browser/web_contents.h" |
17 #include "content/public/common/stop_find_action.h" | 17 #include "content/public/common/stop_find_action.h" |
18 #include "third_party/WebKit/public/web/WebFindOptions.h" | 18 #include "third_party/WebKit/public/web/WebFindOptions.h" |
19 #include "ui/gfx/rect_f.h" | 19 #include "ui/gfx/geometry/rect_f.h" |
20 | 20 |
21 using blink::WebFindOptions; | 21 using blink::WebFindOptions; |
22 using content::WebContents; | 22 using content::WebContents; |
23 | 23 |
24 DEFINE_WEB_CONTENTS_USER_DATA_KEY(FindTabHelper); | 24 DEFINE_WEB_CONTENTS_USER_DATA_KEY(FindTabHelper); |
25 | 25 |
26 // static | 26 // static |
27 int FindTabHelper::find_request_id_counter_ = -1; | 27 int FindTabHelper::find_request_id_counter_ = -1; |
28 | 28 |
29 FindTabHelper::FindTabHelper(WebContents* web_contents) | 29 FindTabHelper::FindTabHelper(WebContents* web_contents) |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 // found. | 175 // found. |
176 last_search_result_ = FindNotificationDetails( | 176 last_search_result_ = FindNotificationDetails( |
177 request_id, number_of_matches, selection, active_match_ordinal, | 177 request_id, number_of_matches, selection, active_match_ordinal, |
178 final_update); | 178 final_update); |
179 content::NotificationService::current()->Notify( | 179 content::NotificationService::current()->Notify( |
180 chrome::NOTIFICATION_FIND_RESULT_AVAILABLE, | 180 chrome::NOTIFICATION_FIND_RESULT_AVAILABLE, |
181 content::Source<WebContents>(web_contents()), | 181 content::Source<WebContents>(web_contents()), |
182 content::Details<FindNotificationDetails>(&last_search_result_)); | 182 content::Details<FindNotificationDetails>(&last_search_result_)); |
183 } | 183 } |
184 } | 184 } |
OLD | NEW |