OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "ios/web/webui/web_ui_ios_impl.h" | 5 #include "ios/web/webui/web_ui_ios_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "ios/web/public/webui/web_ui_ios_controller.h" | 13 #include "ios/web/public/webui/web_ui_ios_controller.h" |
14 #include "ios/web/public/webui/web_ui_ios_controller_factory.h" | 14 #include "ios/web/public/webui/web_ui_ios_controller_factory.h" |
15 #include "ios/web/public/webui/web_ui_ios_message_handler.h" | 15 #include "ios/web/public/webui/web_ui_ios_message_handler.h" |
16 #include "ios/web/web_state/web_state_impl.h" | 16 #import "ios/web/web_state/web_state_impl.h" |
17 | 17 |
18 #if !defined(__has_feature) || !__has_feature(objc_arc) | 18 #if !defined(__has_feature) || !__has_feature(objc_arc) |
19 #error "This file requires ARC support." | 19 #error "This file requires ARC support." |
20 #endif | 20 #endif |
21 | 21 |
22 using web::WebUIIOSController; | 22 using web::WebUIIOSController; |
23 | 23 |
24 namespace web { | 24 namespace web { |
25 | 25 |
26 // static | 26 // static |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 handler->set_web_ui(this); | 148 handler->set_web_ui(this); |
149 handler->RegisterMessages(); | 149 handler->RegisterMessages(); |
150 handlers_.push_back(handler); | 150 handlers_.push_back(handler); |
151 } | 151 } |
152 | 152 |
153 void WebUIIOSImpl::ExecuteJavascript(const base::string16& javascript) { | 153 void WebUIIOSImpl::ExecuteJavascript(const base::string16& javascript) { |
154 web_state_->ExecuteJavaScript(javascript); | 154 web_state_->ExecuteJavaScript(javascript); |
155 } | 155 } |
156 | 156 |
157 } // namespace web | 157 } // namespace web |
OLD | NEW |