Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: android_webview/browser/find_helper.h

Issue 1851793002: Implement a shell of FindRequestManager, and hook it up to WebContentsImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased and small fix. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | android_webview/browser/find_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef ANDROID_WEBVIEW_BROWSER_FIND_HELPER_H_ 5 #ifndef ANDROID_WEBVIEW_BROWSER_FIND_HELPER_H_
6 #define ANDROID_WEBVIEW_BROWSER_FIND_HELPER_H_ 6 #define ANDROID_WEBVIEW_BROWSER_FIND_HELPER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "content/public/browser/web_contents_observer.h" 9 #include "content/public/browser/web_contents_observer.h"
10 10
(...skipping 25 matching lines...) Expand all
36 void HandleFindReply(int request_id, 36 void HandleFindReply(int request_id,
37 int match_count, 37 int match_count,
38 int active_ordinal, 38 int active_ordinal,
39 bool finished); 39 bool finished);
40 40
41 // Methods valid in both synchronous and asynchronous modes. 41 // Methods valid in both synchronous and asynchronous modes.
42 void FindNext(bool forward); 42 void FindNext(bool forward);
43 void ClearMatches(); 43 void ClearMatches();
44 44
45 private: 45 private:
46 void StartNewRequest(const base::string16& search_string); 46 void StartNewSession(const base::string16& search_string);
47 bool MaybeHandleEmptySearch(const base::string16& search_string); 47 bool MaybeHandleEmptySearch(const base::string16& search_string);
48 void NotifyResults(int active_ordinal, int match_count, bool finished); 48 void NotifyResults(int active_ordinal, int match_count, bool finished);
49 49
50 // Listener results are reported to. 50 // Listener results are reported to.
51 Listener* listener_; 51 Listener* listener_;
52 52
53 // Used to check the validity of FindNext operations. 53 // Used to check the validity of FindNext operations.
54 bool async_find_started_; 54 bool async_find_started_;
55 55
56 // Used to provide different ids to each request and for result 56 // Used to provide different ids to each request and for result
57 // verification in asynchronous calls. 57 // verification in asynchronous calls.
58 int find_request_id_counter_; 58 int find_request_id_counter_;
59 int current_request_id_; 59 int current_request_id_;
60 60
61 // Required by FindNext and the incremental find replies. 61 // Required by FindNext and the incremental find replies.
62 base::string16 last_search_string_; 62 base::string16 last_search_string_;
63 int last_match_count_; 63 int last_match_count_;
64 int last_active_ordinal_; 64 int last_active_ordinal_;
65 65
66 DISALLOW_COPY_AND_ASSIGN(FindHelper); 66 DISALLOW_COPY_AND_ASSIGN(FindHelper);
67 }; 67 };
68 68
69 } // namespace android_webview 69 } // namespace android_webview
70 70
71 #endif // ANDROID_WEBVIEW_BROWSER_FIND_HELPER_H_ 71 #endif // ANDROID_WEBVIEW_BROWSER_FIND_HELPER_H_
OLDNEW
« no previous file with comments | « no previous file | android_webview/browser/find_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698