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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/media_galleries_dialog_cocoa.mm

Issue 11138010: Remove TabContents from media galleries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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/cocoa/extensions/media_galleries_dialog_cocoa.h" 5 #include "chrome/browser/ui/cocoa/extensions/media_galleries_dialog_cocoa.h"
6 6
7 #include "base/sys_string_conversions.h" 7 #include "base/sys_string_conversions.h"
8 #include "grit/generated_resources.h" 8 #include "grit/generated_resources.h"
9 #include "ui/base/l10n/l10n_util.h" 9 #include "ui/base/l10n/l10n_util.h"
10 10
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 [alert_ setAccessoryView:checkbox_container_]; 87 [alert_ setAccessoryView:checkbox_container_];
88 88
89 // As a safeguard against the user skipping reading over the dialog and just 89 // As a safeguard against the user skipping reading over the dialog and just
90 // confirming, the button will be unavailable for dialogs without any checks 90 // confirming, the button will be unavailable for dialogs without any checks
91 // until the user toggles something. 91 // until the user toggles something.
92 [[[alert_ buttons] objectAtIndex:0] setEnabled: 92 [[[alert_ buttons] objectAtIndex:0] setEnabled:
93 controller_->HasPermittedGalleries()]; 93 controller_->HasPermittedGalleries()];
94 94
95 set_sheet(alert_); 95 set_sheet(alert_);
96 // May be NULL during tests. 96 // May be NULL during tests.
97 if (controller->tab_contents()) 97 if (controller->web_contents())
98 window_ = new ConstrainedWindowMac(controller->tab_contents(), this); 98 window_ = new ConstrainedWindowMac(controller->web_contents(), this);
99 } 99 }
100 100
101 MediaGalleriesDialogCocoa::~MediaGalleriesDialogCocoa() { 101 MediaGalleriesDialogCocoa::~MediaGalleriesDialogCocoa() {
102 } 102 }
103 103
104 void MediaGalleriesDialogCocoa::OnAddFolderClicked() { 104 void MediaGalleriesDialogCocoa::OnAddFolderClicked() {
105 controller_->OnAddFolderClicked(); 105 controller_->OnAddFolderClicked();
106 } 106 }
107 107
108 void MediaGalleriesDialogCocoa::OnCheckboxToggled(NSButton* checkbox) { 108 void MediaGalleriesDialogCocoa::OnCheckboxToggled(NSButton* checkbox) {
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 211
212 // static 212 // static
213 MediaGalleriesDialog* MediaGalleriesDialog::Create( 213 MediaGalleriesDialog* MediaGalleriesDialog::Create(
214 MediaGalleriesDialogController* controller) { 214 MediaGalleriesDialogController* controller) {
215 scoped_nsobject<MediaGalleriesCocoaController> cocoa_controller( 215 scoped_nsobject<MediaGalleriesCocoaController> cocoa_controller(
216 [[MediaGalleriesCocoaController alloc] init]); 216 [[MediaGalleriesCocoaController alloc] init]);
217 return new MediaGalleriesDialogCocoa(controller, cocoa_controller); 217 return new MediaGalleriesDialogCocoa(controller, cocoa_controller);
218 } 218 }
219 219
220 } // namespace chrome 220 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698