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

Unified Diff: content/browser/find_request_manager.cc

Issue 2723253002: Fix beep when navigating/closing a page with find bar open
Patch Set: android Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/find_request_manager.h ('k') | content/browser/find_request_manager_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/find_request_manager.cc
diff --git a/content/browser/find_request_manager.cc b/content/browser/find_request_manager.cc
index 5c2eeb2df374da1d18e384648cea298a81708156..2568c53a8024264f2d81989ffd5d6bb67493a6c8 100644
--- a/content/browser/find_request_manager.cc
+++ b/content/browser/find_request_manager.cc
@@ -193,7 +193,8 @@ void FindRequestManager::OnFindReply(RenderFrameHost* rfh,
}
if (!final_update) {
- NotifyFindReply(request_id, false /* final_update */);
+ NotifyFindReply(request_id, false /* final_update */,
+ false /* was_frame_removal */);
return;
}
@@ -201,7 +202,8 @@ void FindRequestManager::OnFindReply(RenderFrameHost* rfh,
pending_initial_replies_.erase(rfh);
if (request_id == current_session_id_ && !pending_initial_replies_.empty()) {
- NotifyFindReply(request_id, false /* final_update */);
+ NotifyFindReply(request_id, false /* final_update */,
+ false /* was_frame_removal */);
return;
}
@@ -259,7 +261,8 @@ void FindRequestManager::RemoveFrame(RenderFrameHost* rfh) {
if (!pending_initial_replies_.count(rfh) && pending_find_next_reply_ != rfh) {
bool final_update =
pending_initial_replies_.empty() && !pending_find_next_reply_;
- NotifyFindReply(current_session_id_, final_update);
+ NotifyFindReply(current_session_id_, final_update,
+ true /* was_frame_removal */);
return;
}
@@ -449,7 +452,9 @@ void FindRequestManager::SendFindIPC(const FindRequest& request,
request.search_text, request.options));
}
-void FindRequestManager::NotifyFindReply(int request_id, bool final_update) {
+void FindRequestManager::NotifyFindReply(int request_id,
+ bool final_update,
+ bool was_frame_removal) {
if (request_id == kInvalidId) {
NOTREACHED();
return;
@@ -463,7 +468,8 @@ void FindRequestManager::NotifyFindReply(int request_id, bool final_update) {
last_reported_id_ = request_id;
contents_->NotifyFindReply(request_id, number_of_matches_, selection_rect_,
- active_match_ordinal_, final_update);
+ active_match_ordinal_, final_update,
+ was_frame_removal);
}
RenderFrameHost* FindRequestManager::GetInitialFrame(bool forward) const {
@@ -550,7 +556,8 @@ void FindRequestManager::FinalUpdateReceived(int request_id,
// that |final_update| will be set to false if there are still pending
// replies expected from the initial find request.
NotifyFindReply(request_id,
- pending_initial_replies_.empty() /* final_update */);
+ pending_initial_replies_.empty() /* final_update */,
+ false /* was_frame_removal */);
AdvanceQueue(request_id);
return;
}
@@ -587,7 +594,8 @@ void FindRequestManager::FinalUpdateReceived(int request_id,
// Forward the find reply without |final_update| set because the active match
// has not yet been found.
- NotifyFindReply(request_id, false /* final_update */);
+ NotifyFindReply(request_id, false /* final_update */,
+ false /* was_frame_removal */);
current_request_.options.findNext = true;
SendFindIPC(current_request_, target_rfh);
« no previous file with comments | « content/browser/find_request_manager.h ('k') | content/browser/find_request_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698