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/views/extensions/media_galleries_dialog_views.h" | 5 #include "chrome/browser/ui/views/extensions/media_galleries_dialog_views.h" |
6 | 6 |
7 #include "chrome/browser/ui/tab_contents/tab_contents.h" | 7 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
8 #include "chrome/browser/ui/views/constrained_window_views.h" | 8 #include "chrome/browser/ui/views/constrained_window_views.h" |
9 #include "grit/generated_resources.h" | 9 #include "grit/generated_resources.h" |
10 #include "grit/locale_settings.h" | 10 #include "grit/locale_settings.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 contents_(new views::View()), | 49 contents_(new views::View()), |
50 checkbox_container_(NULL), | 50 checkbox_container_(NULL), |
51 add_gallery_container_(NULL), | 51 add_gallery_container_(NULL), |
52 confirm_available_(false), | 52 confirm_available_(false), |
53 accepted_(false) { | 53 accepted_(false) { |
54 InitChildViews(); | 54 InitChildViews(); |
55 | 55 |
56 // Ownership of |contents_| is handed off by this call. |window_| will take | 56 // Ownership of |contents_| is handed off by this call. |window_| will take |
57 // care of deleting itself after calling DeleteDelegate(). | 57 // care of deleting itself after calling DeleteDelegate(). |
58 window_ = new ConstrainedWindowViews( | 58 window_ = new ConstrainedWindowViews( |
59 controller->tab_contents()->web_contents(), this, false); | 59 controller->tab_contents()->web_contents(), this, false, |
| 60 ConstrainedWindowViews::DEFAULT_INSETS); |
60 } | 61 } |
61 | 62 |
62 MediaGalleriesDialogViews::~MediaGalleriesDialogViews() {} | 63 MediaGalleriesDialogViews::~MediaGalleriesDialogViews() {} |
63 | 64 |
64 void MediaGalleriesDialogViews::InitChildViews() { | 65 void MediaGalleriesDialogViews::InitChildViews() { |
65 // Layout. | 66 // Layout. |
66 views::GridLayout* layout = new views::GridLayout(contents_); | 67 views::GridLayout* layout = new views::GridLayout(contents_); |
67 layout->SetInsets(views::kPanelVertMargin, views::kPanelHorizMargin, | 68 layout->SetInsets(views::kPanelVertMargin, views::kPanelHorizMargin, |
68 0, views::kPanelHorizMargin); | 69 0, views::kPanelHorizMargin); |
69 int column_set_id = 0; | 70 int column_set_id = 0; |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 | 216 |
216 // MediaGalleriesDialogViewsController ----------------------------------------- | 217 // MediaGalleriesDialogViewsController ----------------------------------------- |
217 | 218 |
218 // static | 219 // static |
219 MediaGalleriesDialog* MediaGalleriesDialog::Create( | 220 MediaGalleriesDialog* MediaGalleriesDialog::Create( |
220 MediaGalleriesDialogController* controller) { | 221 MediaGalleriesDialogController* controller) { |
221 return new MediaGalleriesDialogViews(controller); | 222 return new MediaGalleriesDialogViews(controller); |
222 } | 223 } |
223 | 224 |
224 } // namespace chrome | 225 } // namespace chrome |
OLD | NEW |