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); | |
61 } | 60 } |
62 | 61 |
63 MediaGalleriesDialogViews::~MediaGalleriesDialogViews() {} | 62 MediaGalleriesDialogViews::~MediaGalleriesDialogViews() {} |
64 | 63 |
65 void MediaGalleriesDialogViews::InitChildViews() { | 64 void MediaGalleriesDialogViews::InitChildViews() { |
66 // Layout. | 65 // Layout. |
67 views::GridLayout* layout = new views::GridLayout(contents_); | 66 views::GridLayout* layout = new views::GridLayout(contents_); |
68 layout->SetInsets(views::kPanelVertMargin, views::kPanelHorizMargin, | 67 layout->SetInsets(views::kPanelVertMargin, views::kPanelHorizMargin, |
69 0, views::kPanelHorizMargin); | 68 0, views::kPanelHorizMargin); |
70 int column_set_id = 0; | 69 int column_set_id = 0; |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 | 215 |
217 // MediaGalleriesDialogViewsController ----------------------------------------- | 216 // MediaGalleriesDialogViewsController ----------------------------------------- |
218 | 217 |
219 // static | 218 // static |
220 MediaGalleriesDialog* MediaGalleriesDialog::Create( | 219 MediaGalleriesDialog* MediaGalleriesDialog::Create( |
221 MediaGalleriesDialogController* controller) { | 220 MediaGalleriesDialogController* controller) { |
222 return new MediaGalleriesDialogViews(controller); | 221 return new MediaGalleriesDialogViews(controller); |
223 } | 222 } |
224 | 223 |
225 } // namespace chrome | 224 } // namespace chrome |
OLD | NEW |