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

Unified Diff: content/renderer/browser_plugin/browser_plugin.cc

Issue 17447005: <webview>: Move back, forward, canGoBack, canGoForward, go from content to chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@filter_listener
Patch Set: Merge against latest changes in other CL Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/browser_plugin/browser_plugin.cc
diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc
index ab2c8898453148f81865f46c2ebe09e118b65e68..e858eb89d5802e42f2756893536ab66e1dc9c791 100644
--- a/content/renderer/browser_plugin/browser_plugin.cc
+++ b/content/renderer/browser_plugin/browser_plugin.cc
@@ -127,8 +127,6 @@ BrowserPlugin::BrowserPlugin(
size_changed_in_flight_(false),
before_first_navigation_(true),
browser_plugin_manager_(render_view->GetBrowserPluginManager()),
- current_nav_entry_index_(0),
- nav_entry_count_(0),
compositing_enabled_(false),
weak_ptr_factory_(this) {
}
@@ -574,9 +572,6 @@ void BrowserPlugin::OnLoadCommit(
guest_crashed_ = false;
if (params.is_top_level)
UpdateDOMAttribute(browser_plugin::kAttributeSrc, params.url.spec());
-
- current_nav_entry_index_ = params.current_entry_index;
- nav_entry_count_ = params.entry_count;
}
void BrowserPlugin::OnLoadHandlerCalled(int guest_instance_id) {
@@ -878,15 +873,6 @@ bool BrowserPlugin::HasGuestInstanceID() const {
return guest_instance_id_ != browser_plugin::kInstanceIDNone;
}
-bool BrowserPlugin::CanGoBack() const {
- return nav_entry_count_ > 1 && current_nav_entry_index_ > 0;
-}
-
-bool BrowserPlugin::CanGoForward() const {
- return current_nav_entry_index_ >= 0 &&
- current_nav_entry_index_ < (nav_entry_count_ - 1);
-}
-
bool BrowserPlugin::ParsePartitionAttribute(std::string* error_message) {
if (HasNavigated()) {
*error_message = browser_plugin::kErrorAlreadyNavigated;
@@ -1055,31 +1041,6 @@ void BrowserPlugin::WeakCallbackForPersistObject(
}
}
-void BrowserPlugin::Back() {
- if (!HasGuestInstanceID())
- return;
- browser_plugin_manager()->Send(
- new BrowserPluginHostMsg_Go(render_view_routing_id_,
- guest_instance_id_, -1));
-}
-
-void BrowserPlugin::Forward() {
- if (!HasGuestInstanceID())
- return;
- browser_plugin_manager()->Send(
- new BrowserPluginHostMsg_Go(render_view_routing_id_,
- guest_instance_id_, 1));
-}
-
-void BrowserPlugin::Go(int relative_index) {
- if (!HasGuestInstanceID())
- return;
- browser_plugin_manager()->Send(
- new BrowserPluginHostMsg_Go(render_view_routing_id_,
- guest_instance_id_,
- relative_index));
-}
-
void BrowserPlugin::TerminateGuest() {
if (!HasGuestInstanceID() || guest_crashed_)
return;

Powered by Google App Engine
This is Rietveld 408576698