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

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

Issue 10834242: Cocoa: Implement media gallery dialog (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build Created 8 years, 4 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_COCOA_EXTENSIONS_MEDIA_GALLERIES_DIALOG_COCOA_H_
6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_MEDIA_GALLERIES_DIALOG_COCOA_H_
7
8 #include "chrome/browser/media_gallery/media_galleries_dialog_controller.h"
9 #import "chrome/browser/ui/cocoa/constrained_window_mac.h"
10
11 @class MediaGalleriesCocoaBridge;
12
13 namespace chrome {
14
15 class MediaGalleriesDialogCocoa :
Robert Sesek 2012/08/14 21:07:45 Class-level comment.
sail 2012/08/14 21:38:47 Done.
16 public ConstrainedWindowMacDelegateSystemSheet,
17 public MediaGalleriesDialog {
18 public:
19 MediaGalleriesDialogCocoa(
20 MediaGalleriesDialogController* controller,
21 MediaGalleriesCocoaBridge* delegate);
22 virtual ~MediaGalleriesDialogCocoa();
23
24 void OnAddFolderClicked();
Robert Sesek 2012/08/14 21:07:45 Document these methods, too.
25 void OnCheckboxToggled(NSButton* checkbox);
26 void SheetDidEnd(NSInteger result);
27
28 // MediaGalleriesDialog implementation:
29 virtual void UpdateGallery(const MediaGalleryPrefInfo* gallery,
30 bool permitted) OVERRIDE;
31
32 // ConstrainedWindowMacDelegateSystemSheet implementation.
33 virtual void DeleteDelegate() OVERRIDE;
34
35 private:
36 void UpdateGalleryCheckbox(NSButton* checkbox,
37 const MediaGalleryPrefInfo* gallery,
38 bool permitted);
39 void UpdateCheckboxContainerFrame();
40
41 // 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.
42 MediaGalleriesDialogController* controller_;
43
44 // Weak pointer to the window.
45 ConstrainedWindow* window_;
46
47 // True if the user has pressed accept.
48 bool accepted_;
49
50 // List of checkboxes ordered from bottom to top.
51 scoped_nsobject<NSMutableArray> checkboxes_;
52
53 // Container view for checkboxes.
54 scoped_nsobject<NSView> checkbox_container_;
55
56 // The alert that the dialog is being displayed as.
57 scoped_nsobject<NSAlert> alert_;
58
59 // An Objective-C class to route callbacks from Cocoa code.
60 scoped_nsobject<MediaGalleriesCocoaBridge> cocoa_bridge_;
61
62 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesDialogCocoa);
63 };
64
65 } // namespace chrome
66
67 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_MEDIA_GALLERIES_DIALOG_COCOA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698