| 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> |
| 11 #include <utility> | 11 #include <utility> |
| 12 | 12 |
| 13 #include "base/bind.h" | 13 #include "base/bind.h" |
| 14 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
| 15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
| 16 #include "chrome/browser/chrome_notification_types.h" | 16 #include "chrome/browser/chrome_notification_types.h" |
| 17 #include "chrome/browser/history/history_tab_helper.h" | 17 #include "chrome/browser/history/history_tab_helper.h" |
| 18 #include "chrome/browser/prerender/prerender_field_trial.h" | 18 #include "chrome/browser/prerender/prerender_field_trial.h" |
| 19 #include "chrome/browser/prerender/prerender_final_status.h" | 19 #include "chrome/browser/prerender/prerender_final_status.h" |
| 20 #include "chrome/browser/prerender/prerender_handle.h" | 20 #include "chrome/browser/prerender/prerender_handle.h" |
| 21 #include "chrome/browser/prerender/prerender_manager.h" | 21 #include "chrome/browser/prerender/prerender_manager.h" |
| 22 #include "chrome/browser/prerender/prerender_manager_factory.h" | 22 #include "chrome/browser/prerender/prerender_manager_factory.h" |
| 23 #include "chrome/browser/prerender/prerender_resource_throttle.h" | 23 #include "chrome/browser/prerender/prerender_resource_throttle.h" |
| 24 #include "chrome/browser/profiles/profile.h" | 24 #include "chrome/browser/profiles/profile.h" |
| 25 #include "chrome/browser/task_management/web_contents_tags.h" | 25 #include "chrome/browser/task_management/web_contents_tags.h" |
| 26 #include "chrome/browser/ui/browser.h" | |
| 27 #include "chrome/browser/ui/tab_helpers.h" | 26 #include "chrome/browser/ui/tab_helpers.h" |
| 28 #include "chrome/browser/ui/web_contents_sizer.h" | 27 #include "chrome/browser/ui/web_contents_sizer.h" |
| 29 #include "chrome/common/prerender_messages.h" | 28 #include "chrome/common/prerender_messages.h" |
| 30 #include "chrome/common/render_messages.h" | 29 #include "chrome/common/render_messages.h" |
| 31 #include "chrome/common/url_constants.h" | |
| 32 #include "components/history/core/browser/history_types.h" | 30 #include "components/history/core/browser/history_types.h" |
| 33 #include "content/public/browser/browser_child_process_host.h" | 31 #include "content/public/browser/browser_child_process_host.h" |
| 34 #include "content/public/browser/browser_thread.h" | 32 #include "content/public/browser/browser_thread.h" |
| 35 #include "content/public/browser/notification_service.h" | 33 #include "content/public/browser/notification_service.h" |
| 36 #include "content/public/browser/render_frame_host.h" | 34 #include "content/public/browser/render_frame_host.h" |
| 37 #include "content/public/browser/render_process_host.h" | 35 #include "content/public/browser/render_process_host.h" |
| 38 #include "content/public/browser/render_view_host.h" | 36 #include "content/public/browser/render_view_host.h" |
| 39 #include "content/public/browser/render_widget_host.h" | 37 #include "content/public/browser/render_widget_host.h" |
| 40 #include "content/public/browser/resource_request_details.h" | 38 #include "content/public/browser/resource_request_details.h" |
| 41 #include "content/public/browser/session_storage_namespace.h" | 39 #include "content/public/browser/session_storage_namespace.h" |
| (...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 760 void PrerenderContents::AddResourceThrottle( | 758 void PrerenderContents::AddResourceThrottle( |
| 761 const base::WeakPtr<PrerenderResourceThrottle>& throttle) { | 759 const base::WeakPtr<PrerenderResourceThrottle>& throttle) { |
| 762 resource_throttles_.push_back(throttle); | 760 resource_throttles_.push_back(throttle); |
| 763 } | 761 } |
| 764 | 762 |
| 765 void PrerenderContents::AddNetworkBytes(int64_t bytes) { | 763 void PrerenderContents::AddNetworkBytes(int64_t bytes) { |
| 766 network_bytes_ += bytes; | 764 network_bytes_ += bytes; |
| 767 } | 765 } |
| 768 | 766 |
| 769 } // namespace prerender | 767 } // namespace prerender |
| OLD | NEW |