| 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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 maxBitmapSize:max_bitmap_size | 491 maxBitmapSize:max_bitmap_size |
| 492 callback:callback]; | 492 callback:callback]; |
| 493 } | 493 } |
| 494 | 494 |
| 495 base::WeakPtr<WebState> WebStateImpl::AsWeakPtr() { | 495 base::WeakPtr<WebState> WebStateImpl::AsWeakPtr() { |
| 496 return weak_factory_.GetWeakPtr(); | 496 return weak_factory_.GetWeakPtr(); |
| 497 } | 497 } |
| 498 | 498 |
| 499 #pragma mark - WebState implementation | 499 #pragma mark - WebState implementation |
| 500 | 500 |
| 501 bool WebStateImpl::IsWebUsageEnabled() const { |
| 502 return [web_controller_ webUsageEnabled]; |
| 503 } |
| 504 |
| 505 void WebStateImpl::SetWebUsageEnabled(bool enabled) { |
| 506 [web_controller_ setWebUsageEnabled:enabled]; |
| 507 } |
| 508 |
| 501 UIView* WebStateImpl::GetView() { | 509 UIView* WebStateImpl::GetView() { |
| 502 return [web_controller_ view]; | 510 return [web_controller_ view]; |
| 503 } | 511 } |
| 504 | 512 |
| 505 BrowserState* WebStateImpl::GetBrowserState() const { | 513 BrowserState* WebStateImpl::GetBrowserState() const { |
| 506 return navigation_manager_.GetBrowserState(); | 514 return navigation_manager_.GetBrowserState(); |
| 507 } | 515 } |
| 508 | 516 |
| 509 void WebStateImpl::OpenURL(const WebState::OpenURLParams& params) { | 517 void WebStateImpl::OpenURL(const WebState::OpenURLParams& params) { |
| 510 DCHECK(Configured()); | 518 DCHECK(Configured()); |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 618 const LoadCommittedDetails& load_details) { | 626 const LoadCommittedDetails& load_details) { |
| 619 FOR_EACH_OBSERVER(WebStateObserver, observers_, | 627 FOR_EACH_OBSERVER(WebStateObserver, observers_, |
| 620 NavigationItemCommitted(load_details)); | 628 NavigationItemCommitted(load_details)); |
| 621 } | 629 } |
| 622 | 630 |
| 623 WebState* WebStateImpl::GetWebState() { | 631 WebState* WebStateImpl::GetWebState() { |
| 624 return this; | 632 return this; |
| 625 } | 633 } |
| 626 | 634 |
| 627 } // namespace web | 635 } // namespace web |
| OLD | NEW |