| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/gtk/html_dialog_gtk.h" | 5 #include "chrome/browser/gtk/html_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/browser.h" | 10 #include "chrome/browser/browser.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 // To make sure the default key bindings can still work, such as Escape to | 117 // To make sure the default key bindings can still work, such as Escape to |
| 118 // close the dialog. | 118 // close the dialog. |
| 119 gtk_bindings_activate_event(GTK_OBJECT(dialog_), os_event); | 119 gtk_bindings_activate_event(GTK_OBJECT(dialog_), os_event); |
| 120 } | 120 } |
| 121 | 121 |
| 122 //////////////////////////////////////////////////////////////////////////////// | 122 //////////////////////////////////////////////////////////////////////////////// |
| 123 // HtmlDialogGtk: | 123 // HtmlDialogGtk: |
| 124 | 124 |
| 125 void HtmlDialogGtk::InitDialog() { | 125 void HtmlDialogGtk::InitDialog() { |
| 126 tab_contents_.reset( | 126 tab_contents_.reset( |
| 127 new TabContents(profile(), NULL, MSG_ROUTING_NONE, NULL)); | 127 new TabContents(profile(), NULL, MSG_ROUTING_NONE, NULL, NULL)); |
| 128 tab_contents_->set_delegate(this); | 128 tab_contents_->set_delegate(this); |
| 129 | 129 |
| 130 // This must be done before loading the page; see the comments in | 130 // This must be done before loading the page; see the comments in |
| 131 // HtmlDialogUI. | 131 // HtmlDialogUI. |
| 132 HtmlDialogUI::GetPropertyAccessor().SetProperty(tab_contents_->property_bag(), | 132 HtmlDialogUI::GetPropertyAccessor().SetProperty(tab_contents_->property_bag(), |
| 133 this); | 133 this); |
| 134 | 134 |
| 135 tab_contents_->controller().LoadURL(GetDialogContentURL(), | 135 tab_contents_->controller().LoadURL(GetDialogContentURL(), |
| 136 GURL(), PageTransition::START_PAGE); | 136 GURL(), PageTransition::START_PAGE); |
| 137 GtkDialogFlags flags = GTK_DIALOG_NO_SEPARATOR; | 137 GtkDialogFlags flags = GTK_DIALOG_NO_SEPARATOR; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 158 gtk_widget_set_size_request(GTK_WIDGET(tab_contents_container_->widget()), | 158 gtk_widget_set_size_request(GTK_WIDGET(tab_contents_container_->widget()), |
| 159 dialog_size.width(), | 159 dialog_size.width(), |
| 160 dialog_size.height()); | 160 dialog_size.height()); |
| 161 | 161 |
| 162 gtk_widget_show_all(dialog_); | 162 gtk_widget_show_all(dialog_); |
| 163 } | 163 } |
| 164 | 164 |
| 165 void HtmlDialogGtk::OnResponse(GtkWidget* dialog, int response_id) { | 165 void HtmlDialogGtk::OnResponse(GtkWidget* dialog, int response_id) { |
| 166 OnDialogClosed(std::string()); | 166 OnDialogClosed(std::string()); |
| 167 } | 167 } |
| OLD | NEW |