Commit 6a78fb2f authored by Dave Tapuska's avatar Dave Tapuska Committed by Commit Bot

Remove dead code on RenderView public interface.

Try to pare down the public RenderView interface by removing
uncalled APIs.

BUG=1097816

Change-Id: Ic7554cdf87e3bea438745eab73f14cc5520322ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2475973Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#817509}
parent ab2c4685
...@@ -7,9 +7,6 @@ ...@@ -7,9 +7,6 @@
#include <stddef.h> #include <stddef.h>
#include <string>
#include "base/strings/string16.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "content/common/content_export.h" #include "content/common/content_export.h"
#include "ipc/ipc_sender.h" #include "ipc/ipc_sender.h"
...@@ -76,14 +73,6 @@ class CONTENT_EXPORT RenderView : public IPC::Sender { ...@@ -76,14 +73,6 @@ class CONTENT_EXPORT RenderView : public IPC::Sender {
// Returns the associated WebView. May return NULL when the view is closing. // Returns the associated WebView. May return NULL when the view is closing.
virtual blink::WebView* GetWebView() = 0; virtual blink::WebView* GetWebView() = 0;
// Whether content state (such as form state, scroll position and page
// contents) should be sent to the browser immediately. This is normally
// false, but set to true by some tests.
virtual bool GetContentStateImmediately() = 0;
// Returns |renderer_preferences_.accept_languages| value.
virtual const std::string& GetAcceptLanguages() = 0;
protected: protected:
~RenderView() override {} ~RenderView() override {}
......
...@@ -899,10 +899,6 @@ bool RenderViewImpl::CanUpdateLayout() { ...@@ -899,10 +899,6 @@ bool RenderViewImpl::CanUpdateLayout() {
return true; return true;
} }
const std::string& RenderViewImpl::GetAcceptLanguages() {
return renderer_preferences_.accept_languages;
}
blink::WebString RenderViewImpl::AcceptLanguages() { blink::WebString RenderViewImpl::AcceptLanguages() {
return WebString::FromUTF8(renderer_preferences_.accept_languages); return WebString::FromUTF8(renderer_preferences_.accept_languages);
} }
...@@ -942,10 +938,6 @@ blink::WebView* RenderViewImpl::GetWebView() { ...@@ -942,10 +938,6 @@ blink::WebView* RenderViewImpl::GetWebView() {
return webview_; return webview_;
} }
bool RenderViewImpl::GetContentStateImmediately() {
return send_content_state_immediately_;
}
void RenderViewImpl::OnSetRendererPrefs( void RenderViewImpl::OnSetRendererPrefs(
const blink::mojom::RendererPreferences& renderer_prefs) { const blink::mojom::RendererPreferences& renderer_prefs) {
std::string old_accept_languages = renderer_preferences_.accept_languages; std::string old_accept_languages = renderer_preferences_.accept_languages;
...@@ -999,11 +991,6 @@ void RenderViewImpl::OnMoveOrResizeStarted() { ...@@ -999,11 +991,6 @@ void RenderViewImpl::OnMoveOrResizeStarted() {
GetWebView()->CancelPagePopup(); GetWebView()->CancelPagePopup();
} }
void RenderViewImpl::SetPageFrozen(bool frozen) {
if (GetWebView())
GetWebView()->SetPageFrozen(frozen);
}
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
void RenderViewImpl::SuspendVideoCaptureDevices(bool suspend) { void RenderViewImpl::SuspendVideoCaptureDevices(bool suspend) {
if (!main_render_frame_) if (!main_render_frame_)
......
...@@ -172,10 +172,6 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient, ...@@ -172,10 +172,6 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient,
// RenderView is the currently active RenderView of a WebContents. // RenderView is the currently active RenderView of a WebContents.
unsigned GetLocalSessionHistoryLengthForTesting() const; unsigned GetLocalSessionHistoryLengthForTesting() const;
void UpdateBrowserControlsState(BrowserControlsState constraints,
BrowserControlsState current,
bool animate);
// Registers a watcher to observe changes in the // Registers a watcher to observe changes in the
// blink::mojom::RendererPreferences. // blink::mojom::RendererPreferences.
void RegisterRendererPreferenceWatcher( void RegisterRendererPreferenceWatcher(
...@@ -229,17 +225,11 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient, ...@@ -229,17 +225,11 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient,
void SetBlinkPreferences( void SetBlinkPreferences(
const blink::web_pref::WebPreferences& preferences) override; const blink::web_pref::WebPreferences& preferences) override;
blink::WebView* GetWebView() override; blink::WebView* GetWebView() override;
bool GetContentStateImmediately() override;
const std::string& GetAcceptLanguages() override;
// Please do not add your stuff randomly to the end here. If there is an // Please do not add your stuff randomly to the end here. If there is an
// appropriate section, add it there. If not, there are some random functions // appropriate section, add it there. If not, there are some random functions
// nearer to the top you can add it to. // nearer to the top you can add it to.
base::WeakPtr<RenderViewImpl> GetWeakPtr() {
return weak_ptr_factory_.GetWeakPtr();
}
bool renderer_wide_named_frame_lookup() { bool renderer_wide_named_frame_lookup() {
return renderer_wide_named_frame_lookup_; return renderer_wide_named_frame_lookup_;
} }
...@@ -341,28 +331,9 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient, ...@@ -341,28 +331,9 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient,
static WindowOpenDisposition NavigationPolicyToDisposition( static WindowOpenDisposition NavigationPolicyToDisposition(
blink::WebNavigationPolicy policy); blink::WebNavigationPolicy policy);
// IPC message handlers ------------------------------------------------------
//
// The documentation for these functions should be in
// content/common/*_messages.h for the message that the function is handling.
void OnExecuteEditCommand(const std::string& name, const std::string& value);
void OnAllowScriptToClose(bool script_can_close);
void OnCancelDownload(int32_t download_id);
void OnDeterminePageLanguage();
void OnDisableScrollbarsForSmallWindows(
const gfx::Size& disable_scrollbars_size_limit);
void OnMoveOrResizeStarted(); void OnMoveOrResizeStarted();
void OnExitFullscreen();
void OnSetRendererPrefs( void OnSetRendererPrefs(
const blink::mojom::RendererPreferences& renderer_prefs); const blink::mojom::RendererPreferences& renderer_prefs);
void OnSuppressDialogsUntilSwapOut();
// Page message handlers -----------------------------------------------------
void SetPageFrozen(bool frozen);
// Adding a new message handler? Please add it in alphabetical order above
// and put it in the same position in the .cc file.
// Misc private functions ---------------------------------------------------- // Misc private functions ----------------------------------------------------
...@@ -383,15 +354,6 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient, ...@@ -383,15 +354,6 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient,
// update to inform the browser process. // update to inform the browser process.
void SendFrameStateUpdates(); void SendFrameStateUpdates();
// RenderFrameImpl accessible state ------------------------------------------
// The following section is the set of methods that RenderFrameImpl needs
// to access RenderViewImpl state. The set of state variables are page-level
// specific, so they don't belong in RenderFrameImpl and should remain in
// this object.
base::ObserverList<RenderViewObserver>::Unchecked& observers() {
return observers_;
}
// Platform specific theme preferences if any are updated here. // Platform specific theme preferences if any are updated here.
#if defined(OS_WIN) #if defined(OS_WIN)
void UpdateThemePrefs(); void UpdateThemePrefs();
......
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