OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ |
6 #define CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
115 // passed to that observer method. | 115 // passed to that observer method. |
116 virtual url::Origin GetLastCommittedOrigin() = 0; | 116 virtual url::Origin GetLastCommittedOrigin() = 0; |
117 | 117 |
118 // Returns the associated widget's native view. | 118 // Returns the associated widget's native view. |
119 virtual gfx::NativeView GetNativeView() = 0; | 119 virtual gfx::NativeView GetNativeView() = 0; |
120 | 120 |
121 // Adds |message| to the DevTools console. | 121 // Adds |message| to the DevTools console. |
122 virtual void AddMessageToConsole(ConsoleMessageLevel level, | 122 virtual void AddMessageToConsole(ConsoleMessageLevel level, |
123 const std::string& message) = 0; | 123 const std::string& message) = 0; |
124 | 124 |
125 // Adds a security related |message| to this frame's console. | |
126 virtual void AddSecurityMessageToConsole(ConsoleMessageLevel level, | |
nasko
2016/04/14 14:14:44
Why add a public method if it isn't called from ou
carlosk
2016/04/14 15:28:03
Done.
| |
127 const std::string& message) = 0; | |
128 | |
125 // Runs some JavaScript in this frame's context. If a callback is provided, it | 129 // Runs some JavaScript in this frame's context. If a callback is provided, it |
126 // will be used to return the result, when the result is available. | 130 // will be used to return the result, when the result is available. |
127 // This API can only be called on chrome:// or chrome-devtools:// URLs. | 131 // This API can only be called on chrome:// or chrome-devtools:// URLs. |
128 typedef base::Callback<void(const base::Value*)> JavaScriptResultCallback; | 132 typedef base::Callback<void(const base::Value*)> JavaScriptResultCallback; |
129 virtual void ExecuteJavaScript(const base::string16& javascript) = 0; | 133 virtual void ExecuteJavaScript(const base::string16& javascript) = 0; |
130 virtual void ExecuteJavaScript(const base::string16& javascript, | 134 virtual void ExecuteJavaScript(const base::string16& javascript, |
131 const JavaScriptResultCallback& callback) = 0; | 135 const JavaScriptResultCallback& callback) = 0; |
132 | 136 |
133 // Runs some JavaScript in an isolated world of top of this frame's context. | 137 // Runs some JavaScript in an isolated world of top of this frame's context. |
134 virtual void ExecuteJavaScriptInIsolatedWorld( | 138 virtual void ExecuteJavaScriptInIsolatedWorld( |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
193 | 197 |
194 private: | 198 private: |
195 // This interface should only be implemented inside content. | 199 // This interface should only be implemented inside content. |
196 friend class RenderFrameHostImpl; | 200 friend class RenderFrameHostImpl; |
197 RenderFrameHost() {} | 201 RenderFrameHost() {} |
198 }; | 202 }; |
199 | 203 |
200 } // namespace content | 204 } // namespace content |
201 | 205 |
202 #endif // CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ | 206 #endif // CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ |
OLD | NEW |