| 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 #import "ios/web/web_state/web_state_impl.h" | 5 #import "ios/web/web_state/web_state_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 if (interstitial_) { | 456 if (interstitial_) { |
| 457 // Store the currently displayed interstitial in a local variable and reset | 457 // Store the currently displayed interstitial in a local variable and reset |
| 458 // |interstitial_| early. This is to prevent an infinite loop, as | 458 // |interstitial_| early. This is to prevent an infinite loop, as |
| 459 // |DontProceed()| internally calls |ClearTransientContentView()|. | 459 // |DontProceed()| internally calls |ClearTransientContentView()|. |
| 460 web::WebInterstitial* interstitial = interstitial_; | 460 web::WebInterstitial* interstitial = interstitial_; |
| 461 interstitial_ = nullptr; | 461 interstitial_ = nullptr; |
| 462 interstitial->DontProceed(); | 462 interstitial->DontProceed(); |
| 463 // Don't access |interstitial| after calling |DontProceed()|, as it triggers | 463 // Don't access |interstitial| after calling |DontProceed()|, as it triggers |
| 464 // deletion. | 464 // deletion. |
| 465 for (auto& observer : observers_) | 465 for (auto& observer : observers_) |
| 466 observer.InsterstitialDismissed(); | 466 observer.InterstitialDismissed(); |
| 467 } | 467 } |
| 468 [web_controller_ clearTransientContentView]; | 468 [web_controller_ clearTransientContentView]; |
| 469 } | 469 } |
| 470 | 470 |
| 471 void WebStateImpl::SendChangeLoadProgress(double progress) { | 471 void WebStateImpl::SendChangeLoadProgress(double progress) { |
| 472 for (auto& observer : observers_) | 472 for (auto& observer : observers_) |
| 473 observer.LoadProgressChanged(progress); | 473 observer.LoadProgressChanged(progress); |
| 474 } | 474 } |
| 475 | 475 |
| 476 bool WebStateImpl::HandleContextMenu(const web::ContextMenuParams& params) { | 476 bool WebStateImpl::HandleContextMenu(const web::ContextMenuParams& params) { |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 const LoadCommittedDetails& load_details) { | 765 const LoadCommittedDetails& load_details) { |
| 766 for (auto& observer : observers_) | 766 for (auto& observer : observers_) |
| 767 observer.NavigationItemCommitted(load_details); | 767 observer.NavigationItemCommitted(load_details); |
| 768 } | 768 } |
| 769 | 769 |
| 770 WebState* WebStateImpl::GetWebState() { | 770 WebState* WebStateImpl::GetWebState() { |
| 771 return this; | 771 return this; |
| 772 } | 772 } |
| 773 | 773 |
| 774 } // namespace web | 774 } // namespace web |
| OLD | NEW |