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

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

Issue 148093011: Abstract media galleries context menu code and use it in scan result dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits & rebase Created 6 years, 10 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 #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 29 matching lines...) Expand all
40 // Called when the user toggles a gallery checkbox. 40 // Called when the user toggles a gallery checkbox.
41 void OnCheckboxToggled(NSButton* checkbox); 41 void OnCheckboxToggled(NSButton* checkbox);
42 42
43 // MediaGalleriesDialog implementation: 43 // MediaGalleriesDialog implementation:
44 virtual void UpdateGalleries() OVERRIDE; 44 virtual void UpdateGalleries() OVERRIDE;
45 45
46 // ConstrainedWindowMacDelegate implementation. 46 // ConstrainedWindowMacDelegate implementation.
47 virtual void OnConstrainedWindowClosed( 47 virtual void OnConstrainedWindowClosed(
48 ConstrainedWindowMac* window) OVERRIDE; 48 ConstrainedWindowMac* window) OVERRIDE;
49 49
50 ui::MenuModel* GetContextMenuModel(MediaGalleryPrefId prefid); 50 ui::MenuModel* GetContextMenu(MediaGalleryPrefId prefid);
51 51
52 private: 52 private:
53 FRIEND_TEST_ALL_PREFIXES(MediaGalleriesDialogBrowserTest, Close); 53 FRIEND_TEST_ALL_PREFIXES(MediaGalleriesDialogBrowserTest, Close);
54 FRIEND_TEST_ALL_PREFIXES(MediaGalleriesDialogTest, InitializeCheckboxes); 54 FRIEND_TEST_ALL_PREFIXES(MediaGalleriesDialogTest, InitializeCheckboxes);
55 FRIEND_TEST_ALL_PREFIXES(MediaGalleriesDialogTest, ToggleCheckboxes); 55 FRIEND_TEST_ALL_PREFIXES(MediaGalleriesDialogTest, ToggleCheckboxes);
56 FRIEND_TEST_ALL_PREFIXES(MediaGalleriesDialogTest, UpdateAdds); 56 FRIEND_TEST_ALL_PREFIXES(MediaGalleriesDialogTest, UpdateAdds);
57 FRIEND_TEST_ALL_PREFIXES(MediaGalleriesDialogTest, ForgetDeletes); 57 FRIEND_TEST_ALL_PREFIXES(MediaGalleriesDialogTest, ForgetDeletes);
58 58
59 void UpdateGalleryCheckbox(const MediaGalleryPrefInfo& gallery, 59 void UpdateGalleryCheckbox(const MediaGalleryPrefInfo& gallery,
60 bool permitted, 60 bool permitted,
(...skipping 29 matching lines...) Expand all
90 // Container view for the main dialog contents. 90 // Container view for the main dialog contents.
91 base::scoped_nsobject<NSBox> accessory_; 91 base::scoped_nsobject<NSBox> accessory_;
92 92
93 // An Objective-C class to route callbacks from Cocoa code. 93 // An Objective-C class to route callbacks from Cocoa code.
94 base::scoped_nsobject<MediaGalleriesCocoaController> cocoa_controller_; 94 base::scoped_nsobject<MediaGalleriesCocoaController> cocoa_controller_;
95 95
96 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesDialogCocoa); 96 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesDialogCocoa);
97 }; 97 };
98 98
99 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_MEDIA_GALLERIES_DIALOG_COCOA_H_ 99 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_MEDIA_GALLERIES_DIALOG_COCOA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698