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

Unified Diff: ash/system/display_scale/scale_view.h

Issue 2855143004: Implements a display scale tray setting behind a chrome switch (Closed)
Patch Set: Sync with ToT Created 3 years, 7 months 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/system/display_scale/scale_detailed_view.cc ('k') | ash/system/display_scale/scale_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/display_scale/scale_view.h
diff --git a/ash/system/display_scale/scale_view.h b/ash/system/display_scale/scale_view.h
new file mode 100644
index 0000000000000000000000000000000000000000..9f77c8a0f4ec294d34696800b68becdba543cc74
--- /dev/null
+++ b/ash/system/display_scale/scale_view.h
@@ -0,0 +1,57 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_SYSTEM_DISPLAY_SCALE_SCALE_VIEW_H_
+#define ASH_SYSTEM_DISPLAY_SCALE_SCALE_VIEW_H_
+
+#include "base/macros.h"
+#include "ui/views/controls/button/button.h"
+#include "ui/views/controls/slider.h"
+#include "ui/views/view.h"
+
+namespace views {
+class CustomButton;
+class Label;
+}
+
+namespace ash {
+class SystemTrayItem;
+class TriView;
+
+namespace tray {
+class ScaleView : public views::View,
+ public views::SliderListener,
+ public views::ButtonListener {
+ public:
+ ScaleView(SystemTrayItem* owner, bool is_default_view);
+
+ ~ScaleView() override;
+
+ private:
+ // SliderListener:
+ void SliderValueChanged(views::Slider* sender,
+ float value,
+ float old_value,
+ views::SliderChangeReason reason) override;
+ void SliderDragEnded(views::Slider* sender) override;
+
+ // views::ButtonListener:
+ void ButtonPressed(views::Button* sender, const ui::Event& event) override;
+
+ SystemTrayItem* owner_;
+ // The only immediate child view of |this|. All other view elements are added
+ // to the |tri_view_| to handle layout.
+ TriView* tri_view_;
+ views::CustomButton* more_button_;
+ views::Label* label_;
+ views::Slider* slider_;
+ bool is_default_view_;
+
+ DISALLOW_COPY_AND_ASSIGN(ScaleView);
+};
+
+} // namespace tray
+} // namespace ash
+
+#endif // ASH_SYSTEM_DISPLAY_SCALE_SCALE_VIEW_H_
« no previous file with comments | « ash/system/display_scale/scale_detailed_view.cc ('k') | ash/system/display_scale/scale_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698