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

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

Issue 1600953003: Move find-in-page code from RenderView to RenderFrame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <utility> 10 #include <utility>
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateZoomLimits, OnUpdateZoomLimits) 654 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateZoomLimits, OnUpdateZoomLimits)
655 IPC_MESSAGE_HANDLER(ViewHostMsg_PageScaleFactorChanged, 655 IPC_MESSAGE_HANDLER(ViewHostMsg_PageScaleFactorChanged,
656 OnPageScaleFactorChanged) 656 OnPageScaleFactorChanged)
657 IPC_MESSAGE_HANDLER(ViewHostMsg_EnumerateDirectory, OnEnumerateDirectory) 657 IPC_MESSAGE_HANDLER(ViewHostMsg_EnumerateDirectory, OnEnumerateDirectory)
658 IPC_MESSAGE_HANDLER(FrameHostMsg_RegisterProtocolHandler, 658 IPC_MESSAGE_HANDLER(FrameHostMsg_RegisterProtocolHandler,
659 OnRegisterProtocolHandler) 659 OnRegisterProtocolHandler)
660 IPC_MESSAGE_HANDLER(FrameHostMsg_UnregisterProtocolHandler, 660 IPC_MESSAGE_HANDLER(FrameHostMsg_UnregisterProtocolHandler,
661 OnUnregisterProtocolHandler) 661 OnUnregisterProtocolHandler)
662 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdatePageImportanceSignals, 662 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdatePageImportanceSignals,
663 OnUpdatePageImportanceSignals) 663 OnUpdatePageImportanceSignals)
664 IPC_MESSAGE_HANDLER(ViewHostMsg_Find_Reply, OnFindReply) 664 IPC_MESSAGE_HANDLER(FrameHostMsg_Find_Reply, OnFindReply)
665 IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed) 665 IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed)
666 IPC_MESSAGE_HANDLER(ViewHostMsg_WebUISend, OnWebUISend) 666 IPC_MESSAGE_HANDLER(ViewHostMsg_WebUISend, OnWebUISend)
667 #if defined(ENABLE_PLUGINS) 667 #if defined(ENABLE_PLUGINS)
668 IPC_MESSAGE_HANDLER(FrameHostMsg_PepperInstanceCreated, 668 IPC_MESSAGE_HANDLER(FrameHostMsg_PepperInstanceCreated,
669 OnPepperInstanceCreated) 669 OnPepperInstanceCreated)
670 IPC_MESSAGE_HANDLER(FrameHostMsg_PepperInstanceDeleted, 670 IPC_MESSAGE_HANDLER(FrameHostMsg_PepperInstanceDeleted,
671 OnPepperInstanceDeleted) 671 OnPepperInstanceDeleted)
672 IPC_MESSAGE_HANDLER(FrameHostMsg_PepperPluginHung, OnPepperPluginHung) 672 IPC_MESSAGE_HANDLER(FrameHostMsg_PepperPluginHung, OnPepperPluginHung)
673 IPC_MESSAGE_HANDLER(FrameHostMsg_PluginCrashed, OnPluginCrashed) 673 IPC_MESSAGE_HANDLER(FrameHostMsg_PluginCrashed, OnPluginCrashed)
674 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestPpapiBrokerPermission, 674 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestPpapiBrokerPermission,
675 OnRequestPpapiBrokerPermission) 675 OnRequestPpapiBrokerPermission)
676 IPC_MESSAGE_HANDLER_GENERIC(BrowserPluginHostMsg_Attach, 676 IPC_MESSAGE_HANDLER_GENERIC(BrowserPluginHostMsg_Attach,
677 OnBrowserPluginMessage(render_frame_host, 677 OnBrowserPluginMessage(render_frame_host,
678 message)) 678 message))
679 #endif 679 #endif
680 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateFaviconURL, OnUpdateFaviconURL) 680 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateFaviconURL, OnUpdateFaviconURL)
681 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowValidationMessage, 681 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowValidationMessage,
682 OnShowValidationMessage) 682 OnShowValidationMessage)
683 IPC_MESSAGE_HANDLER(ViewHostMsg_HideValidationMessage, 683 IPC_MESSAGE_HANDLER(ViewHostMsg_HideValidationMessage,
684 OnHideValidationMessage) 684 OnHideValidationMessage)
685 IPC_MESSAGE_HANDLER(ViewHostMsg_MoveValidationMessage, 685 IPC_MESSAGE_HANDLER(ViewHostMsg_MoveValidationMessage,
686 OnMoveValidationMessage) 686 OnMoveValidationMessage)
687 #if defined(OS_ANDROID) && !defined(USE_AURA) 687 #if defined(OS_ANDROID) && !defined(USE_AURA)
688 IPC_MESSAGE_HANDLER(ViewHostMsg_FindMatchRects_Reply, 688 IPC_MESSAGE_HANDLER(FrameHostMsg_FindMatchRects_Reply,
689 OnFindMatchRectsReply) 689 OnFindMatchRectsReply)
690 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenDateTimeDialog, 690 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenDateTimeDialog,
691 OnOpenDateTimeDialog) 691 OnOpenDateTimeDialog)
692 #endif 692 #endif
693 IPC_MESSAGE_UNHANDLED(handled = false) 693 IPC_MESSAGE_UNHANDLED(handled = false)
694 IPC_END_MESSAGE_MAP() 694 IPC_END_MESSAGE_MAP()
695 render_view_message_source_ = NULL; 695 render_view_message_source_ = NULL;
696 render_frame_message_source_ = NULL; 696 render_frame_message_source_ = NULL;
697 697
698 return handled; 698 return handled;
(...skipping 2154 matching lines...) Expand 10 before | Expand all | Expand 10 after
2853 if (search_text.empty()) { 2853 if (search_text.empty()) {
2854 NOTREACHED(); 2854 NOTREACHED();
2855 return; 2855 return;
2856 } 2856 }
2857 2857
2858 // See if a top level browser plugin handles the find request first. 2858 // See if a top level browser plugin handles the find request first.
2859 if (browser_plugin_embedder_ && 2859 if (browser_plugin_embedder_ &&
2860 browser_plugin_embedder_->Find(request_id, search_text, options)) { 2860 browser_plugin_embedder_->Find(request_id, search_text, options)) {
2861 return; 2861 return;
2862 } 2862 }
2863 Send(new ViewMsg_Find(GetRoutingID(), request_id, search_text, options)); 2863 GetMainFrame()->Send(new FrameMsg_Find(
2864 GetMainFrame()->GetRoutingID(), request_id, search_text, options));
2864 } 2865 }
2865 2866
2866 void WebContentsImpl::StopFinding(StopFindAction action) { 2867 void WebContentsImpl::StopFinding(StopFindAction action) {
2867 // See if a top level browser plugin handles the stop finding request first. 2868 // See if a top level browser plugin handles the stop finding request first.
2868 if (browser_plugin_embedder_ && 2869 if (browser_plugin_embedder_ &&
2869 browser_plugin_embedder_->StopFinding(action)) { 2870 browser_plugin_embedder_->StopFinding(action)) {
2870 return; 2871 return;
2871 } 2872 }
2872 Send(new ViewMsg_StopFinding(GetRoutingID(), action)); 2873 GetMainFrame()->Send(new FrameMsg_StopFinding(
2874 GetMainFrame()->GetRoutingID(), action));
2873 } 2875 }
2874 2876
2875 void WebContentsImpl::InsertCSS(const std::string& css) { 2877 void WebContentsImpl::InsertCSS(const std::string& css) {
2876 GetMainFrame()->Send(new FrameMsg_CSSInsertRequest( 2878 GetMainFrame()->Send(new FrameMsg_CSSInsertRequest(
2877 GetMainFrame()->GetRoutingID(), css)); 2879 GetMainFrame()->GetRoutingID(), css));
2878 } 2880 }
2879 2881
2880 bool WebContentsImpl::WasRecentlyAudible() { 2882 bool WebContentsImpl::WasRecentlyAudible() {
2881 return audio_stream_monitor_.WasRecentlyAudible(); 2883 return audio_stream_monitor_.WasRecentlyAudible();
2882 } 2884 }
(...skipping 1867 matching lines...) Expand 10 before | Expand all | Expand 10 after
4750 const WebContentsObserver::MediaPlayerId& id) { 4752 const WebContentsObserver::MediaPlayerId& id) {
4751 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); 4753 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id));
4752 } 4754 }
4753 4755
4754 void WebContentsImpl::MediaStoppedPlaying( 4756 void WebContentsImpl::MediaStoppedPlaying(
4755 const WebContentsObserver::MediaPlayerId& id) { 4757 const WebContentsObserver::MediaPlayerId& id) {
4756 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); 4758 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id));
4757 } 4759 }
4758 4760
4759 } // namespace content 4761 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698