Commit 9f8cd543 authored by Lukasz Anforowicz's avatar Lukasz Anforowicz Committed by Commit Bot

Remove never called method: content::PepperPluginInstance::Navigate.

content::PepperPluginInstance::Navigate was never called or referenced.
Therefore, this CL removes this method and its overrides.

Bug: 1064652
Change-Id: I20301b34f2d4775205cd9cedcf100457996966ad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2463852
Commit-Queue: Bill Budge <bbudge@chromium.org>
Reviewed-by: default avatarBill Budge <bbudge@chromium.org>
Reviewed-by: default avatarRaymes Khoury <raymes@chromium.org>
Reviewed-by: default avatarAlex Moshchuk <alexmos@chromium.org>
Auto-Submit: Łukasz Anforowicz <lukasza@chromium.org>
Cr-Commit-Position: refs/heads/master@{#816859}
parent 51f6153d
...@@ -34,7 +34,6 @@ class Rect; ...@@ -34,7 +34,6 @@ class Rect;
namespace ppapi { namespace ppapi {
class PpapiPermissions; class PpapiPermissions;
class VarTracker; class VarTracker;
struct URLRequestInfoData;
} }
namespace IPC { namespace IPC {
...@@ -95,10 +94,6 @@ class PepperPluginInstance { ...@@ -95,10 +94,6 @@ class PepperPluginInstance {
virtual bool IsRectTopmost(const gfx::Rect& rect) = 0; virtual bool IsRectTopmost(const gfx::Rect& rect) = 0;
virtual int32_t Navigate(const ppapi::URLRequestInfoData& request,
const char* target,
bool from_user_action) = 0;
// Creates a pending PepperFileRefRendererHost. Returns 0 on failure. // Creates a pending PepperFileRefRendererHost. Returns 0 on failure.
virtual int MakePendingFileRefRendererHost(const base::FilePath& path) = 0; virtual int MakePendingFileRefRendererHost(const base::FilePath& path) = 0;
......
...@@ -59,13 +59,6 @@ bool FakePepperPluginInstance::IsRectTopmost(const gfx::Rect& rect) { ...@@ -59,13 +59,6 @@ bool FakePepperPluginInstance::IsRectTopmost(const gfx::Rect& rect) {
return false; return false;
} }
int32_t FakePepperPluginInstance::Navigate(
const ppapi::URLRequestInfoData& request,
const char* target,
bool from_user_action) {
return PP_ERROR_FAILED;
}
int FakePepperPluginInstance::MakePendingFileRefRendererHost( int FakePepperPluginInstance::MakePendingFileRefRendererHost(
const base::FilePath& path) { const base::FilePath& path) {
return 0; return 0;
......
...@@ -35,9 +35,6 @@ class FakePepperPluginInstance : public PepperPluginInstance { ...@@ -35,9 +35,6 @@ class FakePepperPluginInstance : public PepperPluginInstance {
void SetAlwaysOnTop(bool on_top) override; void SetAlwaysOnTop(bool on_top) override;
bool IsFullPagePlugin() override; bool IsFullPagePlugin() override;
bool IsRectTopmost(const gfx::Rect& rect) override; bool IsRectTopmost(const gfx::Rect& rect) override;
int32_t Navigate(const ppapi::URLRequestInfoData& request,
const char* target,
bool from_user_action) override;
int MakePendingFileRefRendererHost(const base::FilePath& path) override; int MakePendingFileRefRendererHost(const base::FilePath& path) override;
void SetEmbedProperty(PP_Var key, PP_Var value) override; void SetEmbedProperty(PP_Var key, PP_Var value) override;
void SetSelectedText(const base::string16& selected_text) override; void SetSelectedText(const base::string16& selected_text) override;
......
...@@ -3007,53 +3007,6 @@ bool PepperPluginInstanceImpl::IsRectTopmost(const gfx::Rect& rect) { ...@@ -3007,53 +3007,6 @@ bool PepperPluginInstanceImpl::IsRectTopmost(const gfx::Rect& rect) {
return container_->IsRectTopmost(rect); return container_->IsRectTopmost(rect);
} }
int32_t PepperPluginInstanceImpl::Navigate(
const ppapi::URLRequestInfoData& request,
const char* target,
bool from_user_action) {
if (!container_)
return PP_ERROR_FAILED;
WebDocument document = container_->GetDocument();
WebLocalFrame* frame = document.GetFrame();
if (!frame)
return PP_ERROR_FAILED;
ppapi::URLRequestInfoData completed_request = request;
WebURLRequest web_request;
if (!CreateWebURLRequest(
pp_instance_, &completed_request, frame, &web_request)) {
return PP_ERROR_FAILED;
}
web_request.SetSiteForCookies(document.SiteForCookies());
if (HasTransientUserActivation())
web_request.SetHasUserGesture(true);
GURL gurl(web_request.Url());
if (gurl.SchemeIs(url::kJavaScriptScheme)) {
// In imitation of the NPAPI implementation, only |target_frame == frame| is
// allowed for security reasons.
WebFrame* target_frame =
frame->FindFrameByName(WebString::FromUTF8(target));
if (target_frame != frame)
return PP_ERROR_NOACCESS;
// TODO(viettrungluu): NPAPI sends the result back to the plugin -- do we
// need that?
WebString result = container_->ExecuteScriptURL(gurl, false);
return result.IsNull() ? PP_ERROR_FAILED : PP_OK;
}
// Only GETs and POSTs are supported.
if (web_request.HttpMethod() != "GET" && web_request.HttpMethod() != "POST")
return PP_ERROR_BADARGUMENT;
WebString target_str = WebString::FromUTF8(target);
container_->LoadFrameRequest(web_request, target_str);
return PP_OK;
}
int PepperPluginInstanceImpl::MakePendingFileRefRendererHost( int PepperPluginInstanceImpl::MakePendingFileRefRendererHost(
const base::FilePath& path) { const base::FilePath& path) {
RendererPpapiHostImpl* host_impl = module_->renderer_ppapi_host(); RendererPpapiHostImpl* host_impl = module_->renderer_ppapi_host();
......
...@@ -357,9 +357,6 @@ class CONTENT_EXPORT PepperPluginInstanceImpl ...@@ -357,9 +357,6 @@ class CONTENT_EXPORT PepperPluginInstanceImpl
void SetAlwaysOnTop(bool on_top) override; void SetAlwaysOnTop(bool on_top) override;
bool IsFullPagePlugin() override; bool IsFullPagePlugin() override;
bool IsRectTopmost(const gfx::Rect& rect) override; bool IsRectTopmost(const gfx::Rect& rect) override;
int32_t Navigate(const ppapi::URLRequestInfoData& request,
const char* target,
bool from_user_action) override;
int MakePendingFileRefRendererHost(const base::FilePath& path) override; int MakePendingFileRefRendererHost(const base::FilePath& path) override;
void SetEmbedProperty(PP_Var key, PP_Var value) override; void SetEmbedProperty(PP_Var key, PP_Var value) override;
void SetSelectedText(const base::string16& selected_text) override; void SetSelectedText(const base::string16& selected_text) override;
......
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