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 #ifndef CHROME_BROWSER_UI_COCOA_EXTENSIONS_MEDIA_GALLERIES_DIALOG_COCOA_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_EXTENSIONS_MEDIA_GALLERIES_DIALOG_COCOA_H_ |
6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_MEDIA_GALLERIES_DIALOG_COCOA_H_ | 6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_MEDIA_GALLERIES_DIALOG_COCOA_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 virtual void OnFolderViewerClicked(MediaGalleryPrefId prefId) OVERRIDE; | 54 virtual void OnFolderViewerClicked(MediaGalleryPrefId prefId) OVERRIDE; |
55 virtual ui::MenuModel* GetContextMenu(MediaGalleryPrefId pref_id) OVERRIDE; | 55 virtual ui::MenuModel* GetContextMenu(MediaGalleryPrefId pref_id) OVERRIDE; |
56 | 56 |
57 private: | 57 private: |
58 FRIEND_TEST_ALL_PREFIXES(MediaGalleriesDialogBrowserTest, Close); | 58 FRIEND_TEST_ALL_PREFIXES(MediaGalleriesDialogBrowserTest, Close); |
59 FRIEND_TEST_ALL_PREFIXES(MediaGalleriesDialogTest, InitializeCheckboxes); | 59 FRIEND_TEST_ALL_PREFIXES(MediaGalleriesDialogTest, InitializeCheckboxes); |
60 FRIEND_TEST_ALL_PREFIXES(MediaGalleriesDialogTest, ToggleCheckboxes); | 60 FRIEND_TEST_ALL_PREFIXES(MediaGalleriesDialogTest, ToggleCheckboxes); |
61 FRIEND_TEST_ALL_PREFIXES(MediaGalleriesDialogTest, UpdateAdds); | 61 FRIEND_TEST_ALL_PREFIXES(MediaGalleriesDialogTest, UpdateAdds); |
62 FRIEND_TEST_ALL_PREFIXES(MediaGalleriesDialogTest, ForgetDeletes); | 62 FRIEND_TEST_ALL_PREFIXES(MediaGalleriesDialogTest, ForgetDeletes); |
63 | 63 |
| 64 // MediaGalleriesDialog implementation: |
| 65 virtual void AcceptDialogForTesting() OVERRIDE; |
| 66 |
64 void InitDialogControls(); | 67 void InitDialogControls(); |
65 CGFloat CreateCheckboxes( | 68 CGFloat CreateCheckboxes( |
66 CGFloat y_pos, | 69 CGFloat y_pos, |
67 const MediaGalleriesDialogController::Entries& entries); | 70 const MediaGalleriesDialogController::Entries& entries); |
68 CGFloat CreateCheckboxSeparator(CGFloat y_pos, NSString* header); | 71 CGFloat CreateCheckboxSeparator(CGFloat y_pos, NSString* header); |
69 | 72 |
70 MediaGalleriesDialogController* controller_; // weak | 73 MediaGalleriesDialogController* controller_; // weak |
71 scoped_ptr<ConstrainedWindowMac> window_; | 74 scoped_ptr<ConstrainedWindowMac> window_; |
72 | 75 |
73 // The alert that the dialog is being displayed as. | 76 // The alert that the dialog is being displayed as. |
74 base::scoped_nsobject<ConstrainedWindowAlert> alert_; | 77 base::scoped_nsobject<ConstrainedWindowAlert> alert_; |
75 | 78 |
76 // True if the user has pressed accept. | 79 // True if the user has pressed accept. |
77 bool accepted_; | 80 bool accepted_; |
78 | 81 |
79 // Container view for checkboxes. | 82 // Container view for checkboxes. |
80 base::scoped_nsobject<NSView> checkbox_container_; | 83 base::scoped_nsobject<NSView> checkbox_container_; |
81 | 84 |
82 // Container view for the main dialog contents. | 85 // Container view for the main dialog contents. |
83 base::scoped_nsobject<NSBox> main_container_; | 86 base::scoped_nsobject<NSBox> main_container_; |
84 | 87 |
85 // An Objective-C class to route callbacks from Cocoa code. | 88 // An Objective-C class to route callbacks from Cocoa code. |
86 base::scoped_nsobject<MediaGalleriesCocoaController> cocoa_controller_; | 89 base::scoped_nsobject<MediaGalleriesCocoaController> cocoa_controller_; |
87 | 90 |
88 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesDialogCocoa); | 91 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesDialogCocoa); |
89 }; | 92 }; |
90 | 93 |
91 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_MEDIA_GALLERIES_DIALOG_COCOA_H_ | 94 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_MEDIA_GALLERIES_DIALOG_COCOA_H_ |
OLD | NEW |