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

Side by Side Diff: chrome/browser/ui/gtk/web_dialog_gtk.cc

Issue 10897034: First part of PAGE_TRANSITION_START_PAGE cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 3 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/gtk/web_dialog_gtk.h" 5 #include "chrome/browser/ui/gtk/web_dialog_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/ui/browser_dialogs.h" 10 #include "chrome/browser/ui/browser_dialogs.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 browser_context(), NULL, MSG_ROUTING_NONE, NULL))); 208 browser_context(), NULL, MSG_ROUTING_NONE, NULL)));
209 tab_->web_contents()->SetDelegate(this); 209 tab_->web_contents()->SetDelegate(this);
210 210
211 // This must be done before loading the page; see the comments in 211 // This must be done before loading the page; see the comments in
212 // WebDialogUI. 212 // WebDialogUI.
213 WebDialogUI::SetDelegate(tab_->web_contents(), this); 213 WebDialogUI::SetDelegate(tab_->web_contents(), this);
214 214
215 tab_->web_contents()->GetController().LoadURL( 215 tab_->web_contents()->GetController().LoadURL(
216 GetDialogContentURL(), 216 GetDialogContentURL(),
217 content::Referrer(), 217 content::Referrer(),
218 content::PAGE_TRANSITION_START_PAGE, 218 content::PAGE_TRANSITION_AUTO_TOPLEVEL,
219 std::string()); 219 std::string());
220 GtkDialogFlags flags = GTK_DIALOG_NO_SEPARATOR; 220 GtkDialogFlags flags = GTK_DIALOG_NO_SEPARATOR;
221 if (delegate_->GetDialogModalType() != ui::MODAL_TYPE_NONE) 221 if (delegate_->GetDialogModalType() != ui::MODAL_TYPE_NONE)
222 flags = static_cast<GtkDialogFlags>(flags | GTK_DIALOG_MODAL); 222 flags = static_cast<GtkDialogFlags>(flags | GTK_DIALOG_MODAL);
223 223
224 dialog_ = gtk_dialog_new_with_buttons( 224 dialog_ = gtk_dialog_new_with_buttons(
225 UTF16ToUTF8(delegate_->GetDialogTitle()).c_str(), 225 UTF16ToUTF8(delegate_->GetDialogTitle()).c_str(),
226 parent_window_, 226 parent_window_,
227 flags, 227 flags,
228 NULL); 228 NULL);
(...skipping 25 matching lines...) Expand all
254 } 254 }
255 255
256 gtk_widget_show_all(dialog_); 256 gtk_widget_show_all(dialog_);
257 257
258 return GTK_WINDOW(dialog_); 258 return GTK_WINDOW(dialog_);
259 } 259 }
260 260
261 void WebDialogGtk::OnResponse(GtkWidget* dialog, int response_id) { 261 void WebDialogGtk::OnResponse(GtkWidget* dialog, int response_id) {
262 OnDialogClosed(std::string()); 262 OnDialogClosed(std::string());
263 } 263 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/find_bar/find_bar_host_browsertest.cc ('k') | chrome/browser/ui/gtk/web_intent_picker_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698