[Metrics] Make MetricsStateManager take a callback param to check if UMA is enabled.
[chromium-blink-merge.git] / chrome / browser / ui / views / extensions / media_gallery_checkbox_view.h
blob76d5a4d373e4a5e2f72791710efed8a22ec28cf9
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_MEDIA_GALLERY_CHECKBOX_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_MEDIA_GALLERY_CHECKBOX_VIEW_H_
8 #include "base/macros.h"
9 #include "base/strings/string16.h"
10 #include "ui/gfx/size.h"
11 #include "ui/views/view.h"
13 namespace views {
14 class ButtonListener;
15 class Checkbox;
16 class ContextMenuController;
17 class ImageButton;
18 class Label;
19 } // namespace views
21 // A view composed of a checkbox, optional folder icon button, and secondary
22 // text that will elide to its parent's width; used by MediaGalleriesDialogViews
23 // and MediaGalleriesScanResultDialogViews.
24 class MediaGalleryCheckboxView : public views::View {
25 public:
26 MediaGalleryCheckboxView(const base::string16& label,
27 const base::string16& tooltip_text,
28 const base::string16& details,
29 bool show_button,
30 int trailing_vertical_space,
31 views::ButtonListener* button_listener,
32 views::ContextMenuController* menu_controller);
33 virtual ~MediaGalleryCheckboxView();
35 // Overrides from views::View.
36 virtual void Layout() OVERRIDE;
38 views::Checkbox* checkbox() { return checkbox_; }
39 views::ImageButton* folder_viewer_button() { return folder_viewer_button_; }
40 views::Label* secondary_text() { return secondary_text_; }
42 private:
43 // Owned by the parent class (views::View).
44 views::Checkbox* checkbox_;
45 views::ImageButton* folder_viewer_button_;
46 views::Label* secondary_text_;
48 DISALLOW_COPY_AND_ASSIGN(MediaGalleryCheckboxView);
51 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_MEDIA_GALLERY_CHECKBOX_VIEW_H_