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

Side by Side Diff: chrome/browser/ui/views/extensions/media_galleries_dialog_views.h

Issue 134163014: Added tests for views flavor of MediaGalleriesDialogTest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added missing unittest file. 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_VIEWS_EXTENSIONS_MEDIA_GALLERIES_DIALOG_VIEWS_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_MEDIA_GALLERIES_DIALOG_VIEWS_H_
6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_MEDIA_GALLERIES_DIALOG_VIEWS_H_ 6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_MEDIA_GALLERIES_DIALOG_VIEWS_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 // views::ButtonListener implementation: 53 // views::ButtonListener implementation:
54 virtual void ButtonPressed(views::Button* sender, 54 virtual void ButtonPressed(views::Button* sender,
55 const ui::Event& event) OVERRIDE; 55 const ui::Event& event) OVERRIDE;
56 56
57 // views::ContextMenuController implementation: 57 // views::ContextMenuController implementation:
58 virtual void ShowContextMenuForView(views::View* source, 58 virtual void ShowContextMenuForView(views::View* source,
59 const gfx::Point& point, 59 const gfx::Point& point,
60 ui::MenuSourceType source_type) OVERRIDE; 60 ui::MenuSourceType source_type) OVERRIDE;
61 61
62 private: 62 private:
63 FRIEND_TEST_ALL_PREFIXES(MediaGalleriesDialogTest, InitializeCheckboxes);
64 FRIEND_TEST_ALL_PREFIXES(MediaGalleriesDialogTest, ToggleCheckboxes);
65 FRIEND_TEST_ALL_PREFIXES(MediaGalleriesDialogTest, UpdateAdds);
66 FRIEND_TEST_ALL_PREFIXES(MediaGalleriesDialogTest, ForgetDeletes);
67
63 typedef std::map<MediaGalleryPrefId, views::Checkbox*> CheckboxMap; 68 typedef std::map<MediaGalleryPrefId, views::Checkbox*> CheckboxMap;
64 typedef std::map<views::Checkbox*, MediaGalleryPrefInfo> NewCheckboxMap; 69 typedef std::map<views::Checkbox*, MediaGalleryPrefInfo> NewCheckboxMap;
65 70
71 void ButtonPressedAction(views::Button* sender);
72
66 void InitChildViews(); 73 void InitChildViews();
67 74
68 // Adds a checkbox or updates an existing checkbox. Returns true if a new one 75 // Adds a checkbox or updates an existing checkbox. Returns true if a new one
69 // was added. 76 // was added.
70 bool AddOrUpdateGallery(const MediaGalleryPrefInfo& gallery, 77 bool AddOrUpdateGallery(const MediaGalleryPrefInfo& gallery,
71 bool permitted, 78 bool permitted,
72 views::View* container, 79 views::View* container,
73 int trailing_vertical_space); 80 int trailing_vertical_space);
74 81
75 void ShowContextMenu(const gfx::Point& point, 82 void ShowContextMenu(const gfx::Point& point,
(...skipping 24 matching lines...) Expand all
100 107
101 // True if the user has pressed accept. 108 // True if the user has pressed accept.
102 bool accepted_; 109 bool accepted_;
103 110
104 scoped_ptr<views::MenuRunner> context_menu_runner_; 111 scoped_ptr<views::MenuRunner> context_menu_runner_;
105 112
106 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesDialogViews); 113 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesDialogViews);
107 }; 114 };
108 115
109 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_MEDIA_GALLERIES_DIALOG_VIEWS_H_ 116 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_MEDIA_GALLERIES_DIALOG_VIEWS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698