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

Side by Side Diff: chrome/browser/ui/gtk/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/gtk/tab_contents_container_gtk.h" 9 #include "chrome/browser/ui/gtk/tab_contents_container_gtk.h"
10 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 10 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 TabContents* tab_contents = 101 TabContents* tab_contents =
102 new TabContents(profile, NULL, MSG_ROUTING_NONE, NULL, NULL); 102 new TabContents(profile, NULL, MSG_ROUTING_NONE, NULL, NULL);
103 tab_.reset(new TabContentsWrapper(tab_contents)); 103 tab_.reset(new TabContentsWrapper(tab_contents));
104 tab_contents->set_delegate(this); 104 tab_contents->set_delegate(this);
105 105
106 // Set |this| as a property on the tab contents so that the ConstrainedHtmlUI 106 // Set |this| as a property on the tab contents so that the ConstrainedHtmlUI
107 // can get a reference to |this|. 107 // can get a reference to |this|.
108 ConstrainedHtmlUI::GetPropertyAccessor().SetProperty( 108 ConstrainedHtmlUI::GetPropertyAccessor().SetProperty(
109 tab_contents->property_bag(), this); 109 tab_contents->property_bag(), this);
110 110
111 tab_contents->controller().LoadURL(delegate->GetDialogContentURL(), GURL(), 111 tab_contents->controller().LoadURL(delegate->GetDialogContentURL(),
112 content::Referrer(),
112 content::PAGE_TRANSITION_START_PAGE, 113 content::PAGE_TRANSITION_START_PAGE,
113 std::string()); 114 std::string());
114 tab_contents_container_.SetTab(tab_.get()); 115 tab_contents_container_.SetTab(tab_.get());
115 116
116 gfx::Size dialog_size; 117 gfx::Size dialog_size;
117 delegate->GetDialogSize(&dialog_size); 118 delegate->GetDialogSize(&dialog_size);
118 gtk_widget_set_size_request(GTK_WIDGET(tab_contents_container_.widget()), 119 gtk_widget_set_size_request(GTK_WIDGET(tab_contents_container_.widget()),
119 dialog_size.width(), 120 dialog_size.width(),
120 dialog_size.height()); 121 dialog_size.height());
121 122
122 gtk_widget_show_all(GetWidgetRoot()); 123 gtk_widget_show_all(GetWidgetRoot());
123 } 124 }
124 125
125 // static 126 // static
126 ConstrainedHtmlUIDelegate* ConstrainedHtmlUI::CreateConstrainedHtmlDialog( 127 ConstrainedHtmlUIDelegate* ConstrainedHtmlUI::CreateConstrainedHtmlDialog(
127 Profile* profile, 128 Profile* profile,
128 HtmlDialogUIDelegate* delegate, 129 HtmlDialogUIDelegate* delegate,
129 TabContentsWrapper* overshadowed) { 130 TabContentsWrapper* overshadowed) {
130 ConstrainedHtmlDelegateGtk* constrained_delegate = 131 ConstrainedHtmlDelegateGtk* constrained_delegate =
131 new ConstrainedHtmlDelegateGtk(profile, delegate); 132 new ConstrainedHtmlDelegateGtk(profile, delegate);
132 ConstrainedWindow* constrained_window = 133 ConstrainedWindow* constrained_window =
133 new ConstrainedWindowGtk(overshadowed, constrained_delegate); 134 new ConstrainedWindowGtk(overshadowed, constrained_delegate);
134 constrained_delegate->set_window(constrained_window); 135 constrained_delegate->set_window(constrained_window);
135 return constrained_delegate; 136 return constrained_delegate;
136 } 137 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/notifications/balloon_controller.mm ('k') | chrome/browser/ui/gtk/html_dialog_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698