| 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
|
|
|