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

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

Issue 2497813002: Modify Ash MD system menu layout for title rows (Closed)
Patch Set: trybots 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
« no previous file with comments | « ash/common/system/ime/tray_ime_chromeos.cc ('k') | ash/common/system/tray/special_popup_row.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/special_popup_row.h
diff --git a/ash/common/system/tray/special_popup_row.h b/ash/common/system/tray/special_popup_row.h
index acbfda903451b5ef6f6e997370f258a79b6dab58..887021c72307280fc69a76dbfd0a7359ce39b6e9 100644
--- a/ash/common/system/tray/special_popup_row.h
+++ b/ash/common/system/tray/special_popup_row.h
@@ -12,26 +12,17 @@
#include "ui/gfx/geometry/size.h"
#include "ui/views/view.h"
-namespace views {
-class Button;
-class ButtonListener;
-class CustomButton;
-class Label;
-class ToggleButton;
-}
-
namespace ash {
-class SystemMenuButton;
class ThrobberView;
class TrayItemView;
class TrayPopupHeaderButton;
class ViewClickListener;
-// For material design, this class represents the top title row for detailed
-// views and handles the creation and layout of its elements (back button,
-// title, settings button, and possibly other buttons). For non-MD, this class
-// represents the bottom row of detailed views and the bottom row of the
-// system menu (date, help, power, and lock). This row has a fixed height.
+// Not used in material design. This class represents the bottom row of
+// detailed views and the bottom row of the system menu (date, help, power,
+// and lock). This row has a fixed height.
+// TODO(tdanderson): Remove this class when material design is enabled by
+// default. See crbug.com/614453.
class ASH_EXPORT SpecialPopupRow : public views::View {
public:
SpecialPopupRow();
@@ -43,31 +34,15 @@ class ASH_EXPORT SpecialPopupRow : public views::View {
// Sets |content_| to be |view| and adds |content_| as a child view of this
// row. This should only be called once, upon initialization of the row.
- // TODO(tdanderson): Make this private when material design is enabled by
- // default. See crbug.com/614453.
void SetContent(views::View* view);
- // Creates UI elements for the material design title row and adds them to
- // the view hierarchy rooted at |this|. Returns a pointer to the created
- // view.
- views::Button* AddBackButton(views::ButtonListener* listener);
- views::CustomButton* AddSettingsButton(views::ButtonListener* listener,
- LoginStatus status);
- views::CustomButton* AddHelpButton(views::ButtonListener* listener,
- LoginStatus status);
- views::ToggleButton* AddToggleButton(views::ButtonListener* listener);
-
// Adds |view| after this row's content.
void AddViewToTitleRow(views::View* view);
// Adds |view| after this row's content, optionally with a separator. Only
// used for non-MD.
- // TODO(tdanderson): Remove this when material design is enabled by default.
- // See crbug.com/614453.
void AddViewToRowNonMd(views::View* view, bool add_separator);
- // TODO(tdanderson): Remove this accessor when material design is enabled by
- // default. See crbug.com/614453.
views::View* content() const { return content_; }
private:
@@ -75,34 +50,18 @@ class ASH_EXPORT SpecialPopupRow : public views::View {
gfx::Size GetPreferredSize() const override;
int GetHeightForWidth(int width) const override;
void Layout() override;
- void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
-
- // Updates the style of |label_|, if it exists. Only used in material design.
- void UpdateStyle();
- // Used to add views to |views_before_content_container_| and
- // |views_after_content_container_|, respectively. Views are added to both
- // containers in a left-to-right order.
- void AddViewBeforeContent(views::View* view);
+ // Used to add views to |views_after_content_container_|, respectively. Views
+ // are added in a left-to-right order.
void AddViewAfterContent(views::View* view);
void AddViewAfterContent(views::View* view, bool add_separator);
- void SetTextLabelMd(int string_id, ViewClickListener* listener);
- void SetTextLabelNonMd(int string_id, ViewClickListener* listener);
-
- // The container for the views positioned before |content_|.
- views::View* views_before_content_container_;
-
// The main content of this row, typically a label.
views::View* content_;
// The container for the views positioned after |content_|.
views::View* views_after_content_container_;
- // A pointer to the label which is parented to |content_|; this is non-null
- // only if this row's content is a single label. Not owned.
- views::Label* label_;
-
DISALLOW_COPY_AND_ASSIGN(SpecialPopupRow);
};
« no previous file with comments | « ash/common/system/ime/tray_ime_chromeos.cc ('k') | ash/common/system/tray/special_popup_row.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698