OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/prerender/prerender_contents.h" | 5 #include "chrome/browser/prerender/prerender_contents.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <functional> | 10 #include <functional> |
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
771 prerender_canceler_binding_.Bind(std::move(request)); | 771 prerender_canceler_binding_.Bind(std::move(request)); |
772 } | 772 } |
773 | 773 |
774 void PrerenderContents::AddResourceThrottle( | 774 void PrerenderContents::AddResourceThrottle( |
775 const base::WeakPtr<PrerenderResourceThrottle>& throttle) { | 775 const base::WeakPtr<PrerenderResourceThrottle>& throttle) { |
776 resource_throttles_.push_back(throttle); | 776 resource_throttles_.push_back(throttle); |
777 } | 777 } |
778 | 778 |
779 void PrerenderContents::AddNetworkBytes(int64_t bytes) { | 779 void PrerenderContents::AddNetworkBytes(int64_t bytes) { |
780 network_bytes_ += bytes; | 780 network_bytes_ += bytes; |
| 781 for (Observer& observer : observer_list_) |
| 782 observer.OnNetworkBytesChanged(this); |
781 } | 783 } |
782 | 784 |
783 } // namespace prerender | 785 } // namespace prerender |
OLD | NEW |