| 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 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 // cookies or not. Currently, only downloads without cookies are supported. | 535 // cookies or not. Currently, only downloads without cookies are supported. |
| 536 // |bypass_cache| is ignored since the downloads never go through a cache. | 536 // |bypass_cache| is ignored since the downloads never go through a cache. |
| 537 DCHECK(is_favicon); | 537 DCHECK(is_favicon); |
| 538 return [[web_controller_ delegate] downloadImageAtUrl:url | 538 return [[web_controller_ delegate] downloadImageAtUrl:url |
| 539 maxBitmapSize:max_bitmap_size | 539 maxBitmapSize:max_bitmap_size |
| 540 callback:callback]; | 540 callback:callback]; |
| 541 } | 541 } |
| 542 | 542 |
| 543 shell::InterfaceRegistry* WebStateImpl::GetMojoInterfaceRegistry() { | 543 shell::InterfaceRegistry* WebStateImpl::GetMojoInterfaceRegistry() { |
| 544 if (!mojo_interface_registry_) { | 544 if (!mojo_interface_registry_) { |
| 545 mojo_interface_registry_.reset(new shell::InterfaceRegistry(nullptr)); | 545 mojo_interface_registry_.reset(new shell::InterfaceRegistry); |
| 546 } | 546 } |
| 547 return mojo_interface_registry_.get(); | 547 return mojo_interface_registry_.get(); |
| 548 } | 548 } |
| 549 | 549 |
| 550 base::WeakPtr<WebState> WebStateImpl::AsWeakPtr() { | 550 base::WeakPtr<WebState> WebStateImpl::AsWeakPtr() { |
| 551 return weak_factory_.GetWeakPtr(); | 551 return weak_factory_.GetWeakPtr(); |
| 552 } | 552 } |
| 553 | 553 |
| 554 #pragma mark - WebState implementation | 554 #pragma mark - WebState implementation |
| 555 | 555 |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 const LoadCommittedDetails& load_details) { | 698 const LoadCommittedDetails& load_details) { |
| 699 FOR_EACH_OBSERVER(WebStateObserver, observers_, | 699 FOR_EACH_OBSERVER(WebStateObserver, observers_, |
| 700 NavigationItemCommitted(load_details)); | 700 NavigationItemCommitted(load_details)); |
| 701 } | 701 } |
| 702 | 702 |
| 703 WebState* WebStateImpl::GetWebState() { | 703 WebState* WebStateImpl::GetWebState() { |
| 704 return this; | 704 return this; |
| 705 } | 705 } |
| 706 | 706 |
| 707 } // namespace web | 707 } // namespace web |
| OLD | NEW |