| 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/extensions/media_galleries_dialog_gtk.h" | 5 #include "chrome/browser/ui/gtk/extensions/media_galleries_dialog_gtk.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/browser/media_gallery/media_galleries_preferences.h" | 9 #include "chrome/browser/media_gallery/media_galleries_preferences.h" |
| 10 #include "chrome/browser/ui/gtk/gtk_util.h" | 10 #include "chrome/browser/ui/gtk/gtk_util.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 MediaGalleriesDialogController* controller) | 21 MediaGalleriesDialogController* controller) |
| 22 : controller_(controller), | 22 : controller_(controller), |
| 23 window_(NULL), | 23 window_(NULL), |
| 24 confirm_(NULL), | 24 confirm_(NULL), |
| 25 checkbox_container_(NULL), | 25 checkbox_container_(NULL), |
| 26 ignore_toggles_(false), | 26 ignore_toggles_(false), |
| 27 accepted_(false) { | 27 accepted_(false) { |
| 28 InitWidgets(); | 28 InitWidgets(); |
| 29 | 29 |
| 30 // May be NULL during tests. | 30 // May be NULL during tests. |
| 31 if (controller->tab_contents()) | 31 if (controller->web_contents()) |
| 32 window_ = new ConstrainedWindowGtk(controller->tab_contents(), this); | 32 window_ = new ConstrainedWindowGtk(controller->web_contents(), this); |
| 33 } | 33 } |
| 34 | 34 |
| 35 MediaGalleriesDialogGtk::~MediaGalleriesDialogGtk() { | 35 MediaGalleriesDialogGtk::~MediaGalleriesDialogGtk() { |
| 36 } | 36 } |
| 37 | 37 |
| 38 void MediaGalleriesDialogGtk::InitWidgets() { | 38 void MediaGalleriesDialogGtk::InitWidgets() { |
| 39 contents_.Own(gtk_vbox_new(FALSE, ui::kContentAreaSpacing)); | 39 contents_.Own(gtk_vbox_new(FALSE, ui::kContentAreaSpacing)); |
| 40 | 40 |
| 41 GtkWidget* header = | 41 GtkWidget* header = |
| 42 gtk_util::CreateBoldLabel(UTF16ToUTF8(controller_->GetHeader())); | 42 gtk_util::CreateBoldLabel(UTF16ToUTF8(controller_->GetHeader())); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 161 |
| 162 // MediaGalleriesDialogController ---------------------------------------------- | 162 // MediaGalleriesDialogController ---------------------------------------------- |
| 163 | 163 |
| 164 // static | 164 // static |
| 165 MediaGalleriesDialog* MediaGalleriesDialog::Create( | 165 MediaGalleriesDialog* MediaGalleriesDialog::Create( |
| 166 MediaGalleriesDialogController* controller) { | 166 MediaGalleriesDialogController* controller) { |
| 167 return new MediaGalleriesDialogGtk(controller); | 167 return new MediaGalleriesDialogGtk(controller); |
| 168 } | 168 } |
| 169 | 169 |
| 170 } // namespace chrome | 170 } // namespace chrome |
| OLD | NEW |