OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #import "ios/web/webui/mojo_facade.h" | 5 #import "ios/web/webui/mojo_facade.h" |
6 | 6 |
7 #import <Foundation/Foundation.h> | 7 #import <Foundation/Foundation.h> |
8 | 8 |
9 #include "base/ios/block_types.h" | 9 #include "base/ios/block_types.h" |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
11 #include "base/json/json_writer.h" | 11 #include "base/json/json_writer.h" |
12 #include "base/mac/bind_objc_block.h" | 12 #include "base/mac/bind_objc_block.h" |
13 #include "base/strings/string_number_conversions.h" | 13 #include "base/strings/string_number_conversions.h" |
14 #include "base/values.h" | 14 #include "base/values.h" |
15 #import "ios/web/public/web_state/js/crw_js_injection_evaluator.h" | 15 #import "ios/web/public/web_state/js/crw_js_injection_evaluator.h" |
16 #include "ios/web/public/web_thread.h" | 16 #include "ios/web/public/web_thread.h" |
17 #include "mojo/public/cpp/system/core.h" | 17 #include "mojo/public/cpp/system/core.h" |
18 #include "services/shell/public/interfaces/interface_provider.mojom.h" | 18 #include "services/service_manager/public/interfaces/interface_provider.mojom.h" |
19 | 19 |
20 #if !defined(__has_feature) || !__has_feature(objc_arc) | 20 #if !defined(__has_feature) || !__has_feature(objc_arc) |
21 #error "This file requires ARC support." | 21 #error "This file requires ARC support." |
22 #endif | 22 #endif |
23 | 23 |
24 namespace web { | 24 namespace web { |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
28 // Wraps an integer into |base::Value| as |TYPE_INTEGER|. | 28 // Wraps an integer into |base::Value| as |TYPE_INTEGER|. |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 | 262 |
263 std::unique_ptr<base::Value> MojoFacade::HandleSupportCancelWatch( | 263 std::unique_ptr<base::Value> MojoFacade::HandleSupportCancelWatch( |
264 const base::DictionaryValue* args) { | 264 const base::DictionaryValue* args) { |
265 int watch_id = 0; | 265 int watch_id = 0; |
266 CHECK(args->GetInteger("watchId", &watch_id)); | 266 CHECK(args->GetInteger("watchId", &watch_id)); |
267 watchers_.erase(watch_id); | 267 watchers_.erase(watch_id); |
268 return nullptr; | 268 return nullptr; |
269 } | 269 } |
270 | 270 |
271 } // namespace web | 271 } // namespace web |
OLD | NEW |