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

Side by Side Diff: chrome/browser/alternate_nav_url_fetcher.cc

Issue 8253002: Move PageTransition into content namespace. While I'm touching all these files, I've also updated... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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/alternate_nav_url_fetcher.h" 5 #include "chrome/browser/alternate_nav_url_fetcher.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/infobars/infobar_tab_helper.h" 8 #include "chrome/browser/infobars/infobar_tab_helper.h"
9 #include "chrome/browser/intranet_redirect_detector.h" 9 #include "chrome/browser/intranet_redirect_detector.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 return UTF8ToUTF16(alternate_nav_url_.spec()); 72 return UTF8ToUTF16(alternate_nav_url_.spec());
73 } 73 }
74 74
75 bool AlternateNavInfoBarDelegate::LinkClicked( 75 bool AlternateNavInfoBarDelegate::LinkClicked(
76 WindowOpenDisposition disposition) { 76 WindowOpenDisposition disposition) {
77 owner()->tab_contents()->OpenURL( 77 owner()->tab_contents()->OpenURL(
78 alternate_nav_url_, GURL(), disposition, 78 alternate_nav_url_, GURL(), disposition,
79 // Pretend the user typed this URL, so that navigating to 79 // Pretend the user typed this URL, so that navigating to
80 // it will be the default action when it's typed again in 80 // it will be the default action when it's typed again in
81 // the future. 81 // the future.
82 PageTransition::TYPED); 82 content::PAGE_TRANSITION_TYPED);
83 83
84 // We should always close, even if the navigation did not occur within this 84 // We should always close, even if the navigation did not occur within this
85 // TabContents. 85 // TabContents.
86 return true; 86 return true;
87 } 87 }
88 88
89 89
90 // AlternateNavURLFetcher ----------------------------------------------------- 90 // AlternateNavURLFetcher -----------------------------------------------------
91 91
92 AlternateNavURLFetcher::AlternateNavURLFetcher( 92 AlternateNavURLFetcher::AlternateNavURLFetcher(
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 return; 219 return;
220 } 220 }
221 221
222 InfoBarTabHelper* infobar_helper = 222 InfoBarTabHelper* infobar_helper =
223 TabContentsWrapper::GetCurrentWrapperForContents( 223 TabContentsWrapper::GetCurrentWrapperForContents(
224 controller_->tab_contents())->infobar_tab_helper(); 224 controller_->tab_contents())->infobar_tab_helper();
225 infobar_helper->AddInfoBar( 225 infobar_helper->AddInfoBar(
226 new AlternateNavInfoBarDelegate(infobar_helper, alternate_nav_url_)); 226 new AlternateNavInfoBarDelegate(infobar_helper, alternate_nav_url_));
227 delete this; 227 delete this;
228 } 228 }
OLDNEW
« no previous file with comments | « chrome/browser/accessibility/renderer_accessibility_browsertest.cc ('k') | chrome/browser/autocomplete/autocomplete.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698