| OLD | NEW |
| 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 #include "content/browser/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 2111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2122 | 2122 |
| 2123 void WebContentsImpl::OnFindReply(int request_id, | 2123 void WebContentsImpl::OnFindReply(int request_id, |
| 2124 int number_of_matches, | 2124 int number_of_matches, |
| 2125 const gfx::Rect& selection_rect, | 2125 const gfx::Rect& selection_rect, |
| 2126 int active_match_ordinal, | 2126 int active_match_ordinal, |
| 2127 bool final_update) { | 2127 bool final_update) { |
| 2128 if (delegate_) { | 2128 if (delegate_) { |
| 2129 delegate_->FindReply(this, request_id, number_of_matches, selection_rect, | 2129 delegate_->FindReply(this, request_id, number_of_matches, selection_rect, |
| 2130 active_match_ordinal, final_update); | 2130 active_match_ordinal, final_update); |
| 2131 } | 2131 } |
| 2132 | |
| 2133 // Send a notification to the renderer that we are ready to receive more | |
| 2134 // results from the scoping effort of the Find operation. The FindInPage | |
| 2135 // scoping is asynchronous and periodically sends results back up to the | |
| 2136 // browser using IPC. In an effort to not spam the browser we have the | |
| 2137 // browser send an ACK for each FindReply message and have the renderer | |
| 2138 // queue up the latest status message while waiting for this ACK. | |
| 2139 GetRenderViewHostImpl()->Send( | |
| 2140 new ViewMsg_FindReplyACK(GetRenderViewHost()->GetRoutingID())); | |
| 2141 } | 2132 } |
| 2142 | 2133 |
| 2143 void WebContentsImpl::OnCrashedPlugin(const FilePath& plugin_path) { | 2134 void WebContentsImpl::OnCrashedPlugin(const FilePath& plugin_path) { |
| 2144 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 2135 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 2145 PluginCrashed(plugin_path)); | 2136 PluginCrashed(plugin_path)); |
| 2146 } | 2137 } |
| 2147 | 2138 |
| 2148 void WebContentsImpl::OnAppCacheAccessed(const GURL& manifest_url, | 2139 void WebContentsImpl::OnAppCacheAccessed(const GURL& manifest_url, |
| 2149 bool blocked_by_policy) { | 2140 bool blocked_by_policy) { |
| 2150 // Notify observers about navigation. | 2141 // Notify observers about navigation. |
| (...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3150 old_browser_plugin_host()->embedder_render_process_host(); | 3141 old_browser_plugin_host()->embedder_render_process_host(); |
| 3151 *embedder_container_id = old_browser_plugin_host()->instance_id(); | 3142 *embedder_container_id = old_browser_plugin_host()->instance_id(); |
| 3152 int embedder_process_id = | 3143 int embedder_process_id = |
| 3153 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; | 3144 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; |
| 3154 if (embedder_process_id != -1) { | 3145 if (embedder_process_id != -1) { |
| 3155 *embedder_channel_name = | 3146 *embedder_channel_name = |
| 3156 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), | 3147 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), |
| 3157 embedder_process_id); | 3148 embedder_process_id); |
| 3158 } | 3149 } |
| 3159 } | 3150 } |
| OLD | NEW |