| 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/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
| (...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 // |is_favicon| specifies whether the download of the image occurs with | 536 // |is_favicon| specifies whether the download of the image occurs with |
| 537 // cookies or not. Currently, only downloads without cookies are supported. | 537 // cookies or not. Currently, only downloads without cookies are supported. |
| 538 // |bypass_cache| is ignored since the downloads never go through a cache. | 538 // |bypass_cache| is ignored since the downloads never go through a cache. |
| 539 DCHECK(is_favicon); | 539 DCHECK(is_favicon); |
| 540 return [[web_controller_ delegate] downloadImageAtUrl:url | 540 return [[web_controller_ delegate] downloadImageAtUrl:url |
| 541 maxBitmapSize:max_bitmap_size | 541 maxBitmapSize:max_bitmap_size |
| 542 callback:callback]; | 542 callback:callback]; |
| 543 } | 543 } |
| 544 | 544 |
| 545 service_manager::InterfaceRegistry* WebStateImpl::GetMojoInterfaceRegistry() { | 545 service_manager::InterfaceRegistry* WebStateImpl::GetMojoInterfaceRegistry() { |
| 546 if (!mojo_interface_registry_) { | 546 if (!mojo_interface_registry_) |
| 547 mojo_interface_registry_.reset(new service_manager::InterfaceRegistry( | 547 mojo_interface_registry_.reset(new service_manager::InterfaceRegistry()); |
| 548 service_manager::Identity(), service_manager::InterfaceProviderSpec())); | |
| 549 } | |
| 550 return mojo_interface_registry_.get(); | 548 return mojo_interface_registry_.get(); |
| 551 } | 549 } |
| 552 | 550 |
| 553 base::WeakPtr<WebState> WebStateImpl::AsWeakPtr() { | 551 base::WeakPtr<WebState> WebStateImpl::AsWeakPtr() { |
| 554 return weak_factory_.GetWeakPtr(); | 552 return weak_factory_.GetWeakPtr(); |
| 555 } | 553 } |
| 556 | 554 |
| 557 #pragma mark - WebState implementation | 555 #pragma mark - WebState implementation |
| 558 | 556 |
| 559 bool WebStateImpl::IsWebUsageEnabled() const { | 557 bool WebStateImpl::IsWebUsageEnabled() const { |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 702 const LoadCommittedDetails& load_details) { | 700 const LoadCommittedDetails& load_details) { |
| 703 for (auto& observer : observers_) | 701 for (auto& observer : observers_) |
| 704 observer.NavigationItemCommitted(load_details); | 702 observer.NavigationItemCommitted(load_details); |
| 705 } | 703 } |
| 706 | 704 |
| 707 WebState* WebStateImpl::GetWebState() { | 705 WebState* WebStateImpl::GetWebState() { |
| 708 return this; | 706 return this; |
| 709 } | 707 } |
| 710 | 708 |
| 711 } // namespace web | 709 } // namespace web |
| OLD | NEW |