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

Side by Side Diff: ash/system/tray/hover_highlight_view.h

Issue 556383002: Status Panel Touch Feedback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 ASH_SYSTEM_TRAY_HOVER_HIGHLIGHT_VIEW_H_ 5 #ifndef ASH_SYSTEM_TRAY_HOVER_HIGHLIGHT_VIEW_H_
6 #define ASH_SYSTEM_TRAY_HOVER_HIGHLIGHT_VIEW_H_ 6 #define ASH_SYSTEM_TRAY_HOVER_HIGHLIGHT_VIEW_H_
7 7
8 #include "ash/system/tray/actionable_view.h" 8 #include "ash/system/tray/actionable_view.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 views::Label* text_label() { return text_label_; } 58 views::Label* text_label() { return text_label_; }
59 59
60 bool hover() const { return hover_; } 60 bool hover() const { return hover_; }
61 61
62 protected: 62 protected:
63 // Overridden from views::View. 63 // Overridden from views::View.
64 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; 64 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
65 65
66 private: 66 private:
67 // Sets the value for |hover_| and updates the color of |text_label_|
flackr 2014/09/11 20:49:37 nit: Don't describe the implementation of the func
jonross 2014/09/12 18:57:48 Done.
68 void SetHoverHighlight(bool hover);
69
67 // Overridden from ActionableView: 70 // Overridden from ActionableView:
68 virtual bool PerformAction(const ui::Event& event) OVERRIDE; 71 virtual bool PerformAction(const ui::Event& event) OVERRIDE;
69 72
70 // Overridden from views::View. 73 // Overridden from views::View.
71 virtual gfx::Size GetPreferredSize() const OVERRIDE; 74 virtual gfx::Size GetPreferredSize() const OVERRIDE;
72 virtual int GetHeightForWidth(int width) const OVERRIDE; 75 virtual int GetHeightForWidth(int width) const OVERRIDE;
73 virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE; 76 virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE;
74 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; 77 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
78 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
75 virtual void OnEnabledChanged() OVERRIDE; 79 virtual void OnEnabledChanged() OVERRIDE;
76 virtual void OnPaintBackground(gfx::Canvas* canvas) OVERRIDE; 80 virtual void OnPaintBackground(gfx::Canvas* canvas) OVERRIDE;
77 virtual void OnFocus() OVERRIDE; 81 virtual void OnFocus() OVERRIDE;
78 82
79 ViewClickListener* listener_; 83 ViewClickListener* listener_;
80 views::Label* text_label_; 84 views::Label* text_label_;
81 SkColor highlight_color_; 85 SkColor highlight_color_;
82 SkColor default_color_; 86 SkColor default_color_;
83 SkColor text_highlight_color_; 87 SkColor text_highlight_color_;
84 SkColor text_default_color_; 88 SkColor text_default_color_;
85 bool hover_; 89 bool hover_;
86 bool expandable_; 90 bool expandable_;
87 bool checkable_; 91 bool checkable_;
88 bool checked_; 92 bool checked_;
89 93
94 // True if touch view feedback command line flag has been enabled. When
95 // enabled touch gestures will toggle rendering the background as active.
96 bool touch_feedback_enabled_;
97
90 DISALLOW_COPY_AND_ASSIGN(HoverHighlightView); 98 DISALLOW_COPY_AND_ASSIGN(HoverHighlightView);
91 }; 99 };
92 100
93 } // namespace ash 101 } // namespace ash
94 102
95 #endif // ASH_SYSTEM_TRAY_HOVER_HIGHLIGHT_VIEW_H_ 103 #endif // ASH_SYSTEM_TRAY_HOVER_HIGHLIGHT_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698