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

Side by Side Diff: ios/web/web_state/web_state_impl.h

Issue 1137143004: WebUI for WKWebView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unittest issues Created 5 years, 7 months 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
OLDNEW
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 IOS_WEB_WEB_STATE_WEB_STATE_IMPL_H_ 5 #ifndef IOS_WEB_WEB_STATE_WEB_STATE_IMPL_H_
6 #define IOS_WEB_WEB_STATE_WEB_STATE_IMPL_H_ 6 #define IOS_WEB_WEB_STATE_WEB_STATE_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 // Clears any current WebUI. Should be called when the page changes. 150 // Clears any current WebUI. Should be called when the page changes.
151 // TODO(stuartmorgan): Remove once more logic is moved from WebController 151 // TODO(stuartmorgan): Remove once more logic is moved from WebController
152 // into this class. 152 // into this class.
153 void ClearWebUI(); 153 void ClearWebUI();
154 // Returns true if there is a WebUI active. 154 // Returns true if there is a WebUI active.
155 bool HasWebUI(); 155 bool HasWebUI();
156 // Processes a message from a WebUI displayed at the given URL. 156 // Processes a message from a WebUI displayed at the given URL.
157 void ProcessWebUIMessage(const GURL& source_url, 157 void ProcessWebUIMessage(const GURL& source_url,
158 const std::string& message, 158 const std::string& message,
159 const base::ListValue& args); 159 const base::ListValue& args);
160 // Invokes page load for WebUI URL with HTML. URL must have an application
161 // specific scheme.
162 virtual void LoadWebUIHtml(const base::string16& html, const GURL& url);
160 163
161 const base::string16& GetTitle() const; 164 const base::string16& GetTitle() const;
162 165
163 // Gets the HTTP response headers associated with the current page. 166 // Gets the HTTP response headers associated with the current page.
164 net::HttpResponseHeaders* GetHttpResponseHeaders() const; 167 net::HttpResponseHeaders* GetHttpResponseHeaders() const;
165 168
166 // Called when HTTP response headers are received. 169 // Called when HTTP response headers are received.
167 // |resource_url| is the URL associated with the headers. 170 // |resource_url| is the URL associated with the headers.
168 // This function has no visible effects until UpdateHttpResponseHeaders() is 171 // This function has no visible effects until UpdateHttpResponseHeaders() is
169 // called. 172 // called.
170 void OnHttpResponseHeadersReceived(net::HttpResponseHeaders* response_headers, 173 void OnHttpResponseHeadersReceived(net::HttpResponseHeaders* response_headers,
171 const GURL& resource_url); 174 const GURL& resource_url);
172 175
173 // Executes a JavaScript string on the page asynchronously. 176 // Executes a JavaScript string on the page asynchronously.
174 // TODO(shreyasv): Rename this to ExecuteJavaScript for consitency with 177 // TODO(shreyasv): Rename this to ExecuteJavaScript for consitency with
175 // upstream API. 178 // upstream API.
176 void ExecuteJavaScriptAsync(const base::string16& javascript); 179 virtual void ExecuteJavaScriptAsync(const base::string16& script);
177 180
178 // Request tracker management. For now, this exposes the RequestTracker for 181 // Request tracker management. For now, this exposes the RequestTracker for
179 // embedders to use. 182 // embedders to use.
180 // TODO(stuartmorgan): RequestTracker should become an internal detail of this 183 // TODO(stuartmorgan): RequestTracker should become an internal detail of this
181 // class. 184 // class.
182 185
183 // Create a new tracker using |delegate| as its delegate. 186 // Create a new tracker using |delegate| as its delegate.
184 void InitializeRequestTracker(id<CRWRequestTrackerDelegate> delegate); 187 void InitializeRequestTracker(id<CRWRequestTrackerDelegate> delegate);
185 188
186 // Close the request tracker and delete it. 189 // Close the request tracker and delete it.
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 310
308 // Callbacks associated to command prefixes. 311 // Callbacks associated to command prefixes.
309 std::map<std::string, ScriptCommandCallback> script_command_callbacks_; 312 std::map<std::string, ScriptCommandCallback> script_command_callbacks_;
310 313
311 DISALLOW_COPY_AND_ASSIGN(WebStateImpl); 314 DISALLOW_COPY_AND_ASSIGN(WebStateImpl);
312 }; 315 };
313 316
314 } // namespace web 317 } // namespace web
315 318
316 #endif // IOS_WEB_WEB_STATE_WEB_STATE_IMPL_H_ 319 #endif // IOS_WEB_WEB_STATE_WEB_STATE_IMPL_H_
OLDNEW
« no previous file with comments | « ios/web/web_state/ui/crw_wk_web_view_web_controller.mm ('k') | ios/web/web_state/web_state_impl.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698