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

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

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
« no previous file with comments | « ios/web/web_state/web_state_impl.h ('k') | ios/web/webui/crw_web_ui_manager.h » ('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 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 #include "ios/web/web_state/web_state_impl.h" 5 #include "ios/web/web_state/web_state_impl.h"
6 6
7 #include "base/strings/sys_string_conversions.h" 7 #include "base/strings/sys_string_conversions.h"
8 #include "ios/web/interstitials/web_interstitial_impl.h" 8 #include "ios/web/interstitials/web_interstitial_impl.h"
9 #import "ios/web/navigation/crw_session_controller.h" 9 #import "ios/web/navigation/crw_session_controller.h"
10 #import "ios/web/navigation/crw_session_entry.h" 10 #import "ios/web/navigation/crw_session_entry.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 const std::string& message, 240 const std::string& message,
241 const base::ListValue& args) { 241 const base::ListValue& args) {
242 if (web_ui_) { 242 if (web_ui_) {
243 DCHECK(!facade_delegate_ || !facade_delegate_->HasLegacyWebUI()); 243 DCHECK(!facade_delegate_ || !facade_delegate_->HasLegacyWebUI());
244 web_ui_->ProcessWebUIIOSMessage(source_url, message, args); 244 web_ui_->ProcessWebUIIOSMessage(source_url, message, args);
245 } else if (facade_delegate_) { 245 } else if (facade_delegate_) {
246 facade_delegate_->ProcessLegacyWebUIMessage(source_url, message, args); 246 facade_delegate_->ProcessLegacyWebUIMessage(source_url, message, args);
247 } 247 }
248 } 248 }
249 249
250 void WebStateImpl::LoadWebUIHtml(const base::string16& html, const GURL& url) {
251 CHECK(web::GetWebClient()->IsAppSpecificURL(url));
252 [web_controller_ loadHTML:base::SysUTF16ToNSString(html)
253 forAppSpecificURL:url];
254 }
255
250 const base::string16& WebStateImpl::GetTitle() const { 256 const base::string16& WebStateImpl::GetTitle() const {
251 // TODO(stuartmorgan): Implement the NavigationManager logic necessary to 257 // TODO(stuartmorgan): Implement the NavigationManager logic necessary to
252 // match the WebContents implementation of this method. 258 // match the WebContents implementation of this method.
253 DCHECK(Configured()); 259 DCHECK(Configured());
254 web::NavigationItem* item = navigation_manager_.GetLastCommittedItem(); 260 web::NavigationItem* item = navigation_manager_.GetLastCommittedItem();
255 if (item) { 261 if (item) {
256 return item->GetTitleForDisplay( 262 return item->GetTitleForDisplay(
257 web::GetWebClient()->GetAcceptLangs(GetBrowserState())); 263 web::GetWebClient()->GetAcceptLangs(GetBrowserState()));
258 } 264 }
259 return empty_string16_; 265 return empty_string16_;
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 const LoadCommittedDetails& load_details) { 529 const LoadCommittedDetails& load_details) {
524 FOR_EACH_OBSERVER(WebStateObserver, observers_, 530 FOR_EACH_OBSERVER(WebStateObserver, observers_,
525 NavigationItemCommitted(load_details)); 531 NavigationItemCommitted(load_details));
526 } 532 }
527 533
528 WebState* WebStateImpl::GetWebState() { 534 WebState* WebStateImpl::GetWebState() {
529 return this; 535 return this;
530 } 536 }
531 537
532 } // namespace web 538 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/web_state/web_state_impl.h ('k') | ios/web/webui/crw_web_ui_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698