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

Side by Side Diff: chrome/browser/ui/views/constrained_html_delegate_gtk.cc

Issue 8785004: Change NavigationController::LoadURL to take a Referrer class instead of a GURL as referrer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years 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/constrained_html_ui.h" 5 #include "chrome/browser/ui/webui/constrained_html_ui.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/ui/gtk/constrained_window_gtk.h" 8 #include "chrome/browser/ui/gtk/constrained_window_gtk.h"
9 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 9 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
10 #include "chrome/browser/ui/views/tab_contents/tab_contents_container.h" 10 #include "chrome/browser/ui/views/tab_contents/tab_contents_container.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 release_tab_on_close_(false) { 96 release_tab_on_close_(false) {
97 CHECK(delegate); 97 CHECK(delegate);
98 TabContents* tab_contents = 98 TabContents* tab_contents =
99 new TabContents(profile, NULL, MSG_ROUTING_NONE, NULL, NULL); 99 new TabContents(profile, NULL, MSG_ROUTING_NONE, NULL, NULL);
100 html_tab_contents_.reset(new TabContentsWrapper(tab_contents)); 100 html_tab_contents_.reset(new TabContentsWrapper(tab_contents));
101 tab_contents->set_delegate(this); 101 tab_contents->set_delegate(this);
102 102
103 // Set |this| as a property so the ConstrainedHtmlUI can retrieve it. 103 // Set |this| as a property so the ConstrainedHtmlUI can retrieve it.
104 ConstrainedHtmlUI::GetPropertyAccessor().SetProperty( 104 ConstrainedHtmlUI::GetPropertyAccessor().SetProperty(
105 tab_contents->property_bag(), this); 105 tab_contents->property_bag(), this);
106 tab_contents->controller().LoadURL(delegate->GetDialogContentURL(), GURL(), 106 tab_contents->controller().LoadURL(delegate->GetDialogContentURL(),
107 content::Referrer(),
107 content::PAGE_TRANSITION_START_PAGE, 108 content::PAGE_TRANSITION_START_PAGE,
108 std::string()); 109 std::string());
109 110
110 views::Widget::InitParams params(views::Widget::InitParams::TYPE_CONTROL); 111 views::Widget::InitParams params(views::Widget::InitParams::TYPE_CONTROL);
111 params.native_widget = this; 112 params.native_widget = this;
112 GetWidget()->Init(params); 113 GetWidget()->Init(params);
113 114
114 tab_container_ = new TabContentsContainer; 115 tab_container_ = new TabContentsContainer;
115 GetWidget()->SetContentsView(tab_container_); 116 GetWidget()->SetContentsView(tab_container_);
116 tab_container_->ChangeTabContents(html_tab_contents_->tab_contents()); 117 tab_container_->ChangeTabContents(html_tab_contents_->tab_contents());
(...skipping 24 matching lines...) Expand all
141 Profile* profile, 142 Profile* profile,
142 HtmlDialogUIDelegate* delegate, 143 HtmlDialogUIDelegate* delegate,
143 TabContentsWrapper* wrapper) { 144 TabContentsWrapper* wrapper) {
144 ConstrainedHtmlDelegateGtk* constrained_delegate = 145 ConstrainedHtmlDelegateGtk* constrained_delegate =
145 new ConstrainedHtmlDelegateGtk(profile, delegate); 146 new ConstrainedHtmlDelegateGtk(profile, delegate);
146 ConstrainedWindow* constrained_window = 147 ConstrainedWindow* constrained_window =
147 new ConstrainedWindowGtk(wrapper, constrained_delegate); 148 new ConstrainedWindowGtk(wrapper, constrained_delegate);
148 constrained_delegate->set_window(constrained_window); 149 constrained_delegate->set_window(constrained_window);
149 return constrained_delegate; 150 return constrained_delegate;
150 } 151 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/web_intent_picker_gtk.cc ('k') | chrome/browser/ui/views/constrained_html_delegate_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698