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

Unified Diff: ash/common/system/tray/tray_details_view.h

Issue 2497813002: Modify Ash MD system menu layout for title rows (Closed)
Patch Set: self review Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: ash/common/system/tray/tray_details_view.h
diff --git a/ash/common/system/tray/tray_details_view.h b/ash/common/system/tray/tray_details_view.h
index b1560053dbb2d37b6a9af2841395246bb8c3bb89..d28e06bdd5d2d7f59428866b83de8f5ac6d26a7e 100644
--- a/ash/common/system/tray/tray_details_view.h
+++ b/ash/common/system/tray/tray_details_view.h
@@ -7,6 +7,8 @@
#include "ash/ash_export.h"
#include "ash/common/system/tray/special_popup_row.h"
+#include "ash/common/system/tray/system_menu_button.h"
bruthig 2016/11/14 04:39:11 nit: Is this needed?
tdanderson 2016/11/14 19:24:59 Done.
+#include "ash/common/system/tray/tri_view.h"
bruthig 2016/11/14 04:39:11 nit: This could be a forward declaration.
tdanderson 2016/11/14 19:24:59 Done.
#include "ash/common/system/tray/view_click_listener.h"
#include "base/macros.h"
#include "ui/views/controls/button/button.h"
@@ -14,8 +16,9 @@
namespace views {
class BoxLayout;
-class ScrollView;
+class Label;
class ProgressBar;
+class ScrollView;
} // namespace views
namespace ash {
@@ -73,6 +76,11 @@ class ASH_EXPORT TrayDetailsView : public views::View,
// |progress_bar_| doesn't already exist it will be created.
void ShowProgress(double value, bool visible);
+ views::CustomButton* CreateSettingsButton(LoginStatus status);
bruthig 2016/11/14 04:39:11 Can you mention that the caller assumes ownership?
tdanderson 2016/11/14 19:24:59 Done.
+ views::CustomButton* CreateHelpButton(LoginStatus status);
+
+ TriView* tri_view() { return tri_view_; }
+
private:
friend class test::TrayDetailsViewTest;
@@ -91,15 +99,25 @@ class ASH_EXPORT TrayDetailsView : public views::View,
// details view.
void TransitionToDefaultView();
+ // Helper function which creates and returns the back button used in the
+ // material design top-most header row.
+ views::Button* CreateBackButton();
+
SystemTrayItem* owner_;
views::BoxLayout* box_layout_;
- SpecialPopupRow* title_row_;
+ SpecialPopupRow* title_row_; // Not used in material design.
FixedSizedScrollView* scroller_;
views::View* scroll_content_;
views::ProgressBar* progress_bar_;
ScrollBorder* scroll_border_; // Weak reference
+ // The container view for the top-most title row in material design.
+ TriView* tri_view_;
+
+ // The label used in the top-most title row for material design.
+ views::Label* label_;
+
// The back button that appears in the material design title row. Not owned.
views::Button* back_button_;

Powered by Google App Engine
This is Rietveld 408576698