| 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 "content/browser/web_contents/render_view_host_manager.h" | 5 #include "content/browser/web_contents/render_view_host_manager.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 } | 327 } |
| 328 } | 328 } |
| 329 } else { | 329 } else { |
| 330 // Current page says to cancel. | 330 // Current page says to cancel. |
| 331 CancelPending(); | 331 CancelPending(); |
| 332 cross_navigation_pending_ = false; | 332 cross_navigation_pending_ = false; |
| 333 } | 333 } |
| 334 } else { | 334 } else { |
| 335 // Non-cross site transition means closing the entire tab. | 335 // Non-cross site transition means closing the entire tab. |
| 336 bool proceed_to_fire_unload; | 336 bool proceed_to_fire_unload; |
| 337 delegate_->BeforeUnloadFiredFromRenderManager(proceed, | 337 delegate_->BeforeUnloadFiredFromRenderManager(proceed, proceed_time, |
| 338 &proceed_to_fire_unload); | 338 &proceed_to_fire_unload); |
| 339 | 339 |
| 340 if (proceed_to_fire_unload) { | 340 if (proceed_to_fire_unload) { |
| 341 // This is not a cross-site navigation, the tab is being closed. | 341 // This is not a cross-site navigation, the tab is being closed. |
| 342 render_view_host_->ClosePage(); | 342 render_view_host_->ClosePage(); |
| 343 } | 343 } |
| 344 } | 344 } |
| 345 } | 345 } |
| 346 | 346 |
| 347 void RenderViewHostManager::OnCrossSiteResponse(int new_render_process_host_id, | 347 void RenderViewHostManager::OnCrossSiteResponse(int new_render_process_host_id, |
| (...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 964 } | 964 } |
| 965 | 965 |
| 966 RenderViewHostImpl* RenderViewHostManager::GetSwappedOutRenderViewHost( | 966 RenderViewHostImpl* RenderViewHostManager::GetSwappedOutRenderViewHost( |
| 967 SiteInstance* instance) { | 967 SiteInstance* instance) { |
| 968 RenderViewHostMap::iterator iter = swapped_out_hosts_.find(instance->GetId()); | 968 RenderViewHostMap::iterator iter = swapped_out_hosts_.find(instance->GetId()); |
| 969 if (iter != swapped_out_hosts_.end()) | 969 if (iter != swapped_out_hosts_.end()) |
| 970 return iter->second; | 970 return iter->second; |
| 971 | 971 |
| 972 return NULL; | 972 return NULL; |
| 973 } | 973 } |
| OLD | NEW |