| 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 "content/browser/frame_host/render_frame_host_impl.h" | 5 #include "content/browser/frame_host/render_frame_host_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/containers/hash_tables.h" | 12 #include "base/containers/hash_tables.h" |
| 13 #include "base/debug/dump_without_crashing.h" | |
| 14 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
| 15 #include "base/memory/ptr_util.h" | 14 #include "base/memory/ptr_util.h" |
| 16 #include "base/metrics/histogram_macros.h" | 15 #include "base/metrics/histogram_macros.h" |
| 17 #include "base/process/kill.h" | 16 #include "base/process/kill.h" |
| 18 #include "base/time/time.h" | 17 #include "base/time/time.h" |
| 19 #include "build/build_config.h" | 18 #include "build/build_config.h" |
| 20 #include "content/browser/accessibility/ax_tree_id_registry.h" | 19 #include "content/browser/accessibility/ax_tree_id_registry.h" |
| 21 #include "content/browser/accessibility/browser_accessibility_manager.h" | 20 #include "content/browser/accessibility/browser_accessibility_manager.h" |
| 22 #include "content/browser/accessibility/browser_accessibility_state_impl.h" | 21 #include "content/browser/accessibility/browser_accessibility_state_impl.h" |
| 23 #include "content/browser/bluetooth/web_bluetooth_service_impl.h" | 22 #include "content/browser/bluetooth/web_bluetooth_service_impl.h" |
| (...skipping 1323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1347 return GetRenderWidgetHost()->GetView(); | 1346 return GetRenderWidgetHost()->GetView(); |
| 1348 } | 1347 } |
| 1349 | 1348 |
| 1350 GlobalFrameRoutingId RenderFrameHostImpl::GetGlobalFrameRoutingId() { | 1349 GlobalFrameRoutingId RenderFrameHostImpl::GetGlobalFrameRoutingId() { |
| 1351 return GlobalFrameRoutingId(GetProcess()->GetID(), GetRoutingID()); | 1350 return GlobalFrameRoutingId(GetProcess()->GetID(), GetRoutingID()); |
| 1352 } | 1351 } |
| 1353 | 1352 |
| 1354 void RenderFrameHostImpl::SetNavigationHandle( | 1353 void RenderFrameHostImpl::SetNavigationHandle( |
| 1355 std::unique_ptr<NavigationHandleImpl> navigation_handle) { | 1354 std::unique_ptr<NavigationHandleImpl> navigation_handle) { |
| 1356 navigation_handle_ = std::move(navigation_handle); | 1355 navigation_handle_ = std::move(navigation_handle); |
| 1357 | |
| 1358 // TODO(clamy): Remove this debug code once we understand better how we get to | |
| 1359 // the point of attempting to transfer a navigation from a RFH that is no | |
| 1360 // longer active. | |
| 1361 if (navigation_handle_ && !is_active()) | |
| 1362 base::debug::DumpWithoutCrashing(); | |
| 1363 } | 1356 } |
| 1364 | 1357 |
| 1365 std::unique_ptr<NavigationHandleImpl> | 1358 std::unique_ptr<NavigationHandleImpl> |
| 1366 RenderFrameHostImpl::PassNavigationHandleOwnership() { | 1359 RenderFrameHostImpl::PassNavigationHandleOwnership() { |
| 1367 DCHECK(!IsBrowserSideNavigationEnabled()); | 1360 DCHECK(!IsBrowserSideNavigationEnabled()); |
| 1368 if (navigation_handle_) | 1361 if (navigation_handle_) |
| 1369 navigation_handle_->set_is_transferring(true); | 1362 navigation_handle_->set_is_transferring(true); |
| 1370 return std::move(navigation_handle_); | 1363 return std::move(navigation_handle_); |
| 1371 } | 1364 } |
| 1372 | 1365 |
| (...skipping 2106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3479 // There is no pending NavigationEntry in these cases, so pass 0 as the | 3472 // There is no pending NavigationEntry in these cases, so pass 0 as the |
| 3480 // pending_nav_entry_id. If the previous handle was a prematurely aborted | 3473 // pending_nav_entry_id. If the previous handle was a prematurely aborted |
| 3481 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. | 3474 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. |
| 3482 return NavigationHandleImpl::Create( | 3475 return NavigationHandleImpl::Create( |
| 3483 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, | 3476 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, |
| 3484 params.was_within_same_page, base::TimeTicks::Now(), | 3477 params.was_within_same_page, base::TimeTicks::Now(), |
| 3485 entry_id_for_data_nav, false); // started_from_context_menu | 3478 entry_id_for_data_nav, false); // started_from_context_menu |
| 3486 } | 3479 } |
| 3487 | 3480 |
| 3488 } // namespace content | 3481 } // namespace content |
| OLD | NEW |