| 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/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 "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 } | 522 } |
| 523 } else { | 523 } else { |
| 524 // ... otherwise if we're loading in the current tab, the target is the | 524 // ... otherwise if we're loading in the current tab, the target is the |
| 525 // same as the source. | 525 // same as the source. |
| 526 params->target_contents = params->source_contents; | 526 params->target_contents = params->source_contents; |
| 527 DCHECK(params->target_contents); | 527 DCHECK(params->target_contents); |
| 528 } | 528 } |
| 529 | 529 |
| 530 if (user_initiated) { | 530 if (user_initiated) { |
| 531 params->target_contents->web_contents()->GetRenderViewHost()-> | 531 params->target_contents->web_contents()->GetRenderViewHost()-> |
| 532 delegate()->OnUserGesture(); | 532 GetDelegate()->OnUserGesture(); |
| 533 } | 533 } |
| 534 | 534 |
| 535 InitializeExtraHeaders(params, params->target_contents->profile(), | 535 InitializeExtraHeaders(params, params->target_contents->profile(), |
| 536 &extra_headers); | 536 &extra_headers); |
| 537 | 537 |
| 538 // Try to handle non-navigational URLs that popup dialogs and such, these | 538 // Try to handle non-navigational URLs that popup dialogs and such, these |
| 539 // should not actually navigate. | 539 // should not actually navigate. |
| 540 if (!HandleNonNavigationAboutURL(url)) { | 540 if (!HandleNonNavigationAboutURL(url)) { |
| 541 // Perform the actual navigation, tracking whether it came from the | 541 // Perform the actual navigation, tracking whether it came from the |
| 542 // renderer. | 542 // renderer. |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 popup_bounds.height() > max_height || | 680 popup_bounds.height() > max_height || |
| 681 popup_bounds.width() == 0 || | 681 popup_bounds.width() == 0 || |
| 682 popup_bounds.height() == 0) { | 682 popup_bounds.height() == 0) { |
| 683 return NEW_FOREGROUND_TAB; | 683 return NEW_FOREGROUND_TAB; |
| 684 } | 684 } |
| 685 return NEW_POPUP; | 685 return NEW_POPUP; |
| 686 } | 686 } |
| 687 #endif | 687 #endif |
| 688 | 688 |
| 689 } // namespace browser | 689 } // namespace browser |
| OLD | NEW |