Index: ios/web/webui/mojo_facade.mm |
diff --git a/ios/web/webui/mojo_facade.mm b/ios/web/webui/mojo_facade.mm |
index 651de5ae8694f6656b6ca50cdb6bf2c280aec7cc..0761888ff8d1ce9feb9ef3112cb85bac74fd04a8 100644 |
--- a/ios/web/webui/mojo_facade.mm |
+++ b/ios/web/webui/mojo_facade.mm |
@@ -252,16 +252,17 @@ std::unique_ptr<base::Value> MojoFacade::HandleSupportWatch( |
int callback_id; |
CHECK(args->GetInteger("callbackId", &callback_id)); |
- mojo::Watcher::ReadyCallback callback = base::BindBlockArc(^( |
+ mojo::SimpleWatcher::ReadyCallback callback = base::BindBlockArc(^( |
MojoResult result) { |
NSString* script = |
[NSString stringWithFormat:@"__crWeb.mojo.signalWatch(%d, %d)", |
callback_id, result]; |
[script_evaluator_ executeJavaScript:script completionHandler:nil]; |
}); |
- mojo::Watcher* watcher = new mojo::Watcher(FROM_HERE); |
+ mojo::SimpleWatcher* watcher = new mojo::SimpleWatcher( |
+ FROM_HERE, mojo::SimpleWatcher::ArmingPolicy::AUTOMATIC); |
watchers_.insert(std::make_pair(++last_watch_id_, base::WrapUnique(watcher))); |
- watcher->Start(static_cast<mojo::Handle>(handle), signals, callback); |
+ watcher->Watch(static_cast<mojo::Handle>(handle), signals, callback); |
return ValueFromInteger(last_watch_id_); |
} |