Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(413)

Side by Side Diff: chrome/browser/ui/views/extensions/media_galleries_dialog_views.cc

Issue 12045037: Refactor modality-specific behavior from ConstrainedWindowViews to WebContentsModalDialogManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Android link error Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/views/constrained_window_views.h" 7 #include "chrome/browser/ui/views/constrained_window_views.h"
8 #include "grit/generated_resources.h" 8 #include "grit/generated_resources.h"
9 #include "grit/locale_settings.h" 9 #include "grit/locale_settings.h"
10 #include "ui/base/l10n/l10n_util.h" 10 #include "ui/base/l10n/l10n_util.h"
(...skipping 19 matching lines...) Expand all
30 window_(NULL), 30 window_(NULL),
31 contents_(new views::View()), 31 contents_(new views::View()),
32 checkbox_container_(NULL), 32 checkbox_container_(NULL),
33 add_gallery_container_(NULL), 33 add_gallery_container_(NULL),
34 confirm_available_(false), 34 confirm_available_(false),
35 accepted_(false) { 35 accepted_(false) {
36 InitChildViews(); 36 InitChildViews();
37 37
38 // Ownership of |contents_| is handed off by this call. |window_| will take 38 // Ownership of |contents_| is handed off by this call. |window_| will take
39 // care of deleting itself after calling DeleteDelegate(). 39 // care of deleting itself after calling DeleteDelegate().
40 window_ = new ConstrainedWindowViews(controller->web_contents(), this); 40 window_ = ConstrainedWindowViews::Create(controller->web_contents(), this);
41 } 41 }
42 42
43 MediaGalleriesDialogViews::~MediaGalleriesDialogViews() {} 43 MediaGalleriesDialogViews::~MediaGalleriesDialogViews() {}
44 44
45 void MediaGalleriesDialogViews::InitChildViews() { 45 void MediaGalleriesDialogViews::InitChildViews() {
46 // Layout. 46 // Layout.
47 views::GridLayout* layout = new views::GridLayout(contents_); 47 views::GridLayout* layout = new views::GridLayout(contents_);
48 layout->SetInsets(views::kPanelVertMargin, views::kPanelHorizMargin, 48 layout->SetInsets(views::kPanelVertMargin, views::kPanelHorizMargin,
49 0, views::kPanelHorizMargin); 49 0, views::kPanelHorizMargin);
50 50
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 219
220 // MediaGalleriesDialogViewsController ----------------------------------------- 220 // MediaGalleriesDialogViewsController -----------------------------------------
221 221
222 // static 222 // static
223 MediaGalleriesDialog* MediaGalleriesDialog::Create( 223 MediaGalleriesDialog* MediaGalleriesDialog::Create(
224 MediaGalleriesDialogController* controller) { 224 MediaGalleriesDialogController* controller) {
225 return new MediaGalleriesDialogViews(controller); 225 return new MediaGalleriesDialogViews(controller);
226 } 226 }
227 227
228 } // namespace chrome 228 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/constrained_window_views_browsertest.cc ('k') | chrome/browser/ui/views/login_prompt_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698