Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(340)

Side by Side Diff: chrome/browser/ui/browser_navigator.cc

Issue 9473001: Extract minimal RenderViewHost interface for embedders, leaving (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to LKGR. Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/cocoa/extensions/extension_view_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/cocoa/extensions/extension_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698