OLD | NEW |
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_intent_picker_gtk.h" | 5 #include "chrome/browser/ui/gtk/web_intent_picker_gtk.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 window_ = new ConstrainedWindowGtk(web_contents, this); | 231 window_ = new ConstrainedWindowGtk(web_contents, this); |
232 | 232 |
233 if (model_->IsInlineDisposition()) | 233 if (model_->IsInlineDisposition()) |
234 OnInlineDisposition(string16(), model_->inline_disposition_url()); | 234 OnInlineDisposition(string16(), model_->inline_disposition_url()); |
235 } | 235 } |
236 | 236 |
237 WebIntentPickerGtk::~WebIntentPickerGtk() { | 237 WebIntentPickerGtk::~WebIntentPickerGtk() { |
238 } | 238 } |
239 | 239 |
240 void WebIntentPickerGtk::Close() { | 240 void WebIntentPickerGtk::Close() { |
241 window_->CloseConstrainedWindow(); | 241 window_->CloseWebContentsModalDialog(); |
242 if (inline_disposition_web_contents_.get()) | 242 if (inline_disposition_web_contents_.get()) |
243 inline_disposition_web_contents_->OnCloseStarted(); | 243 inline_disposition_web_contents_->OnCloseStarted(); |
244 } | 244 } |
245 | 245 |
246 void WebIntentPickerGtk::SetActionString(const string16& action) { | 246 void WebIntentPickerGtk::SetActionString(const string16& action) { |
247 header_label_text_ = action; | 247 header_label_text_ = action; |
248 if (header_label_) | 248 if (header_label_) |
249 gtk_label_set_text(GTK_LABEL(header_label_), UTF16ToUTF8(action).c_str()); | 249 gtk_label_set_text(GTK_LABEL(header_label_), UTF16ToUTF8(action).c_str()); |
250 } | 250 } |
251 | 251 |
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
871 return alignment; | 871 return alignment; |
872 } | 872 } |
873 | 873 |
874 void WebIntentPickerGtk::RemoveThrobber() { | 874 void WebIntentPickerGtk::RemoveThrobber() { |
875 GtkWidget* alignment = gtk_widget_get_parent(throbber_->widget()); | 875 GtkWidget* alignment = gtk_widget_get_parent(throbber_->widget()); |
876 DCHECK(alignment); | 876 DCHECK(alignment); |
877 gtk_container_remove(GTK_CONTAINER(alignment), throbber_->widget()); | 877 gtk_container_remove(GTK_CONTAINER(alignment), throbber_->widget()); |
878 gtk_widget_destroy(alignment); | 878 gtk_widget_destroy(alignment); |
879 throbber_->Stop(); | 879 throbber_->Stop(); |
880 } | 880 } |
OLD | NEW |