| 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 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 667 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateContentRestrictions, | 667 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateContentRestrictions, |
| 668 OnUpdateContentRestrictions) | 668 OnUpdateContentRestrictions) |
| 669 IPC_MESSAGE_HANDLER(ViewHostMsg_GoToEntryAtOffset, OnGoToEntryAtOffset) | 669 IPC_MESSAGE_HANDLER(ViewHostMsg_GoToEntryAtOffset, OnGoToEntryAtOffset) |
| 670 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateZoomLimits, OnUpdateZoomLimits) | 670 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateZoomLimits, OnUpdateZoomLimits) |
| 671 IPC_MESSAGE_HANDLER(ViewHostMsg_SaveURLAs, OnSaveURL) | 671 IPC_MESSAGE_HANDLER(ViewHostMsg_SaveURLAs, OnSaveURL) |
| 672 IPC_MESSAGE_HANDLER(ViewHostMsg_EnumerateDirectory, OnEnumerateDirectory) | 672 IPC_MESSAGE_HANDLER(ViewHostMsg_EnumerateDirectory, OnEnumerateDirectory) |
| 673 IPC_MESSAGE_HANDLER(ViewHostMsg_JSOutOfMemory, OnJSOutOfMemory) | 673 IPC_MESSAGE_HANDLER(ViewHostMsg_JSOutOfMemory, OnJSOutOfMemory) |
| 674 IPC_MESSAGE_HANDLER(ViewHostMsg_RegisterProtocolHandler, | 674 IPC_MESSAGE_HANDLER(ViewHostMsg_RegisterProtocolHandler, |
| 675 OnRegisterProtocolHandler) | 675 OnRegisterProtocolHandler) |
| 676 IPC_MESSAGE_HANDLER(ViewHostMsg_Find_Reply, OnFindReply) | 676 IPC_MESSAGE_HANDLER(ViewHostMsg_Find_Reply, OnFindReply) |
| 677 #if defined(OS_ANDROID) |
| 678 IPC_MESSAGE_HANDLER(ViewHostMsg_GetFindMatchRects_Reply, |
| 679 OnGetFindMatchRectsReply) |
| 680 #endif |
| 677 IPC_MESSAGE_HANDLER(ViewHostMsg_CrashedPlugin, OnCrashedPlugin) | 681 IPC_MESSAGE_HANDLER(ViewHostMsg_CrashedPlugin, OnCrashedPlugin) |
| 678 IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed) | 682 IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed) |
| 679 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenColorChooser, OnOpenColorChooser) | 683 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenColorChooser, OnOpenColorChooser) |
| 680 IPC_MESSAGE_HANDLER(ViewHostMsg_EndColorChooser, OnEndColorChooser) | 684 IPC_MESSAGE_HANDLER(ViewHostMsg_EndColorChooser, OnEndColorChooser) |
| 681 IPC_MESSAGE_HANDLER(ViewHostMsg_SetSelectedColorInColorChooser, | 685 IPC_MESSAGE_HANDLER(ViewHostMsg_SetSelectedColorInColorChooser, |
| 682 OnSetSelectedColorInColorChooser) | 686 OnSetSelectedColorInColorChooser) |
| 683 IPC_MESSAGE_HANDLER(ViewHostMsg_PepperPluginHung, OnPepperPluginHung) | 687 IPC_MESSAGE_HANDLER(ViewHostMsg_PepperPluginHung, OnPepperPluginHung) |
| 684 IPC_MESSAGE_HANDLER(ViewHostMsg_WebUISend, OnWebUISend) | 688 IPC_MESSAGE_HANDLER(ViewHostMsg_WebUISend, OnWebUISend) |
| 685 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestPpapiBrokerPermission, | 689 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestPpapiBrokerPermission, |
| 686 OnRequestPpapiBrokerPermission) | 690 OnRequestPpapiBrokerPermission) |
| (...skipping 1503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2190 int number_of_matches, | 2194 int number_of_matches, |
| 2191 const gfx::Rect& selection_rect, | 2195 const gfx::Rect& selection_rect, |
| 2192 int active_match_ordinal, | 2196 int active_match_ordinal, |
| 2193 bool final_update) { | 2197 bool final_update) { |
| 2194 if (delegate_) { | 2198 if (delegate_) { |
| 2195 delegate_->FindReply(this, request_id, number_of_matches, selection_rect, | 2199 delegate_->FindReply(this, request_id, number_of_matches, selection_rect, |
| 2196 active_match_ordinal, final_update); | 2200 active_match_ordinal, final_update); |
| 2197 } | 2201 } |
| 2198 } | 2202 } |
| 2199 | 2203 |
| 2204 #if defined(OS_ANDROID) |
| 2205 void WebContentsImpl::OnGetFindMatchRectsReply( |
| 2206 int version, |
| 2207 const std::vector<gfx::RectF>& rects, |
| 2208 const gfx::RectF& active_rect) { |
| 2209 if (delegate_) |
| 2210 delegate_->GetFindMatchRectsReply(this, version, rects, active_rect); |
| 2211 } |
| 2212 #endif |
| 2213 |
| 2200 void WebContentsImpl::OnCrashedPlugin(const FilePath& plugin_path) { | 2214 void WebContentsImpl::OnCrashedPlugin(const FilePath& plugin_path) { |
| 2201 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 2215 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 2202 PluginCrashed(plugin_path)); | 2216 PluginCrashed(plugin_path)); |
| 2203 } | 2217 } |
| 2204 | 2218 |
| 2205 void WebContentsImpl::OnAppCacheAccessed(const GURL& manifest_url, | 2219 void WebContentsImpl::OnAppCacheAccessed(const GURL& manifest_url, |
| 2206 bool blocked_by_policy) { | 2220 bool blocked_by_policy) { |
| 2207 // Notify observers about navigation. | 2221 // Notify observers about navigation. |
| 2208 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 2222 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 2209 AppCacheAccessed(manifest_url, blocked_by_policy)); | 2223 AppCacheAccessed(manifest_url, blocked_by_policy)); |
| (...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3253 old_browser_plugin_host()->embedder_render_process_host(); | 3267 old_browser_plugin_host()->embedder_render_process_host(); |
| 3254 *embedder_container_id = old_browser_plugin_host()->instance_id(); | 3268 *embedder_container_id = old_browser_plugin_host()->instance_id(); |
| 3255 int embedder_process_id = | 3269 int embedder_process_id = |
| 3256 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; | 3270 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; |
| 3257 if (embedder_process_id != -1) { | 3271 if (embedder_process_id != -1) { |
| 3258 *embedder_channel_name = | 3272 *embedder_channel_name = |
| 3259 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), | 3273 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), |
| 3260 embedder_process_id); | 3274 embedder_process_id); |
| 3261 } | 3275 } |
| 3262 } | 3276 } |
| OLD | NEW |