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 #import "ios/chrome/browser/autofill/form_suggestion_controller.h" | 5 #import "ios/chrome/browser/autofill/form_suggestion_controller.h" |
6 | 6 |
7 #include "base/ios/weak_nsobject.h" | 7 #include "base/ios/weak_nsobject.h" |
8 #include "base/mac/foundation_util.h" | 8 #include "base/mac/foundation_util.h" |
9 #include "base/mac/scoped_block.h" | 9 #include "base/mac/scoped_block.h" |
10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 _webStateObserverBridge.reset(); | 126 _webStateObserverBridge.reset(); |
127 } | 127 } |
128 | 128 |
129 #pragma mark - | 129 #pragma mark - |
130 #pragma mark CRWWebStateObserver | 130 #pragma mark CRWWebStateObserver |
131 | 131 |
132 - (void)webStateDestroyed:(web::WebState*)webState { | 132 - (void)webStateDestroyed:(web::WebState*)webState { |
133 [self detachFromWebState]; | 133 [self detachFromWebState]; |
134 } | 134 } |
135 | 135 |
136 - (void)pageLoaded:(web::WebState*)webState { | 136 - (void)webStateDidLoadPage:(web::WebState*)webState { |
137 [self processPage:webState]; | 137 [self processPage:webState]; |
138 } | 138 } |
139 | 139 |
140 - (void)processPage:(web::WebState*)webState { | 140 - (void)processPage:(web::WebState*)webState { |
141 [self resetSuggestionState]; | 141 [self resetSuggestionState]; |
142 | 142 |
143 web::URLVerificationTrustLevel trustLevel = | 143 web::URLVerificationTrustLevel trustLevel = |
144 web::URLVerificationTrustLevel::kNone; | 144 web::URLVerificationTrustLevel::kNone; |
145 const GURL pageURL(webState->GetCurrentURL(&trustLevel)); | 145 const GURL pageURL(webState->GetCurrentURL(&trustLevel)); |
146 if (trustLevel != web::URLVerificationTrustLevel::kAbsolute) { | 146 if (trustLevel != web::URLVerificationTrustLevel::kAbsolute) { |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 (FormInputAccessoryViewController*)controller { | 343 (FormInputAccessoryViewController*)controller { |
344 completionHandler_.reset(); | 344 completionHandler_.reset(); |
345 [self resetSuggestionState]; | 345 [self resetSuggestionState]; |
346 } | 346 } |
347 | 347 |
348 - (void)resizeAccessoryView { | 348 - (void)resizeAccessoryView { |
349 [self updateKeyboard:_suggestionState.get()]; | 349 [self updateKeyboard:_suggestionState.get()]; |
350 } | 350 } |
351 | 351 |
352 @end | 352 @end |
OLD | NEW |