| 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_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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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); | 63 FRIEND_TEST_ALL_PREFIXES(MediaGalleriesDialogTest, InitializeCheckboxes); |
| 64 FRIEND_TEST_ALL_PREFIXES(MediaGalleriesDialogTest, ToggleCheckboxes); | 64 FRIEND_TEST_ALL_PREFIXES(MediaGalleriesDialogTest, ToggleCheckboxes); |
| 65 FRIEND_TEST_ALL_PREFIXES(MediaGalleriesDialogTest, UpdateAdds); | 65 FRIEND_TEST_ALL_PREFIXES(MediaGalleriesDialogTest, UpdateAdds); |
| 66 FRIEND_TEST_ALL_PREFIXES(MediaGalleriesDialogTest, ForgetDeletes); | 66 FRIEND_TEST_ALL_PREFIXES(MediaGalleriesDialogTest, ForgetDeletes); |
| 67 | 67 |
| 68 typedef std::map<MediaGalleryPrefId, MediaGalleryCheckboxView*> CheckboxMap; | 68 typedef std::map<MediaGalleryPrefId, MediaGalleryCheckboxView*> CheckboxMap; |
| 69 | 69 |
| 70 // MediaGalleriesDialog implementation: |
| 71 virtual void AcceptDialogForTesting() OVERRIDE; |
| 72 |
| 70 void InitChildViews(); | 73 void InitChildViews(); |
| 71 | 74 |
| 72 // 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 |
| 73 // was added. | 76 // was added. |
| 74 bool AddOrUpdateGallery( | 77 bool AddOrUpdateGallery( |
| 75 const MediaGalleriesDialogController::Entry& gallery, | 78 const MediaGalleriesDialogController::Entry& gallery, |
| 76 views::View* container, | 79 views::View* container, |
| 77 int trailing_vertical_space); | 80 int trailing_vertical_space); |
| 78 | 81 |
| 79 void ShowContextMenu(const gfx::Point& point, | 82 void ShowContextMenu(const gfx::Point& point, |
| (...skipping 23 matching lines...) Expand all Loading... |
| 103 | 106 |
| 104 // True if the user has pressed accept. | 107 // True if the user has pressed accept. |
| 105 bool accepted_; | 108 bool accepted_; |
| 106 | 109 |
| 107 scoped_ptr<views::MenuRunner> context_menu_runner_; | 110 scoped_ptr<views::MenuRunner> context_menu_runner_; |
| 108 | 111 |
| 109 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesDialogViews); | 112 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesDialogViews); |
| 110 }; | 113 }; |
| 111 | 114 |
| 112 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_MEDIA_GALLERIES_DIALOG_VIEWS_H_ | 115 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_MEDIA_GALLERIES_DIALOG_VIEWS_H_ |
| OLD | NEW |