OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_GALLERY_CHECKBOX_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_MEDIA_GALLERY_CHECKBOX_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_MEDIA_GALLERY_CHECKBOX_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_MEDIA_GALLERY_CHECKBOX_VIEW_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "ui/gfx/geometry/size.h" | 10 #include "ui/gfx/geometry/size.h" |
11 #include "ui/views/view.h" | 11 #include "ui/views/view.h" |
12 | 12 |
13 struct MediaGalleryPrefInfo; | 13 struct MediaGalleryPrefInfo; |
14 | 14 |
15 namespace views { | 15 namespace views { |
16 class ButtonListener; | 16 class ButtonListener; |
17 class Checkbox; | 17 class Checkbox; |
18 class ContextMenuController; | 18 class ContextMenuController; |
19 class ImageButton; | |
20 class Label; | 19 class Label; |
21 } // namespace views | 20 } // namespace views |
22 | 21 |
23 // A view composed of a checkbox, optional folder icon button, and secondary | 22 // A view composed of a checkbox, optional folder icon button, and secondary |
24 // text that will elide to its parent's width; used by MediaGalleriesDialogViews | 23 // text that will elide to its parent's width. Used by |
25 // and MediaGalleriesScanResultDialogViews. | 24 // MediaGalleriesDialogViews. |
26 class MediaGalleryCheckboxView : public views::View { | 25 class MediaGalleryCheckboxView : public views::View { |
27 public: | 26 public: |
28 MediaGalleryCheckboxView(const MediaGalleryPrefInfo& pref_info, | 27 MediaGalleryCheckboxView(const MediaGalleryPrefInfo& pref_info, |
29 bool show_button, | |
30 int trailing_vertical_space, | 28 int trailing_vertical_space, |
31 views::ButtonListener* button_listener, | 29 views::ButtonListener* button_listener, |
32 views::ContextMenuController* menu_controller); | 30 views::ContextMenuController* menu_controller); |
33 ~MediaGalleryCheckboxView() override; | 31 ~MediaGalleryCheckboxView() override; |
34 | 32 |
35 // Overrides from views::View. | 33 // Overrides from views::View. |
36 void Layout() override; | 34 void Layout() override; |
37 | 35 |
38 views::Checkbox* checkbox() { return checkbox_; } | 36 views::Checkbox* checkbox() { return checkbox_; } |
39 views::ImageButton* folder_viewer_button() { return folder_viewer_button_; } | |
40 views::Label* secondary_text() { return secondary_text_; } | 37 views::Label* secondary_text() { return secondary_text_; } |
41 | 38 |
42 private: | 39 private: |
43 // Owned by the parent class (views::View). | 40 // Owned by the parent class (views::View). |
44 views::Checkbox* checkbox_; | 41 views::Checkbox* checkbox_; |
45 views::ImageButton* folder_viewer_button_; | |
46 views::Label* secondary_text_; | 42 views::Label* secondary_text_; |
47 | 43 |
48 DISALLOW_COPY_AND_ASSIGN(MediaGalleryCheckboxView); | 44 DISALLOW_COPY_AND_ASSIGN(MediaGalleryCheckboxView); |
49 }; | 45 }; |
50 | 46 |
51 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_MEDIA_GALLERY_CHECKBOX_VIEW_H_ | 47 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_MEDIA_GALLERY_CHECKBOX_VIEW_H_ |
OLD | NEW |