| 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 #include "ios/web/web_state/web_state_impl.h" | 5 #include "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/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
| (...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 #pragma mark - WebState implementation | 532 #pragma mark - WebState implementation |
| 533 | 533 |
| 534 bool WebStateImpl::IsWebUsageEnabled() const { | 534 bool WebStateImpl::IsWebUsageEnabled() const { |
| 535 return [web_controller_ webUsageEnabled]; | 535 return [web_controller_ webUsageEnabled]; |
| 536 } | 536 } |
| 537 | 537 |
| 538 void WebStateImpl::SetWebUsageEnabled(bool enabled) { | 538 void WebStateImpl::SetWebUsageEnabled(bool enabled) { |
| 539 [web_controller_ setWebUsageEnabled:enabled]; | 539 [web_controller_ setWebUsageEnabled:enabled]; |
| 540 } | 540 } |
| 541 | 541 |
| 542 bool WebStateImpl::ShouldSuppressDialogs() const { |
| 543 return [web_controller_ shouldSuppressDialogs]; |
| 544 } |
| 545 |
| 546 void WebStateImpl::SetShouldSuppressDialogs(bool should_suppress) { |
| 547 [web_controller_ setShouldSuppressDialogs:should_suppress]; |
| 548 } |
| 549 |
| 542 UIView* WebStateImpl::GetView() { | 550 UIView* WebStateImpl::GetView() { |
| 543 return [web_controller_ view]; | 551 return [web_controller_ view]; |
| 544 } | 552 } |
| 545 | 553 |
| 546 BrowserState* WebStateImpl::GetBrowserState() const { | 554 BrowserState* WebStateImpl::GetBrowserState() const { |
| 547 return navigation_manager_.GetBrowserState(); | 555 return navigation_manager_.GetBrowserState(); |
| 548 } | 556 } |
| 549 | 557 |
| 550 void WebStateImpl::OpenURL(const WebState::OpenURLParams& params) { | 558 void WebStateImpl::OpenURL(const WebState::OpenURLParams& params) { |
| 551 DCHECK(Configured()); | 559 DCHECK(Configured()); |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 663 const LoadCommittedDetails& load_details) { | 671 const LoadCommittedDetails& load_details) { |
| 664 FOR_EACH_OBSERVER(WebStateObserver, observers_, | 672 FOR_EACH_OBSERVER(WebStateObserver, observers_, |
| 665 NavigationItemCommitted(load_details)); | 673 NavigationItemCommitted(load_details)); |
| 666 } | 674 } |
| 667 | 675 |
| 668 WebState* WebStateImpl::GetWebState() { | 676 WebState* WebStateImpl::GetWebState() { |
| 669 return this; | 677 return this; |
| 670 } | 678 } |
| 671 | 679 |
| 672 } // namespace web | 680 } // namespace web |
| OLD | NEW |