diff options
author | joth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-11 03:49:01 +0000 |
---|---|---|
committer | joth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-11 03:49:01 +0000 |
commit | 733a58fc17e9188135cf7e29ac82870e2dd2cddd (patch) | |
tree | a6868f0f7a55185b4c62b0ec8ab174fd17ac8523 /content | |
parent | c5eeb9aefdf55a4ea9dfae28869a02a8e09f808c (diff) | |
download | chromium_src-733a58fc17e9188135cf7e29ac82870e2dd2cddd.zip chromium_src-733a58fc17e9188135cf7e29ac82870e2dd2cddd.tar.gz chromium_src-733a58fc17e9188135cf7e29ac82870e2dd2cddd.tar.bz2 |
Remove obsolete code
FindReplyACK could never have any effect, because queued_find_reply_message_
can only ever be NULL.
BUG=83097
Review URL: https://chromiumcodereview.appspot.com/10836195
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151186 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/browser/web_contents/web_contents_impl.cc | 9 | ||||
-rw-r--r-- | content/common/view_messages.h | 6 | ||||
-rw-r--r-- | content/renderer/render_view_impl.cc | 32 | ||||
-rw-r--r-- | content/renderer/render_view_impl.h | 6 |
4 files changed, 6 insertions, 47 deletions
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc index ac4528d..c70cbd0 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc @@ -2129,15 +2129,6 @@ void WebContentsImpl::OnFindReply(int request_id, delegate_->FindReply(this, request_id, number_of_matches, selection_rect, active_match_ordinal, final_update); } - - // Send a notification to the renderer that we are ready to receive more - // results from the scoping effort of the Find operation. The FindInPage - // scoping is asynchronous and periodically sends results back up to the - // browser using IPC. In an effort to not spam the browser we have the - // browser send an ACK for each FindReply message and have the renderer - // queue up the latest status message while waiting for this ACK. - GetRenderViewHostImpl()->Send( - new ViewMsg_FindReplyACK(GetRenderViewHost()->GetRoutingID())); } void WebContentsImpl::OnCrashedPlugin(const FilePath& plugin_path) { diff --git a/content/common/view_messages.h b/content/common/view_messages.h index 71c730a..4e8333c 100644 --- a/content/common/view_messages.h +++ b/content/common/view_messages.h @@ -956,12 +956,6 @@ IPC_MESSAGE_ROUTED3(ViewMsg_Find, IPC_MESSAGE_ROUTED1(ViewMsg_StopFinding, content::StopFindAction /* action */) -// Used to notify the render-view that the browser has received a reply for -// the Find operation and is interested in receiving the next one. This is -// used to prevent the renderer from spamming the browser process with -// results. -IPC_MESSAGE_ROUTED0(ViewMsg_FindReplyACK) - // These messages are typically generated from context menus and request the // renderer to apply the specified operation to the current selection. IPC_MESSAGE_ROUTED0(ViewMsg_Undo) diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc index 14c8957..005482b 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -877,7 +877,6 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) { IPC_MESSAGE_HANDLER(ViewMsg_ExecuteEditCommand, OnExecuteEditCommand) IPC_MESSAGE_HANDLER(ViewMsg_Find, OnFind) IPC_MESSAGE_HANDLER(ViewMsg_StopFinding, OnStopFinding) - IPC_MESSAGE_HANDLER(ViewMsg_FindReplyACK, OnFindReplyAck) IPC_MESSAGE_HANDLER(ViewMsg_Zoom, OnZoom) IPC_MESSAGE_HANDLER(ViewMsg_SetZoomLevel, OnSetZoomLevel) IPC_MESSAGE_HANDLER(ViewMsg_ZoomFactor, OnZoomFactor) @@ -3659,23 +3658,12 @@ void RenderViewImpl::reportFindInPageMatchCount(int request_id, int count, if (!count) active_match_ordinal = 0; - IPC::Message* msg = new ViewHostMsg_Find_Reply( - routing_id_, - request_id, - count, - gfx::Rect(), - active_match_ordinal, - final_update); - - // If we have a message that has been queued up, then we should just replace - // it. The ACK from the browser will make sure it gets sent when the browser - // wants it. - if (queued_find_reply_message_.get()) { - queued_find_reply_message_.reset(msg); - } else { - // Send the search result over to the browser process. - Send(msg); - } + Send(new ViewHostMsg_Find_Reply(routing_id_, + request_id, + count, + gfx::Rect(), + active_match_ordinal, + final_update)); } void RenderViewImpl::reportFindInPageSelection(int request_id, @@ -4440,14 +4428,6 @@ void RenderViewImpl::OnStopFinding(content::StopFindAction action) { } } -void RenderViewImpl::OnFindReplyAck() { - // Check if there is any queued up request waiting to be sent. - if (queued_find_reply_message_.get()) { - // Send the search result over to the browser process. - Send(queued_find_reply_message_.release()); - } -} - void RenderViewImpl::OnZoom(content::PageZoom zoom) { if (!webview()) // Not sure if this can happen, but no harm in being safe. return; diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h index 63478c0..18918d6 100644 --- a/content/renderer/render_view_impl.h +++ b/content/renderer/render_view_impl.h @@ -937,7 +937,6 @@ class RenderViewImpl : public RenderWidget, void OnFileChooserResponse( const std::vector<ui::SelectedFileInfo>& files); void OnFind(int request_id, const string16&, const WebKit::WebFindOptions&); - void OnFindReplyAck(); void OnGetAllSavableResourceLinksForCurrentPage(const GURL& page_url); void OnGetSerializedHtmlDataForCurrentPageWithLocalLinks( const std::vector<GURL>& links, @@ -1364,11 +1363,6 @@ class RenderViewImpl : public RenderWidget, // shouldn't count against their own |shared_popup_counter_|. bool decrement_shared_popup_at_destruction_; - // If the browser hasn't sent us an ACK for the last FindReply we sent - // to it, then we need to queue up the message (keeping only the most - // recent message if new ones come in). - scoped_ptr<IPC::Message> queued_find_reply_message_; - // Stores edit commands associated to the next key event. // Shall be cleared as soon as the next key event is processed. EditCommands edit_commands_; |