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

Unified Diff: ios/web/shell/view_controller.mm

Issue 1851003003: [ios] Added web// public API to let embedder observe loading progress. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed compilation Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/public/web_state/web_state_delegate_bridge.h ('k') | ios/web/web_state/ui/crw_web_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/shell/view_controller.mm
diff --git a/ios/web/shell/view_controller.mm b/ios/web/shell/view_controller.mm
index e91df14b49d0127ac6866f7e9c401e42c1a3a4cb..bca82a9316a780a0dc5e8b027d205adf9763369b 100644
--- a/ios/web/shell/view_controller.mm
+++ b/ios/web/shell/view_controller.mm
@@ -17,6 +17,7 @@
#import "ios/net/empty_nsurlcache.h"
#include "ios/web/public/referrer.h"
#include "ios/web/public/web_state/web_state.h"
+#import "ios/web/public/web_state/web_state_delegate_bridge.h"
#import "ios/web/public/web_state/web_state_observer_bridge.h"
#include "ios/web/shell/shell_browser_state.h"
#include "ios/web/web_state/ui/crw_web_controller.h"
@@ -29,10 +30,11 @@ NSString* const kWebShellAddressFieldAccessibilityLabel = @"Address field";
using web::NavigationManager;
-@interface ViewController ()<CRWWebStateObserver> {
+@interface ViewController ()<CRWWebStateDelegate, CRWWebStateObserver> {
web::BrowserState* _browserState;
std::unique_ptr<web::WebStateImpl> _webState;
std::unique_ptr<web::WebStateObserverBridge> _webStateObserver;
+ std::unique_ptr<web::WebStateDelegateBridge> _webStateDelegate;
base::mac::ObjCPropertyReleaser _propertyReleaser_ViewController;
}
@@ -115,6 +117,8 @@ using web::NavigationManager;
_webStateObserver.reset(
new web::WebStateObserverBridge(_webState.get(), self));
+ _webStateDelegate.reset(new web::WebStateDelegateBridge(self));
+ _webState->SetDelegate(_webStateDelegate.get());
UIView* view = _webState->GetView();
[view setFrame:[_containerView bounds]];
« no previous file with comments | « ios/web/public/web_state/web_state_delegate_bridge.h ('k') | ios/web/web_state/ui/crw_web_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698