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

Unified Diff: ios/web/web_state/web_controller_observer_bridge.mm

Issue 2567303003: [ios] Removed unused CRWWebControllerObserver methods. (Closed)
Patch Set: Self review Created 4 years 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
« no previous file with comments | « ios/web/web_state/web_controller_observer_bridge.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/web_controller_observer_bridge.mm
diff --git a/ios/web/web_state/web_controller_observer_bridge.mm b/ios/web/web_state/web_controller_observer_bridge.mm
index 35e3b08f2663414cb5aa3ce03fac291c4113be2d..6fcf90018e61770d2c1dd285cc7ffa32662e4dbd 100644
--- a/ios/web/web_state/web_controller_observer_bridge.mm
+++ b/ios/web/web_state/web_controller_observer_bridge.mm
@@ -4,11 +4,8 @@
#import "ios/web/web_state/web_controller_observer_bridge.h"
-#include "base/bind.h"
#include "base/logging.h"
-#include "base/strings/sys_string_conversions.h"
#import "ios/web/public/web_state/crw_web_controller_observer.h"
-#include "ios/web/public/web_state/web_state.h"
namespace web {
@@ -21,22 +18,9 @@ WebControllerObserverBridge::WebControllerObserverBridge(
web_controller_(web_controller) {
DCHECK(web_controller_observer_);
DCHECK(web_controller_);
-
- // Listen for script commands if needed.
- if ([web_controller_observer_ respondsToSelector:@selector(commandPrefix)]) {
- NSString* prefix = [web_controller_observer_ commandPrefix];
- DCHECK_GT([prefix length], 0u);
- script_command_callback_prefix_ = base::SysNSStringToUTF8(prefix);
- web_state->AddScriptCommandCallback(
- base::Bind(&WebControllerObserverBridge::ScriptCommandReceived,
- base::Unretained(this)),
- script_command_callback_prefix_);
- }
}
WebControllerObserverBridge::~WebControllerObserverBridge() {
- if (!script_command_callback_prefix_.empty())
- web_state()->RemoveScriptCommandCallback(script_command_callback_prefix_);
}
void WebControllerObserverBridge::PageLoaded(
@@ -46,15 +30,4 @@ void WebControllerObserverBridge::PageLoaded(
[web_controller_observer_ pageLoaded:web_controller_];
}
-bool WebControllerObserverBridge::ScriptCommandReceived(
- const base::DictionaryValue& value,
- const GURL& url,
- bool user_is_interacting) {
- DCHECK(!script_command_callback_prefix_.empty());
- return [web_controller_observer_ handleCommand:value
- webController:web_controller_
- userIsInteracting:user_is_interacting
- originURL:url];
-}
-
} // namespace web
« no previous file with comments | « ios/web/web_state/web_controller_observer_bridge.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698