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

Side by Side Diff: chrome/browser/views/info_bar_alternate_nav_url_view.cc

Issue 8186: Plumb the referrer throughout the OpenURL APIs.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/views/info_bar_alternate_nav_url_view.h" 5 #include "chrome/browser/views/info_bar_alternate_nav_url_view.h"
6 6
7 #include "chrome/app/theme/theme_resources.h" 7 #include "chrome/app/theme/theme_resources.h"
8 #include "chrome/browser/web_contents.h" 8 #include "chrome/browser/web_contents.h"
9 #include "chrome/browser/views/event_utils.h" 9 #include "chrome/browser/views/event_utils.h"
10 #include "chrome/browser/views/info_bar_view.h" 10 #include "chrome/browser/views/info_bar_view.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 // in the other order would be problematic if navigation synchronously closed 53 // in the other order would be problematic if navigation synchronously closed
54 // the bar, as on return from the call, |this| would not exist, and calling 54 // the bar, as on return from the call, |this| would not exist, and calling
55 // Close() would corrupt memory). This means we need to save off all members 55 // Close() would corrupt memory). This means we need to save off all members
56 // we need before calling Close(), which destroys us. 56 // we need before calling Close(), which destroys us.
57 PageNavigator* const navigator = 57 PageNavigator* const navigator =
58 static_cast<InfoBarView*>(GetParent())->web_contents(); 58 static_cast<InfoBarView*>(GetParent())->web_contents();
59 const GURL gurl(alternate_nav_url_); 59 const GURL gurl(alternate_nav_url_);
60 60
61 BeginClose(); 61 BeginClose();
62 62
63 navigator->OpenURL(gurl, event_utils::DispositionFromEventFlags(event_flags), 63 navigator->OpenURL(gurl, GURL(),
64 event_utils::DispositionFromEventFlags(event_flags),
64 // Pretend the user typed this URL, so that navigating to 65 // Pretend the user typed this URL, so that navigating to
65 // it will be the default action when it's typed again in 66 // it will be the default action when it's typed again in
66 // the future. 67 // the future.
67 PageTransition::TYPED); 68 PageTransition::TYPED);
68 } 69 }
69 70
OLDNEW
« no previous file with comments | « chrome/browser/views/html_dialog_view.cc ('k') | chrome/browser/views/options/advanced_contents_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698