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 "chrome/browser/ui/browser_navigator.h" | 5 #include "chrome/browser/ui/browser_navigator.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "chrome/browser/browser_url_handler.h" | 10 #include "chrome/browser/browser_url_handler.h" |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 params->transition, | 502 params->transition, |
503 params->tabstrip_add_types); | 503 params->tabstrip_add_types); |
504 // Now that the |params->target_contents| is safely owned by the target | 504 // Now that the |params->target_contents| is safely owned by the target |
505 // Browser's TabStripModel, we can release ownership. | 505 // Browser's TabStripModel, we can release ownership. |
506 target_contents_owner.ReleaseOwnership(); | 506 target_contents_owner.ReleaseOwnership(); |
507 } | 507 } |
508 | 508 |
509 if (singleton_index >= 0) { | 509 if (singleton_index >= 0) { |
510 TabContents* target = params->browser->GetTabContentsAt(singleton_index); | 510 TabContents* target = params->browser->GetTabContentsAt(singleton_index); |
511 | 511 |
512 if (params->path_behavior == NavigateParams::IGNORE_AND_NAVIGATE && | 512 if (target->is_crashed()) { |
| 513 target->controller().Reload(true); |
| 514 } else if (params->path_behavior == NavigateParams::IGNORE_AND_NAVIGATE && |
513 target->GetURL() != params->url) { | 515 target->GetURL() != params->url) { |
514 target->controller().LoadURL( | 516 target->controller().LoadURL( |
515 params->url, params->referrer, params->transition); | 517 params->url, params->referrer, params->transition); |
516 } | 518 } |
517 | 519 |
518 // If the singleton tab isn't already selected, select it. | 520 // If the singleton tab isn't already selected, select it. |
519 if (params->source_contents != params->target_contents) | 521 if (params->source_contents != params->target_contents) |
520 params->browser->ActivateTabAt(singleton_index, user_initiated); | 522 params->browser->ActivateTabAt(singleton_index, user_initiated); |
521 } | 523 } |
522 } | 524 } |
523 | 525 |
524 } // namespace browser | 526 } // namespace browser |
OLD | NEW |