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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 10905058: Upstream the Android port find-in-page feature. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit fixes. Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/view_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateContentRestrictions, 670 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateContentRestrictions,
671 OnUpdateContentRestrictions) 671 OnUpdateContentRestrictions)
672 IPC_MESSAGE_HANDLER(ViewHostMsg_GoToEntryAtOffset, OnGoToEntryAtOffset) 672 IPC_MESSAGE_HANDLER(ViewHostMsg_GoToEntryAtOffset, OnGoToEntryAtOffset)
673 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateZoomLimits, OnUpdateZoomLimits) 673 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateZoomLimits, OnUpdateZoomLimits)
674 IPC_MESSAGE_HANDLER(ViewHostMsg_SaveURLAs, OnSaveURL) 674 IPC_MESSAGE_HANDLER(ViewHostMsg_SaveURLAs, OnSaveURL)
675 IPC_MESSAGE_HANDLER(ViewHostMsg_EnumerateDirectory, OnEnumerateDirectory) 675 IPC_MESSAGE_HANDLER(ViewHostMsg_EnumerateDirectory, OnEnumerateDirectory)
676 IPC_MESSAGE_HANDLER(ViewHostMsg_JSOutOfMemory, OnJSOutOfMemory) 676 IPC_MESSAGE_HANDLER(ViewHostMsg_JSOutOfMemory, OnJSOutOfMemory)
677 IPC_MESSAGE_HANDLER(ViewHostMsg_RegisterProtocolHandler, 677 IPC_MESSAGE_HANDLER(ViewHostMsg_RegisterProtocolHandler,
678 OnRegisterProtocolHandler) 678 OnRegisterProtocolHandler)
679 IPC_MESSAGE_HANDLER(ViewHostMsg_Find_Reply, OnFindReply) 679 IPC_MESSAGE_HANDLER(ViewHostMsg_Find_Reply, OnFindReply)
680 #if defined(OS_ANDROID)
681 IPC_MESSAGE_HANDLER(ViewHostMsg_FindMatchRects_Reply,
682 OnFindMatchRectsReply)
683 #endif
680 IPC_MESSAGE_HANDLER(ViewHostMsg_CrashedPlugin, OnCrashedPlugin) 684 IPC_MESSAGE_HANDLER(ViewHostMsg_CrashedPlugin, OnCrashedPlugin)
681 IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed) 685 IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed)
682 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenColorChooser, OnOpenColorChooser) 686 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenColorChooser, OnOpenColorChooser)
683 IPC_MESSAGE_HANDLER(ViewHostMsg_EndColorChooser, OnEndColorChooser) 687 IPC_MESSAGE_HANDLER(ViewHostMsg_EndColorChooser, OnEndColorChooser)
684 IPC_MESSAGE_HANDLER(ViewHostMsg_SetSelectedColorInColorChooser, 688 IPC_MESSAGE_HANDLER(ViewHostMsg_SetSelectedColorInColorChooser,
685 OnSetSelectedColorInColorChooser) 689 OnSetSelectedColorInColorChooser)
686 IPC_MESSAGE_HANDLER(ViewHostMsg_PepperPluginHung, OnPepperPluginHung) 690 IPC_MESSAGE_HANDLER(ViewHostMsg_PepperPluginHung, OnPepperPluginHung)
687 IPC_MESSAGE_HANDLER(ViewHostMsg_WebUISend, OnWebUISend) 691 IPC_MESSAGE_HANDLER(ViewHostMsg_WebUISend, OnWebUISend)
688 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestPpapiBrokerPermission, 692 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestPpapiBrokerPermission,
689 OnRequestPpapiBrokerPermission) 693 OnRequestPpapiBrokerPermission)
(...skipping 1503 matching lines...) Expand 10 before | Expand all | Expand 10 after
2193 int number_of_matches, 2197 int number_of_matches,
2194 const gfx::Rect& selection_rect, 2198 const gfx::Rect& selection_rect,
2195 int active_match_ordinal, 2199 int active_match_ordinal,
2196 bool final_update) { 2200 bool final_update) {
2197 if (delegate_) { 2201 if (delegate_) {
2198 delegate_->FindReply(this, request_id, number_of_matches, selection_rect, 2202 delegate_->FindReply(this, request_id, number_of_matches, selection_rect,
2199 active_match_ordinal, final_update); 2203 active_match_ordinal, final_update);
2200 } 2204 }
2201 } 2205 }
2202 2206
2207 #if defined(OS_ANDROID)
2208 void WebContentsImpl::OnFindMatchRectsReply(
2209 int version,
2210 const std::vector<gfx::RectF>& rects,
2211 const gfx::RectF& active_rect) {
2212 if (delegate_)
2213 delegate_->FindMatchRectsReply(this, version, rects, active_rect);
2214 }
2215 #endif
2216
2203 void WebContentsImpl::OnCrashedPlugin(const FilePath& plugin_path) { 2217 void WebContentsImpl::OnCrashedPlugin(const FilePath& plugin_path) {
2204 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 2218 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
2205 PluginCrashed(plugin_path)); 2219 PluginCrashed(plugin_path));
2206 } 2220 }
2207 2221
2208 void WebContentsImpl::OnAppCacheAccessed(const GURL& manifest_url, 2222 void WebContentsImpl::OnAppCacheAccessed(const GURL& manifest_url,
2209 bool blocked_by_policy) { 2223 bool blocked_by_policy) {
2210 // Notify observers about navigation. 2224 // Notify observers about navigation.
2211 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 2225 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
2212 AppCacheAccessed(manifest_url, blocked_by_policy)); 2226 AppCacheAccessed(manifest_url, blocked_by_policy));
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after
3256 old_browser_plugin_host()->embedder_render_process_host(); 3270 old_browser_plugin_host()->embedder_render_process_host();
3257 *embedder_container_id = old_browser_plugin_host()->instance_id(); 3271 *embedder_container_id = old_browser_plugin_host()->instance_id();
3258 int embedder_process_id = 3272 int embedder_process_id =
3259 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; 3273 embedder_render_process_host ? embedder_render_process_host->GetID() : -1;
3260 if (embedder_process_id != -1) { 3274 if (embedder_process_id != -1) {
3261 *embedder_channel_name = 3275 *embedder_channel_name =
3262 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), 3276 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(),
3263 embedder_process_id); 3277 embedder_process_id);
3264 } 3278 }
3265 } 3279 }
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698