OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/browser/tab_contents/tab_contents.h" | 5 #include "content/browser/tab_contents/tab_contents.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 void MakeNavigateParams(const NavigationEntry& entry, | 153 void MakeNavigateParams(const NavigationEntry& entry, |
154 const NavigationController& controller, | 154 const NavigationController& controller, |
155 TabContentsDelegate* delegate, | 155 TabContentsDelegate* delegate, |
156 NavigationController::ReloadType reload_type, | 156 NavigationController::ReloadType reload_type, |
157 ViewMsg_Navigate_Params* params) { | 157 ViewMsg_Navigate_Params* params) { |
158 params->page_id = entry.page_id(); | 158 params->page_id = entry.page_id(); |
159 params->pending_history_list_offset = controller.GetIndexOfEntry(&entry); | 159 params->pending_history_list_offset = controller.GetIndexOfEntry(&entry); |
160 params->current_history_list_offset = controller.last_committed_entry_index(); | 160 params->current_history_list_offset = controller.last_committed_entry_index(); |
161 params->current_history_list_length = controller.entry_count(); | 161 params->current_history_list_length = controller.entry_count(); |
162 params->url = entry.url(); | 162 params->url = entry.url(); |
163 params->referrer = content::Referrer(entry.referrer(), | 163 params->referrer = entry.referrer(); |
164 WebKit::WebReferrerPolicyDefault); | |
165 params->transition = entry.transition_type(); | 164 params->transition = entry.transition_type(); |
166 params->state = entry.content_state(); | 165 params->state = entry.content_state(); |
167 params->navigation_type = | 166 params->navigation_type = |
168 GetNavigationType(controller.browser_context(), entry, reload_type); | 167 GetNavigationType(controller.browser_context(), entry, reload_type); |
169 params->request_time = base::Time::Now(); | 168 params->request_time = base::Time::Now(); |
170 params->extra_headers = entry.extra_headers(); | 169 params->extra_headers = entry.extra_headers(); |
171 params->transferred_request_child_id = | 170 params->transferred_request_child_id = |
172 entry.transferred_global_request_id().child_id; | 171 entry.transferred_global_request_id().child_id; |
173 params->transferred_request_request_id = | 172 params->transferred_request_request_id = |
174 entry.transferred_global_request_id().request_id; | 173 entry.transferred_global_request_id().request_id; |
(...skipping 1903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2078 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); | 2077 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); |
2079 // Can be NULL during tests. | 2078 // Can be NULL during tests. |
2080 if (rwh_view) | 2079 if (rwh_view) |
2081 rwh_view->SetSize(view()->GetContainerSize()); | 2080 rwh_view->SetSize(view()->GetContainerSize()); |
2082 } | 2081 } |
2083 | 2082 |
2084 bool TabContents::GotResponseToLockMouseRequest(bool allowed) { | 2083 bool TabContents::GotResponseToLockMouseRequest(bool allowed) { |
2085 return render_view_host() ? | 2084 return render_view_host() ? |
2086 render_view_host()->GotResponseToLockMouseRequest(allowed) : false; | 2085 render_view_host()->GotResponseToLockMouseRequest(allowed) : false; |
2087 } | 2086 } |
OLD | NEW |