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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 InitContents(); | 219 InitContents(); |
220 UpdateInstalledServices(); | 220 UpdateInstalledServices(); |
221 UpdateCWSLabel(); | 221 UpdateCWSLabel(); |
222 UpdateSuggestedExtensions(); | 222 UpdateSuggestedExtensions(); |
223 | 223 |
224 GtkThemeService* theme_service = GetThemeService(tab_contents); | 224 GtkThemeService* theme_service = GetThemeService(tab_contents); |
225 registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, | 225 registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, |
226 content::Source<ThemeService>(theme_service)); | 226 content::Source<ThemeService>(theme_service)); |
227 theme_service->InitThemesFor(this); | 227 theme_service->InitThemesFor(this); |
228 | 228 |
229 window_ = new ConstrainedWindowGtk(tab_contents, this); | 229 window_ = new ConstrainedWindowGtk(tab_contents->web_contents(), this); |
230 } | 230 } |
231 | 231 |
232 WebIntentPickerGtk::~WebIntentPickerGtk() { | 232 WebIntentPickerGtk::~WebIntentPickerGtk() { |
233 } | 233 } |
234 | 234 |
235 void WebIntentPickerGtk::Close() { | 235 void WebIntentPickerGtk::Close() { |
236 window_->CloseConstrainedWindow(); | 236 window_->CloseConstrainedWindow(); |
237 if (inline_disposition_tab_contents_.get()) | 237 if (inline_disposition_tab_contents_.get()) |
238 inline_disposition_tab_contents_->web_contents()->OnCloseStarted(); | 238 inline_disposition_tab_contents_->web_contents()->OnCloseStarted(); |
239 } | 239 } |
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
816 return alignment; | 816 return alignment; |
817 } | 817 } |
818 | 818 |
819 void WebIntentPickerGtk::RemoveThrobber() { | 819 void WebIntentPickerGtk::RemoveThrobber() { |
820 GtkWidget* alignment = gtk_widget_get_parent(throbber_->widget()); | 820 GtkWidget* alignment = gtk_widget_get_parent(throbber_->widget()); |
821 DCHECK(alignment); | 821 DCHECK(alignment); |
822 gtk_container_remove(GTK_CONTAINER(alignment), throbber_->widget()); | 822 gtk_container_remove(GTK_CONTAINER(alignment), throbber_->widget()); |
823 gtk_widget_destroy(alignment); | 823 gtk_widget_destroy(alignment); |
824 throbber_->Stop(); | 824 throbber_->Stop(); |
825 } | 825 } |
OLD | NEW |