| 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/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 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_alert.h" | 8 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_alert.h" |
| 9 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sh
eet.h" | 9 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sh
eet.h" |
| 10 #import "chrome/browser/ui/cocoa/key_equivalent_constants.h" | 10 #import "chrome/browser/ui/cocoa/key_equivalent_constants.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 window_.reset(new ConstrainedWindowMac( | 110 window_.reset(new ConstrainedWindowMac( |
| 111 this, controller->web_contents(), sheet)); | 111 this, controller->web_contents(), sheet)); |
| 112 } | 112 } |
| 113 } | 113 } |
| 114 | 114 |
| 115 MediaGalleriesDialogCocoa::~MediaGalleriesDialogCocoa() { | 115 MediaGalleriesDialogCocoa::~MediaGalleriesDialogCocoa() { |
| 116 } | 116 } |
| 117 | 117 |
| 118 void MediaGalleriesDialogCocoa::OnAcceptClicked() { | 118 void MediaGalleriesDialogCocoa::OnAcceptClicked() { |
| 119 accepted_ = true; | 119 accepted_ = true; |
| 120 window_->CloseConstrainedWindow(); | 120 window_->CloseWebContentsModalDialog(); |
| 121 } | 121 } |
| 122 | 122 |
| 123 void MediaGalleriesDialogCocoa::OnCancelClicked() { | 123 void MediaGalleriesDialogCocoa::OnCancelClicked() { |
| 124 window_->CloseConstrainedWindow(); | 124 window_->CloseWebContentsModalDialog(); |
| 125 } | 125 } |
| 126 | 126 |
| 127 void MediaGalleriesDialogCocoa::OnAddFolderClicked() { | 127 void MediaGalleriesDialogCocoa::OnAddFolderClicked() { |
| 128 controller_->OnAddFolderClicked(); | 128 controller_->OnAddFolderClicked(); |
| 129 } | 129 } |
| 130 | 130 |
| 131 void MediaGalleriesDialogCocoa::OnCheckboxToggled(NSButton* checkbox) { | 131 void MediaGalleriesDialogCocoa::OnCheckboxToggled(NSButton* checkbox) { |
| 132 const MediaGalleriesDialogController::KnownGalleryPermissions& permissions = | 132 const MediaGalleriesDialogController::KnownGalleryPermissions& permissions = |
| 133 controller_->permissions(); | 133 controller_->permissions(); |
| 134 [[[alert_ buttons] objectAtIndex:0] setEnabled:YES]; | 134 [[[alert_ buttons] objectAtIndex:0] setEnabled:YES]; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 | 214 |
| 215 // static | 215 // static |
| 216 MediaGalleriesDialog* MediaGalleriesDialog::Create( | 216 MediaGalleriesDialog* MediaGalleriesDialog::Create( |
| 217 MediaGalleriesDialogController* controller) { | 217 MediaGalleriesDialogController* controller) { |
| 218 scoped_nsobject<MediaGalleriesCocoaController> cocoa_controller( | 218 scoped_nsobject<MediaGalleriesCocoaController> cocoa_controller( |
| 219 [[MediaGalleriesCocoaController alloc] init]); | 219 [[MediaGalleriesCocoaController alloc] init]); |
| 220 return new MediaGalleriesDialogCocoa(controller, cocoa_controller); | 220 return new MediaGalleriesDialogCocoa(controller, cocoa_controller); |
| 221 } | 221 } |
| 222 | 222 |
| 223 } // namespace chrome | 223 } // namespace chrome |
| OLD | NEW |