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

Side by Side Diff: ios/web/webui/mojo_facade.mm

Issue 2476493003: Remove FundamentalValue
Patch Set: Fix 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 unified diff | Download patch
« no previous file with comments | « ios/web/web_state/ui/web_view_js_utils.mm ('k') | ipc/ipc_message_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
(...skipping 11 matching lines...) Expand all
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|.
29 template <typename IntegerT> 29 template <typename IntegerT>
30 std::unique_ptr<base::Value> ValueFromInteger(IntegerT handle) { 30 std::unique_ptr<base::Value> ValueFromInteger(IntegerT handle) {
31 return std::unique_ptr<base::Value>( 31 return std::unique_ptr<base::Value>(
32 new base::FundamentalValue(static_cast<int>(handle))); 32 new base::Value(static_cast<int>(handle)));
33 } 33 }
34 34
35 } // namespace 35 } // namespace
36 36
37 MojoFacade::MojoFacade( 37 MojoFacade::MojoFacade(
38 service_manager::mojom::InterfaceProvider* interface_provider, 38 service_manager::mojom::InterfaceProvider* interface_provider,
39 id<CRWJSInjectionEvaluator> script_evaluator) 39 id<CRWJSInjectionEvaluator> script_evaluator)
40 : interface_provider_(interface_provider), 40 : interface_provider_(interface_provider),
41 script_evaluator_(script_evaluator) { 41 script_evaluator_(script_evaluator) {
42 DCHECK_CURRENTLY_ON(WebThread::UI); 42 DCHECK_CURRENTLY_ON(WebThread::UI);
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 263
264 std::unique_ptr<base::Value> MojoFacade::HandleSupportCancelWatch( 264 std::unique_ptr<base::Value> MojoFacade::HandleSupportCancelWatch(
265 const base::DictionaryValue* args) { 265 const base::DictionaryValue* args) {
266 int watch_id = 0; 266 int watch_id = 0;
267 CHECK(args->GetInteger("watchId", &watch_id)); 267 CHECK(args->GetInteger("watchId", &watch_id));
268 watchers_.erase(watch_id); 268 watchers_.erase(watch_id);
269 return nullptr; 269 return nullptr;
270 } 270 }
271 271
272 } // namespace web 272 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/web_state/ui/web_view_js_utils.mm ('k') | ipc/ipc_message_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698