Index: chrome/browser/ui/cocoa/extensions/media_galleries_dialog_cocoa.h |
diff --git a/chrome/browser/ui/cocoa/extensions/media_galleries_dialog_cocoa.h b/chrome/browser/ui/cocoa/extensions/media_galleries_dialog_cocoa.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5835912f32644a54b5b08a42f37256d5e0687a2e |
--- /dev/null |
+++ b/chrome/browser/ui/cocoa/extensions/media_galleries_dialog_cocoa.h |
@@ -0,0 +1,67 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_UI_COCOA_EXTENSIONS_MEDIA_GALLERIES_DIALOG_COCOA_H_ |
+#define CHROME_BROWSER_UI_COCOA_EXTENSIONS_MEDIA_GALLERIES_DIALOG_COCOA_H_ |
+ |
+#include "chrome/browser/media_gallery/media_galleries_dialog_controller.h" |
+#import "chrome/browser/ui/cocoa/constrained_window_mac.h" |
+ |
+@class MediaGalleriesCocoaBridge; |
+ |
+namespace chrome { |
+ |
+class MediaGalleriesDialogCocoa : |
Robert Sesek
2012/08/14 21:07:45
Class-level comment.
sail
2012/08/14 21:38:47
Done.
|
+ public ConstrainedWindowMacDelegateSystemSheet, |
+ public MediaGalleriesDialog { |
+ public: |
+ MediaGalleriesDialogCocoa( |
+ MediaGalleriesDialogController* controller, |
+ MediaGalleriesCocoaBridge* delegate); |
+ virtual ~MediaGalleriesDialogCocoa(); |
+ |
+ void OnAddFolderClicked(); |
Robert Sesek
2012/08/14 21:07:45
Document these methods, too.
|
+ void OnCheckboxToggled(NSButton* checkbox); |
+ void SheetDidEnd(NSInteger result); |
+ |
+ // MediaGalleriesDialog implementation: |
+ virtual void UpdateGallery(const MediaGalleryPrefInfo* gallery, |
+ bool permitted) OVERRIDE; |
+ |
+ // ConstrainedWindowMacDelegateSystemSheet implementation. |
+ virtual void DeleteDelegate() OVERRIDE; |
+ |
+ private: |
+ void UpdateGalleryCheckbox(NSButton* checkbox, |
+ const MediaGalleryPrefInfo* gallery, |
+ bool permitted); |
+ void UpdateCheckboxContainerFrame(); |
+ |
+ // Weak pointer to the controller. |
Robert Sesek
2012/08/14 21:07:45
; // weak should be sufficient
sail
2012/08/14 21:38:47
Done.
|
+ MediaGalleriesDialogController* controller_; |
+ |
+ // Weak pointer to the window. |
+ ConstrainedWindow* window_; |
+ |
+ // True if the user has pressed accept. |
+ bool accepted_; |
+ |
+ // List of checkboxes ordered from bottom to top. |
+ scoped_nsobject<NSMutableArray> checkboxes_; |
+ |
+ // Container view for checkboxes. |
+ scoped_nsobject<NSView> checkbox_container_; |
+ |
+ // The alert that the dialog is being displayed as. |
+ scoped_nsobject<NSAlert> alert_; |
+ |
+ // An Objective-C class to route callbacks from Cocoa code. |
+ scoped_nsobject<MediaGalleriesCocoaBridge> cocoa_bridge_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(MediaGalleriesDialogCocoa); |
+}; |
+ |
+} // namespace chrome |
+ |
+#endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_MEDIA_GALLERIES_DIALOG_COCOA_H_ |