Commit 5d0a5f00 authored by paulmeyer's avatar paulmeyer Committed by Commit bot

This patch moves find-in-page code from RenderView to RenderFrame. This works...

This patch moves find-in-page code from RenderView to RenderFrame. This works towards the deprecation of RenderView, and is also the first step towards implementing multi-process find-in-page (for OOPIFs).

Design doc for multi-process find-in-page: https://docs.google.com/a/google.com/document/d/12S_6X2MWWLoyJslajcajL2ELU7zhodPxMOxa8Bg4Wg0/edit?usp=sharing

BUG=457440
TEST=existing tests (no functional difference)

Review URL: https://codereview.chromium.org/1600953003

Cr-Commit-Position: refs/heads/master@{#370767}
parent 571e0cc7
......@@ -141,14 +141,14 @@ void FindTabHelper::ActivateFindInPageResultForAccessibility() {
#if defined(OS_ANDROID)
void FindTabHelper::ActivateNearestFindResult(float x, float y) {
if (!find_op_aborted_ && !find_text_.empty()) {
web_contents()->GetRenderViewHost()->ActivateNearestFindResult(
web_contents()->GetMainFrame()->ActivateNearestFindResult(
current_find_request_id_, x, y);
}
}
void FindTabHelper::RequestFindMatchRects(int current_version) {
if (!find_op_aborted_ && !find_text_.empty())
web_contents()->GetRenderViewHost()->RequestFindMatchRects(current_version);
web_contents()->GetMainFrame()->RequestFindMatchRects(current_version);
}
#endif
......
......@@ -2351,6 +2351,17 @@ void RenderFrameHostImpl::DidCancelPopupMenu() {
#elif defined(OS_ANDROID)
void RenderFrameHostImpl::ActivateNearestFindResult(int request_id,
float x,
float y) {
Send(
new InputMsg_ActivateNearestFindResult(GetRoutingID(), request_id, x, y));
}
void RenderFrameHostImpl::RequestFindMatchRects(int current_version) {
Send(new FrameMsg_FindMatchRects(GetRoutingID(), current_version));
}
void RenderFrameHostImpl::DidSelectPopupMenuItems(
const std::vector<int>& selected_indices) {
Send(new FrameMsg_SelectPopupMenuItems(routing_id_, false, selected_indices));
......
......@@ -168,6 +168,10 @@ class CONTENT_EXPORT RenderFrameHostImpl
void InsertVisualStateCallback(
const VisualStateCallback& callback) override;
bool IsRenderFrameLive() override;
#if defined(OS_ANDROID)
void ActivateNearestFindResult(int request_id, float x, float y) override;
void RequestFindMatchRects(int current_version) override;
#endif
// IPC::Sender
bool Send(IPC::Message* msg) override;
......
......@@ -569,19 +569,6 @@ void RenderViewHostImpl::ClosePageIgnoringUnloadEvents() {
delegate_->Close(this);
}
#if defined(OS_ANDROID)
void RenderViewHostImpl::ActivateNearestFindResult(int request_id,
float x,
float y) {
Send(new InputMsg_ActivateNearestFindResult(GetRoutingID(),
request_id, x, y));
}
void RenderViewHostImpl::RequestFindMatchRects(int current_version) {
Send(new ViewMsg_FindMatchRects(GetRoutingID(), current_version));
}
#endif
void RenderViewHostImpl::RenderProcessReady(RenderProcessHost* host) {
if (render_view_ready_on_process_launch_) {
render_view_ready_on_process_launch_ = false;
......
......@@ -150,11 +150,6 @@ class CONTENT_EXPORT RenderViewHostImpl : public RenderViewHost,
void OnWebkitPreferencesChanged() override;
void SelectWordAroundCaret() override;
#if defined(OS_ANDROID)
void ActivateNearestFindResult(int request_id, float x, float y) override;
void RequestFindMatchRects(int current_version) override;
#endif
// RenderProcessHostObserver implementation
void RenderProcessReady(RenderProcessHost* host) override;
void RenderProcessExited(RenderProcessHost* host,
......
......@@ -639,7 +639,7 @@ bool WebContentsImpl::OnMessageReceived(RenderViewHost* render_view_host,
OnUnregisterProtocolHandler)
IPC_MESSAGE_HANDLER(FrameHostMsg_UpdatePageImportanceSignals,
OnUpdatePageImportanceSignals)
IPC_MESSAGE_HANDLER(ViewHostMsg_Find_Reply, OnFindReply)
IPC_MESSAGE_HANDLER(FrameHostMsg_Find_Reply, OnFindReply)
IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed)
IPC_MESSAGE_HANDLER(ViewHostMsg_WebUISend, OnWebUISend)
#if defined(ENABLE_PLUGINS)
......@@ -663,7 +663,7 @@ bool WebContentsImpl::OnMessageReceived(RenderViewHost* render_view_host,
IPC_MESSAGE_HANDLER(ViewHostMsg_MoveValidationMessage,
OnMoveValidationMessage)
#if defined(OS_ANDROID) && !defined(USE_AURA)
IPC_MESSAGE_HANDLER(ViewHostMsg_FindMatchRects_Reply,
IPC_MESSAGE_HANDLER(FrameHostMsg_FindMatchRects_Reply,
OnFindMatchRectsReply)
IPC_MESSAGE_HANDLER(ViewHostMsg_OpenDateTimeDialog,
OnOpenDateTimeDialog)
......@@ -2836,7 +2836,8 @@ void WebContentsImpl::Find(int request_id,
browser_plugin_embedder_->Find(request_id, search_text, options)) {
return;
}
Send(new ViewMsg_Find(GetRoutingID(), request_id, search_text, options));
GetMainFrame()->Send(new FrameMsg_Find(GetMainFrame()->GetRoutingID(),
request_id, search_text, options));
}
void WebContentsImpl::StopFinding(StopFindAction action) {
......@@ -2845,7 +2846,8 @@ void WebContentsImpl::StopFinding(StopFindAction action) {
browser_plugin_embedder_->StopFinding(action)) {
return;
}
Send(new ViewMsg_StopFinding(GetRoutingID(), action));
GetMainFrame()->Send(
new FrameMsg_StopFinding(GetMainFrame()->GetRoutingID(), action));
}
void WebContentsImpl::InsertCSS(const std::string& css) {
......
......@@ -35,11 +35,13 @@
#include "content/public/common/page_importance_signals.h"
#include "content/public/common/page_state.h"
#include "content/public/common/resource_response.h"
#include "content/public/common/stop_find_action.h"
#include "content/public/common/three_d_api_types.h"
#include "content/public/common/transition_element.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_platform_file.h"
#include "third_party/WebKit/public/platform/WebFocusType.h"
#include "third_party/WebKit/public/web/WebFindOptions.h"
#include "third_party/WebKit/public/web/WebFrameOwnerProperties.h"
#include "third_party/WebKit/public/web/WebTreeScopeType.h"
#include "ui/gfx/ipc/gfx_param_traits.h"
......@@ -84,6 +86,8 @@ IPC_ENUM_TRAITS_MAX_VALUE(blink::WebContextMenuData::InputFieldType,
IPC_ENUM_TRAITS_MAX_VALUE(blink::WebFocusType, blink::WebFocusTypeLast)
IPC_ENUM_TRAITS_MAX_VALUE(blink::WebFrameOwnerProperties::ScrollingMode,
blink::WebFrameOwnerProperties::ScrollingMode::Last)
IPC_ENUM_TRAITS_MAX_VALUE(content::StopFindAction,
content::STOP_FIND_ACTION_LAST)
IPC_ENUM_TRAITS(blink::WebSandboxFlags) // Bitmask.
IPC_ENUM_TRAITS_MAX_VALUE(blink::WebTreeScopeType,
blink::WebTreeScopeType::Last)
......@@ -92,6 +96,12 @@ IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::LoFiState,
content::LOFI_UNSPECIFIED,
content::LOFI_ON)
IPC_STRUCT_TRAITS_BEGIN(blink::WebFindOptions)
IPC_STRUCT_TRAITS_MEMBER(forward)
IPC_STRUCT_TRAITS_MEMBER(matchCase)
IPC_STRUCT_TRAITS_MEMBER(findNext)
IPC_STRUCT_TRAITS_END()
IPC_STRUCT_TRAITS_BEGIN(content::ColorSuggestion)
IPC_STRUCT_TRAITS_MEMBER(color)
IPC_STRUCT_TRAITS_MEMBER(label)
......@@ -746,6 +756,17 @@ IPC_MESSAGE_ROUTED1(FrameMsg_SetTextTrackSettings,
IPC_MESSAGE_ROUTED1(FrameMsg_PostMessageEvent, FrameMsg_PostMessage_Params)
#if defined(OS_ANDROID)
// Sent when the browser wants the bounding boxes of the current find matches.
//
// If match rects are already cached on the browser side, |current_version|
// should be the version number from the FrameHostMsg_FindMatchRects_Reply
// they came in, so the renderer can tell if it needs to send updated rects.
// Otherwise just pass -1 to always receive the list of rects.
//
// There must be an active search string (it is probably most useful to call
// this immediately after a FrameHostMsg_Find_Reply message arrives with
// final_update set to true).
IPC_MESSAGE_ROUTED1(FrameMsg_FindMatchRects, int /* current_version */)
// External popup menus.
IPC_MESSAGE_ROUTED2(FrameMsg_SelectPopupMenuItems,
......@@ -806,6 +827,16 @@ IPC_MESSAGE_ROUTED2(FrameMsg_AdvanceFocus,
blink::WebFocusType /* type */,
int32_t /* source_routing_id */)
// Sent when the user wants to search for a word on the page (find-in-page).
IPC_MESSAGE_ROUTED3(FrameMsg_Find,
int /* request_id */,
base::string16 /* search_text */,
blink::WebFindOptions)
// This message notifies the renderer that the user has closed the find-in-page
// window (and what action to take regarding the selection).
IPC_MESSAGE_ROUTED1(FrameMsg_StopFinding, content::StopFindAction /* action */)
#if defined(ENABLE_PLUGINS)
// Notifies the renderer of updates to the Plugin Power Saver origin whitelist.
IPC_MESSAGE_ROUTED1(FrameMsg_UpdatePluginContentOriginWhitelist,
......@@ -1361,6 +1392,19 @@ IPC_MESSAGE_ROUTED2(FrameHostMsg_AdvanceFocus,
blink::WebFocusType /* type */,
int32_t /* source_routing_id */)
// Result of string search in the document.
// Response to FrameMsg_Find with the results of the requested find-in-page
// search, the number of matches found and the selection rect (in screen
// coordinates) for the string found. If |final_update| is false, it signals
// that this is not the last Find_Reply message - more will be sent as the
// scoping effort continues.
IPC_MESSAGE_ROUTED5(FrameHostMsg_Find_Reply,
int /* request_id */,
int /* number of matches */,
gfx::Rect /* selection_rect */,
int /* active_match_ordinal */,
bool /* final_update */)
#if defined(OS_MACOSX) || defined(OS_ANDROID)
// Message to show/hide a popup menu using native controls.
......@@ -1370,6 +1414,28 @@ IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup)
#endif
#if defined(OS_ANDROID)
// Response to FrameMsg_FindMatchRects.
//
// |version| will contain the current version number of the renderer's find
// match list (incremented whenever they change), which should be passed in the
// next call to FrameMsg_FindMatchRects.
//
// |rects| will either contain a list of the enclosing rects of all matches
// found by the most recent Find operation, or will be empty if |version| is not
// greater than the |current_version| passed to FrameMsg_FindMatchRects (hence
// your locally cached rects should still be valid). The rect coords will be
// custom normalized fractions of the document size. The rects will be sorted by
// frame traversal order starting in the main frame, then by dom order.
//
// |active_rect| will contain the bounding box of the active find-in-page match
// marker, in similarly normalized coords (or an empty rect if there isn't one).
IPC_MESSAGE_ROUTED3(FrameHostMsg_FindMatchRects_Reply,
int /* version */,
std::vector<gfx::RectF> /* rects */,
gfx::RectF /* active_rect */)
#endif
// Adding a new message? Stick to the sort order above: first platform
// independent FrameMsg, then ifdefs for platform specific FrameMsg, then
// platform independent FrameHostMsg, then ifdefs for platform specific
......
......@@ -35,7 +35,6 @@
#include "content/public/common/page_zoom.h"
#include "content/public/common/referrer.h"
#include "content/public/common/renderer_preferences.h"
#include "content/public/common/stop_find_action.h"
#include "content/public/common/three_d_api_types.h"
#include "content/public/common/window_container_type.h"
#include "ipc/ipc_channel_handle.h"
......@@ -50,7 +49,6 @@
#include "third_party/WebKit/public/platform/WebScreenInfo.h"
#include "third_party/WebKit/public/platform/modules/screen_orientation/WebScreenOrientationType.h"
#include "third_party/WebKit/public/web/WebDeviceEmulationParams.h"
#include "third_party/WebKit/public/web/WebFindOptions.h"
#include "third_party/WebKit/public/web/WebMediaPlayerAction.h"
#include "third_party/WebKit/public/web/WebPluginAction.h"
#include "third_party/WebKit/public/web/WebPopupType.h"
......@@ -112,8 +110,6 @@ IPC_ENUM_TRAITS_MAX_VALUE(gfx::FontRenderParams::SubpixelRendering,
gfx::FontRenderParams::SUBPIXEL_RENDERING_MAX)
IPC_ENUM_TRAITS_MAX_VALUE(content::TapMultipleTargetsStrategy,
content::TAP_MULTIPLE_TARGETS_STRATEGY_MAX)
IPC_ENUM_TRAITS_MAX_VALUE(content::StopFindAction,
content::STOP_FIND_ACTION_LAST)
IPC_ENUM_TRAITS_MAX_VALUE(content::ThreeDAPIType,
content::THREE_D_API_TYPE_LAST)
IPC_ENUM_TRAITS_MAX_VALUE(media::MediaLogEvent::Type,
......@@ -129,12 +125,6 @@ IPC_ENUM_TRAITS_MAX_VALUE(
IPC_ENUM_TRAITS_MAX_VALUE(blink::ScrollerStyle, blink::ScrollerStyleOverlay)
#endif
IPC_STRUCT_TRAITS_BEGIN(blink::WebFindOptions)
IPC_STRUCT_TRAITS_MEMBER(forward)
IPC_STRUCT_TRAITS_MEMBER(matchCase)
IPC_STRUCT_TRAITS_MEMBER(findNext)
IPC_STRUCT_TRAITS_END()
IPC_STRUCT_TRAITS_BEGIN(blink::WebMediaPlayerAction)
IPC_STRUCT_TRAITS_MEMBER(type)
IPC_STRUCT_TRAITS_MEMBER(enable)
......@@ -669,17 +659,6 @@ IPC_MESSAGE_ROUTED2(ViewMsg_ShowContextMenu,
ui::MenuSourceType,
gfx::Point /* location where menu should be shown */)
// Sent when the user wants to search for a word on the page (find in page).
IPC_MESSAGE_ROUTED3(ViewMsg_Find,
int /* request_id */,
base::string16 /* search_text */,
blink::WebFindOptions)
// This message notifies the renderer that the user has closed the FindInPage
// window (and what action to take regarding the selection).
IPC_MESSAGE_ROUTED1(ViewMsg_StopFinding,
content::StopFindAction /* action */)
// Copies the image at location x, y to the clipboard (if there indeed is an
// image at that location).
IPC_MESSAGE_ROUTED2(ViewMsg_CopyImageAt,
......@@ -899,19 +878,6 @@ IPC_MESSAGE_CONTROL3(ViewMsg_SystemColorsChanged,
IPC_MESSAGE_CONTROL1(ViewMsg_SetWebKitSharedTimersSuspended,
bool /* suspend */)
// Sent when the browser wants the bounding boxes of the current find matches.
//
// If match rects are already cached on the browser side, |current_version|
// should be the version number from the ViewHostMsg_FindMatchRects_Reply
// they came in, so the renderer can tell if it needs to send updated rects.
// Otherwise just pass -1 to always receive the list of rects.
//
// There must be an active search string (it is probably most useful to call
// this immediately after a ViewHostMsg_Find_Reply message arrives with
// final_update set to true).
IPC_MESSAGE_ROUTED1(ViewMsg_FindMatchRects,
int /* current_version */)
// Notifies the renderer whether hiding/showing the top controls is enabled
// and whether or not to animate to the proper state.
IPC_MESSAGE_ROUTED3(ViewMsg_UpdateTopControlsState,
......@@ -1056,19 +1022,6 @@ IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateScreenRects_ACK)
IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove,
gfx::Rect /* position */)
// Result of string search in the page.
// Response to ViewMsg_Find with the results of the requested find-in-page
// search, the number of matches found and the selection rect (in screen
// coordinates) for the string found. If |final_update| is false, it signals
// that this is not the last Find_Reply message - more will be sent as the
// scoping effort continues.
IPC_MESSAGE_ROUTED5(ViewHostMsg_Find_Reply,
int /* request_id */,
int /* number of matches */,
gfx::Rect /* selection_rect */,
int /* active_match_ordinal */,
bool /* final_update */)
// Indicates that the render view has been closed in respose to a
// Close message.
IPC_MESSAGE_CONTROL1(ViewHostMsg_Close_ACK,
......@@ -1349,26 +1302,6 @@ IPC_MESSAGE_ROUTED1(ViewHostMsg_ForwardCompositorProto,
std::vector<uint8_t> /* proto */)
#if defined(OS_ANDROID)
// Response to ViewMsg_FindMatchRects.
//
// |version| will contain the current version number of the renderer's find
// match list (incremented whenever they change), which should be passed in the
// next call to ViewMsg_FindMatchRects.
//
// |rects| will either contain a list of the enclosing rects of all matches
// found by the most recent Find operation, or will be empty if |version| is not
// greater than the |current_version| passed to ViewMsg_FindMatchRects (hence
// your locally cached rects should still be valid). The rect coords will be
// custom normalized fractions of the document size. The rects will be sorted by
// frame traversal order starting in the main frame, then by dom order.
//
// |active_rect| will contain the bounding box of the active find-in-page match
// marker, in similarly normalized coords (or an empty rect if there isn't one).
IPC_MESSAGE_ROUTED3(ViewHostMsg_FindMatchRects_Reply,
int /* version */,
std::vector<gfx::RectF> /* rects */,
gfx::RectF /* active_rect */)
// Start an android intent with the given URI.
IPC_MESSAGE_ROUTED2(ViewHostMsg_StartContentIntent,
GURL /* content_url */,
......
......@@ -188,6 +188,15 @@ class CONTENT_EXPORT RenderFrameHost : public IPC::Listener,
// and still has a connection. This is valid for all frames.
virtual bool IsRenderFrameLive() = 0;
#if defined(OS_ANDROID)
// Selects and zooms to the find result nearest to the point (x,y)
// defined in find-in-page coordinates.
virtual void ActivateNearestFindResult(int request_id, float x, float y) = 0;
// Asks the renderer process to send the rects of the current find matches.
virtual void RequestFindMatchRects(int current_version) = 0;
#endif
private:
// This interface should only be implemented inside content.
friend class RenderFrameHostImpl;
......
......@@ -216,15 +216,6 @@ class CONTENT_EXPORT RenderViewHost : public IPC::Sender {
// Notify the render view host to select the word around the caret.
virtual void SelectWordAroundCaret() = 0;
#if defined(OS_ANDROID)
// Selects and zooms to the find result nearest to the point (x,y)
// defined in find-in-page coordinates.
virtual void ActivateNearestFindResult(int request_id, float x, float y) = 0;
// Asks the renderer to send the rects of the current find matches.
virtual void RequestFindMatchRects(int current_version) = 0;
#endif
private:
// This interface should only be implemented inside content.
friend class RenderViewHostImpl;
......
......@@ -668,9 +668,8 @@ v8::Local<v8::Context> PepperPluginInstanceImpl::GetMainWorldContext() {
void PepperPluginInstanceImpl::Delete() {
is_deleted_ = true;
if (render_frame_ && render_frame_->render_view() &&
render_frame_->render_view()->plugin_find_handler() == this) {
render_frame_->render_view()->set_plugin_find_handler(NULL);
if (render_frame_ && render_frame_->plugin_find_handler() == this) {
render_frame_->set_plugin_find_handler(nullptr);
}
// Keep a reference on the stack. See NOTE above.
......@@ -2532,7 +2531,7 @@ void PepperPluginInstanceImpl::SetPluginToHandleFindRequests(
render_frame_->GetRenderView()->GetMainRenderFrame() == render_frame_;
if (!is_main_frame)
return;
render_frame_->render_view()->set_plugin_find_handler(this);
render_frame_->set_plugin_find_handler(this);
}
void PepperPluginInstanceImpl::NumberOfFindResultsChanged(
......
This diff is collapsed.
......@@ -27,6 +27,7 @@
#include "content/public/common/console_message_level.h"
#include "content/public/common/javascript_message_type.h"
#include "content/public/common/referrer.h"
#include "content/public/common/stop_find_action.h"
#include "content/public/renderer/render_frame.h"
#include "content/renderer/render_frame_proxy.h"
#include "content/renderer/renderer_webcookiejar_impl.h"
......@@ -80,6 +81,7 @@ class WebWakeLockClient;
struct WebCompositionUnderline;
struct WebContextMenuData;
struct WebCursorInfo;
struct WebFindOptions;
struct WebScreenInfo;
}
......@@ -288,6 +290,14 @@ class CONTENT_EXPORT RenderFrameImpl
void FocusedNodeChangedForAccessibility(const blink::WebNode& node);
#if defined(ENABLE_PLUGINS)
// Get/set the plugin which will be used to handle document find requests.
void set_plugin_find_handler(PepperPluginInstanceImpl* plugin) {
plugin_find_handler_ = plugin;
}
PepperPluginInstanceImpl* plugin_find_handler() {
return plugin_find_handler_;
}
// Notification that a PPAPI plugin has been created.
void PepperPluginCreated(RendererPpapiHost* host);
......@@ -773,14 +783,6 @@ class CONTENT_EXPORT RenderFrameImpl
void OnTextTrackSettingsChanged(
const FrameMsg_TextTrackSettings_Params& params);
void OnPostMessageEvent(const FrameMsg_PostMessage_Params& params);
#if defined(OS_ANDROID)
void OnSelectPopupMenuItems(bool canceled,
const std::vector<int>& selected_indices);
#elif defined(OS_MACOSX)
void OnSelectPopupMenuItem(int selected_index);
void OnCopyToFindPboard();
#endif
void OnCommitNavigation(const ResourceResponseHead& response,
const GURL& stream_url,
const CommonNavigationParams& common_params,
......@@ -793,6 +795,19 @@ class CONTENT_EXPORT RenderFrameImpl
void OnGetSerializedHtmlWithLocalLinks(
const std::map<GURL, base::FilePath>& url_to_local_path);
void OnSerializeAsMHTML(const FrameMsg_SerializeAsMHTML_Params& params);
void OnFind(int request_id,
const base::string16& search_text,
const blink::WebFindOptions& options);
void OnStopFinding(StopFindAction action);
#if defined(OS_ANDROID)
void OnActivateNearestFindResult(int request_id, float x, float y);
void OnFindMatchRects(int current_version);
void OnSelectPopupMenuItems(bool canceled,
const std::vector<int>& selected_indices);
#elif defined(OS_MACOSX)
void OnSelectPopupMenuItem(int selected_index);
void OnCopyToFindPboard();
#endif
// Requests that the browser process navigates to |url|. If
// |is_history_navigation_in_new_child| is true, the browser process should
......@@ -944,6 +959,18 @@ class CONTENT_EXPORT RenderFrameImpl
// |media_player_delegate_| is NULL, one is created.
media::RendererWebMediaPlayerDelegate* GetWebMediaPlayerDelegate();
// Called to get the WebPlugin to handle find requests in the document.
// Returns nullptr if there is no such WebPlugin.
blink::WebPlugin* GetWebPluginForFind();
// Sends a reply to the current find operation handling if it was a
// synchronous find request.
void SendFindReply(int request_id,
int match_count,
int ordinal,
const blink::WebRect& selection_rect,
bool final_status_update);
// Stores the WebLocalFrame we are associated with. This is null from the
// constructor until BindToWebFrame is called, and it is null after
// frameDetached is called until destruction (which is asynchronous in the
......@@ -1009,6 +1036,8 @@ class CONTENT_EXPORT RenderFrameImpl
base::string16 pepper_composition_text_;
PluginPowerSaverHelper* plugin_power_saver_helper_;
PepperPluginInstanceImpl* plugin_find_handler_;
#endif
RendererWebCookieJarImpl cookie_jar_;
......
This diff is collapsed.
......@@ -36,7 +36,6 @@
#include "content/public/common/page_zoom.h"
#include "content/public/common/referrer.h"
#include "content/public/common/renderer_preferences.h"
#include "content/public/common/stop_find_action.h"
#include "content/public/common/top_controls_state.h"
#include "content/public/common/web_preferences.h"
#include "content/public/renderer/render_view.h"
......@@ -108,7 +107,6 @@ class WebURLRequest;
struct WebActiveWheelFlingParameters;
struct WebDateTimeChooserParams;
struct WebFileChooserParams;
struct WebFindOptions;
struct WebMediaPlayerAction;
struct WebPluginAction;
struct WebPoint;
......@@ -248,14 +246,6 @@ class CONTENT_EXPORT RenderViewImpl
// Plugin-related functions --------------------------------------------------
#if defined(ENABLE_PLUGINS)
// Get/set the plugin which will be used as to handle document find requests.
void set_plugin_find_handler(PepperPluginInstanceImpl* plugin) {
plugin_find_handler_ = plugin;
}
PepperPluginInstanceImpl* plugin_find_handler() {
return plugin_find_handler_;
}
PepperPluginInstanceImpl* focused_pepper_plugin() {
return focused_pepper_plugin_;
}
......@@ -506,7 +496,6 @@ class CONTENT_EXPORT RenderViewImpl
void DidCompletePageScaleAnimation() override;
void OnDeviceScaleFactorChanged() override;
protected:
RenderViewImpl(CompositorDependencies* compositor_deps,
const ViewMsg_New_Params& params);
......@@ -656,9 +645,6 @@ class CONTENT_EXPORT RenderViewImpl
const std::vector<base::FilePath>& paths);
void OnFileChooserResponse(
const std::vector<content::FileChooserFileInfo>& files);
void OnFind(int request_id,
const base::string16&,
const blink::WebFindOptions&);
void OnMediaPlayerActionAt(const gfx::Point& location,
const blink::WebMediaPlayerAction& action);
void OnPluginActionAt(const gfx::Point& location,
......@@ -676,7 +662,6 @@ class CONTENT_EXPORT RenderViewImpl
void OnSetWebUIProperty(const std::string& name, const std::string& value);
void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level);
void OnSetZoomLevelForView(bool uses_temporary_zoom_level, double level);
void OnStopFinding(StopFindAction action);
void OnSuppressDialogsUntilSwapOut();
void OnThemeChanged();
void OnUpdateTargetURLAck();
......@@ -687,8 +672,6 @@ class CONTENT_EXPORT RenderViewImpl
void OnForceRedraw(int request_id);
void OnSelectWordAroundCaret();
#if defined(OS_ANDROID)
void OnActivateNearestFindResult(int request_id, float x, float y);
void OnFindMatchRects(int current_version);
void OnUndoScrollFocusedEditableNodeIntoRect();
void OnUpdateTopControlsState(bool enable_hiding,
bool enable_showing,
......@@ -714,10 +697,6 @@ class CONTENT_EXPORT RenderViewImpl
// Gets the currently focused element, if any.
blink::WebElement GetFocusedElement() const;
// Called to get the WebPlugin to handle find requests in the document.
// Returns NULL if there is no such WebPlugin.
blink::WebPlugin* GetWebPluginForFind();
#if defined(OS_ANDROID)
// Launch an Android content intent with the given URL.
void LaunchAndroidContentIntent(const GURL& intent_url,
......@@ -725,14 +704,6 @@ class CONTENT_EXPORT RenderViewImpl
bool is_main_frame);
#endif
// Sends a reply to the current find operation handling if it was a
// synchronous find request.
void SendFindReply(int request_id,
int match_count,
int ordinal,
const blink::WebRect& selection_rect,
bool final_status_update);
#if defined(OS_WIN) || (defined(OS_POSIX) && !defined(OS_MACOSX))
void UpdateFontRenderingFromRendererPrefs();
#else
......@@ -978,8 +949,6 @@ class CONTENT_EXPORT RenderViewImpl
#endif
#if defined(ENABLE_PLUGINS)
PepperPluginInstanceImpl* plugin_find_handler_;
typedef std::set<PepperPluginInstanceImpl*> PepperPluginSet;
PepperPluginSet active_pepper_instances_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment