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 #ifndef IOS_WEB_WEBUI_WEB_UI_IOS_IMPL_H_ | 5 #ifndef IOS_WEB_WEBUI_WEB_UI_IOS_IMPL_H_ |
6 #define IOS_WEB_WEBUI_WEB_UI_IOS_IMPL_H_ | 6 #define IOS_WEB_WEBUI_WEB_UI_IOS_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 const base::Value& arg1, | 45 const base::Value& arg1, |
46 const base::Value& arg2, | 46 const base::Value& arg2, |
47 const base::Value& arg3) override; | 47 const base::Value& arg3) override; |
48 void CallJavascriptFunction(const std::string& function_name, | 48 void CallJavascriptFunction(const std::string& function_name, |
49 const base::Value& arg1, | 49 const base::Value& arg1, |
50 const base::Value& arg2, | 50 const base::Value& arg2, |
51 const base::Value& arg3, | 51 const base::Value& arg3, |
52 const base::Value& arg4) override; | 52 const base::Value& arg4) override; |
53 void CallJavascriptFunction( | 53 void CallJavascriptFunction( |
54 const std::string& function_name, | 54 const std::string& function_name, |
55 const std::vector<const base::Value*>& args) override; | 55 const std::vector<const base::Value&>& args) override; |
56 | 56 |
57 private: | 57 private: |
58 // Executes JavaScript asynchronously on the page. | 58 // Executes JavaScript asynchronously on the page. |
59 void ExecuteJavascript(const base::string16& javascript); | 59 void ExecuteJavascript(const base::string16& javascript); |
60 | 60 |
61 // A map of message name -> message handling callback. | 61 // A map of message name -> message handling callback. |
62 typedef std::map<std::string, MessageCallback> MessageCallbackMap; | 62 typedef std::map<std::string, MessageCallback> MessageCallbackMap; |
63 MessageCallbackMap message_callbacks_; | 63 MessageCallbackMap message_callbacks_; |
64 | 64 |
65 // The WebUIIOSMessageHandlers we own. | 65 // The WebUIIOSMessageHandlers we own. |
66 ScopedVector<WebUIIOSMessageHandler> handlers_; | 66 ScopedVector<WebUIIOSMessageHandler> handlers_; |
67 | 67 |
68 // Non-owning pointer to the WebStateImpl this WebUIIOS is associated with. | 68 // Non-owning pointer to the WebStateImpl this WebUIIOS is associated with. |
69 WebStateImpl* web_state_; | 69 WebStateImpl* web_state_; |
70 | 70 |
71 scoped_ptr<WebUIIOSController> controller_; | 71 scoped_ptr<WebUIIOSController> controller_; |
72 | 72 |
73 DISALLOW_COPY_AND_ASSIGN(WebUIIOSImpl); | 73 DISALLOW_COPY_AND_ASSIGN(WebUIIOSImpl); |
74 }; | 74 }; |
75 | 75 |
76 } // namespace web | 76 } // namespace web |
77 | 77 |
78 #endif // IOS_WEB_WEBUI_WEB_UI_IOS_IMPL_H_ | 78 #endif // IOS_WEB_WEBUI_WEB_UI_IOS_IMPL_H_ |
OLD | NEW |