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

Side by Side Diff: content/browser/find_request_manager.h

Issue 2249133002: Changes to how FindRequestManager reports find results. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 CONTENT_BROWSER_FIND_REQUEST_MANAGER_H_ 5 #ifndef CONTENT_BROWSER_FIND_REQUEST_MANAGER_H_
6 #define CONTENT_BROWSER_FIND_REQUEST_MANAGER_H_ 6 #define CONTENT_BROWSER_FIND_REQUEST_MANAGER_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <unordered_map> 9 #include <unordered_map>
10 #include <unordered_set> 10 #include <unordered_set>
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 // The request ID of the initial find request in the current find-in-page 245 // The request ID of the initial find request in the current find-in-page
246 // session, which uniquely identifies this session. Request IDs are included 246 // session, which uniquely identifies this session. Request IDs are included
247 // in all find-related IPCs, which allows reply IPCs containing results from 247 // in all find-related IPCs, which allows reply IPCs containing results from
248 // previous sessions (with |request_id| < |current_session_id_|) to be easily 248 // previous sessions (with |request_id| < |current_session_id_|) to be easily
249 // identified and ignored. 249 // identified and ignored.
250 int current_session_id_; 250 int current_session_id_;
251 251
252 // The current find request. 252 // The current find request.
253 FindRequest current_request_; 253 FindRequest current_request_;
254 254
255 // The set of frames that are still expected to reply to a pending find 255 // The set of frames that are still expected to reply to a pending initial
256 // request. Frames are removed from |pending_replies_| when their reply with 256 // find request. Frames are removed from |pending_initial_replies_| when their
257 // |final_update| set to true is received. 257 // reply to the initial find request is received with |final_update| set to
258 std::unordered_set<RenderFrameHost*> pending_replies_; 258 // true.
259 std::unordered_set<RenderFrameHost*> pending_initial_replies_;
260
261 // The frame (if any) that is still expected to reply to the last pending
262 // "find next" request.
263 RenderFrameHost* pending_find_next_reply_;
259 264
260 // Indicates whether an update to the active match ordinal is expected. Once 265 // Indicates whether an update to the active match ordinal is expected. Once
261 // set, |pending_active_match_ordinal_| will not reset until an update to the 266 // set, |pending_active_match_ordinal_| will not reset until an update to the
262 // active match ordinal is received in response to the find request with ID 267 // active match ordinal is received in response to the find request with ID
263 // |current_request_.id| (the latest request). 268 // |current_request_.id| (the latest request).
264 bool pending_active_match_ordinal_; 269 bool pending_active_match_ordinal_;
265 270
266 // The number of matches found in each frame. There will necessarily be 271 // The number of matches found in each frame. There will necessarily be
267 // entries in this map for every frame that is being (or has been) searched in 272 // entries in this map for every frame that is being (or has been) searched in
268 // the current find session, and no other frames. 273 // the current find session, and no other frames.
(...skipping 17 matching lines...) Expand all
286 gfx::Rect selection_rect_; 291 gfx::Rect selection_rect_;
287 292
288 // Find requests are queued here when previous requests need to be handled 293 // Find requests are queued here when previous requests need to be handled
289 // before these ones can be properly routed. 294 // before these ones can be properly routed.
290 std::queue<FindRequest> find_request_queue_; 295 std::queue<FindRequest> find_request_queue_;
291 }; 296 };
292 297
293 } // namespace content 298 } // namespace content
294 299
295 #endif // CONTENT_BROWSER_FIND_REQUEST_MANAGER_H_ 300 #endif // CONTENT_BROWSER_FIND_REQUEST_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/find_request_manager.cc » ('j') | content/browser/find_request_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698