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

Side by Side Diff: chrome/browser/ui/webui/html_dialog_tab_contents_delegate.cc

Issue 8224023: Don't show URL for pending new navigations initiated by the renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge conflicts. Created 9 years, 2 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
OLDNEW
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/webui/html_dialog_tab_contents_delegate.h" 5 #include "chrome/browser/ui/webui/html_dialog_tab_contents_delegate.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/tabs/tab_strip_model.h" 8 #include "chrome/browser/tabs/tab_strip_model.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_navigator.h" 10 #include "chrome/browser/ui/browser_navigator.h"
(...skipping 15 matching lines...) Expand all
26 26
27 void HtmlDialogTabContentsDelegate::Detach() { 27 void HtmlDialogTabContentsDelegate::Detach() {
28 profile_ = NULL; 28 profile_ = NULL;
29 } 29 }
30 30
31 // TODO(adriansc): Remove this method once refactoring changed all call sites. 31 // TODO(adriansc): Remove this method once refactoring changed all call sites.
32 TabContents* HtmlDialogTabContentsDelegate::OpenURLFromTab( 32 TabContents* HtmlDialogTabContentsDelegate::OpenURLFromTab(
33 TabContents* source, const GURL& url, const GURL& referrer, 33 TabContents* source, const GURL& url, const GURL& referrer,
34 WindowOpenDisposition disposition, content::PageTransition transition) { 34 WindowOpenDisposition disposition, content::PageTransition transition) {
35 return OpenURLFromTab(source, 35 return OpenURLFromTab(source,
36 OpenURLParams(url, referrer, disposition, transition)); 36 OpenURLParams(url, referrer, disposition, transition,
37 false));
37 } 38 }
38 39
39 TabContents* HtmlDialogTabContentsDelegate::OpenURLFromTab( 40 TabContents* HtmlDialogTabContentsDelegate::OpenURLFromTab(
40 TabContents* source, const OpenURLParams& params) { 41 TabContents* source, const OpenURLParams& params) {
41 if (profile_) { 42 if (profile_) {
42 // Specify a NULL browser for navigation. This will cause Navigate() 43 // Specify a NULL browser for navigation. This will cause Navigate()
43 // to find a browser matching params.profile or create a new one. 44 // to find a browser matching params.profile or create a new one.
44 Browser* browser = NULL; 45 Browser* browser = NULL;
45 browser::NavigateParams nav_params(browser, params.url, params.transition); 46 browser::NavigateParams nav_params(browser, params.url, params.transition);
46 nav_params.profile = profile_; 47 nav_params.profile = profile_;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // This needs to return true so that we are allowed to be resized by our 87 // This needs to return true so that we are allowed to be resized by our
87 // contents. 88 // contents.
88 return true; 89 return true;
89 } 90 }
90 91
91 bool HtmlDialogTabContentsDelegate::ShouldAddNavigationToHistory( 92 bool HtmlDialogTabContentsDelegate::ShouldAddNavigationToHistory(
92 const history::HistoryAddPageArgs& add_page_args, 93 const history::HistoryAddPageArgs& add_page_args,
93 NavigationType::Type navigation_type) { 94 NavigationType::Type navigation_type) {
94 return false; 95 return false;
95 } 96 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/active_downloads_ui.cc ('k') | content/browser/site_instance_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698