OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_GUEST_VIEW_WEB_VIEW_WEB_VIEW_FIND_HELPER_H_ | 5 #ifndef CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_FIND_HELPER_H_ |
6 #define CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_FIND_HELPER_H_ | 6 #define CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_FIND_HELPER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "content/public/browser/web_contents.h" | 13 #include "content/public/browser/web_contents.h" |
14 #include "third_party/WebKit/public/web/WebFindOptions.h" | 14 #include "third_party/WebKit/public/web/WebFindOptions.h" |
15 #include "ui/gfx/geometry/rect.h" | 15 #include "ui/gfx/geometry/rect.h" |
16 | 16 |
17 namespace extensions { | 17 namespace extensions { |
18 class WebViewInternalFindFunction; | 18 class WebViewInternalFindFunction; |
19 } // namespace extensions | |
20 class WebViewGuest; | 19 class WebViewGuest; |
21 | 20 |
22 // Helper class for find requests and replies for the web_view_internal find | 21 // Helper class for find requests and replies for the web_view_internal find |
23 // API. | 22 // API. |
24 class WebViewFindHelper { | 23 class WebViewFindHelper { |
25 public: | 24 public: |
26 explicit WebViewFindHelper(WebViewGuest* webview_guest); | 25 explicit WebViewFindHelper(WebViewGuest* webview_guest); |
27 ~WebViewFindHelper(); | 26 ~WebViewFindHelper(); |
28 | 27 |
29 // Cancels all find requests in progress and calls their callback functions. | 28 // Cancels all find requests in progress and calls their callback functions. |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 linked_ptr<FindInfo> current_find_session_; | 178 linked_ptr<FindInfo> current_find_session_; |
180 | 179 |
181 // Stores each find request's information by request_id so that its callback | 180 // Stores each find request's information by request_id so that its callback |
182 // function can be called when its find results are available. | 181 // function can be called when its find results are available. |
183 typedef std::map<int, linked_ptr<FindInfo> > FindInfoMap; | 182 typedef std::map<int, linked_ptr<FindInfo> > FindInfoMap; |
184 FindInfoMap find_info_map_; | 183 FindInfoMap find_info_map_; |
185 | 184 |
186 DISALLOW_COPY_AND_ASSIGN(WebViewFindHelper); | 185 DISALLOW_COPY_AND_ASSIGN(WebViewFindHelper); |
187 }; | 186 }; |
188 | 187 |
| 188 } // namespace extensions |
| 189 |
189 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_FIND_HELPER_H_ | 190 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_FIND_HELPER_H_ |
OLD | NEW |