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

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

Issue 980943005: Add ash UI for third-party VPNs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@f_2_407541_434711_remove_combined_name
Patch Set: Updated after latest round of UI reviews. Created 5 years, 9 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
« no previous file with comments | « ash/system/chromeos/network/vpn_list_view.cc ('k') | ash/system/tray/hover_highlight_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 void set_text_default_color(SkColor color) { text_default_color_ = color; } 56 void set_text_default_color(SkColor color) { text_default_color_ = color; }
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 void GetAccessibleState(ui::AXViewState* state) override; 64 void GetAccessibleState(ui::AXViewState* state) override;
65 65
66 private:
67 // Sets the highlighted color on a text label if |hover| is set. 66 // Sets the highlighted color on a text label if |hover| is set.
68 void SetHoverHighlight(bool hover); 67 void SetHoverHighlight(bool hover);
69 68
69 private:
70 // Overridden from ActionableView: 70 // Overridden from ActionableView:
71 bool PerformAction(const ui::Event& event) override; 71 bool PerformAction(const ui::Event& event) override;
72 72
73 // Overridden from views::View. 73 // Overridden from views::View.
74 gfx::Size GetPreferredSize() const override; 74 gfx::Size GetPreferredSize() const override;
75 int GetHeightForWidth(int width) const override; 75 int GetHeightForWidth(int width) const override;
76 void OnMouseEntered(const ui::MouseEvent& event) override; 76 void OnMouseEntered(const ui::MouseEvent& event) override;
77 void OnMouseExited(const ui::MouseEvent& event) override; 77 void OnMouseExited(const ui::MouseEvent& event) override;
78 void OnGestureEvent(ui::GestureEvent* event) override; 78 void OnGestureEvent(ui::GestureEvent* event) override;
79 void OnBoundsChanged(const gfx::Rect& previous_bounds) override;
79 void OnEnabledChanged() override; 80 void OnEnabledChanged() override;
80 void OnPaintBackground(gfx::Canvas* canvas) override; 81 void OnPaintBackground(gfx::Canvas* canvas) override;
81 void OnFocus() override; 82 void OnFocus() override;
82 83
83 ViewClickListener* listener_; 84 ViewClickListener* listener_;
84 views::Label* text_label_; 85 views::Label* text_label_;
85 SkColor highlight_color_; 86 SkColor highlight_color_;
86 SkColor default_color_; 87 SkColor default_color_;
87 SkColor text_highlight_color_; 88 SkColor text_highlight_color_;
88 SkColor text_default_color_; 89 SkColor text_default_color_;
89 bool hover_; 90 bool hover_;
90 bool expandable_; 91 bool expandable_;
91 bool checkable_; 92 bool checkable_;
92 bool checked_; 93 bool checked_;
93 94
94 DISALLOW_COPY_AND_ASSIGN(HoverHighlightView); 95 DISALLOW_COPY_AND_ASSIGN(HoverHighlightView);
95 }; 96 };
96 97
97 } // namespace ash 98 } // namespace ash
98 99
99 #endif // ASH_SYSTEM_TRAY_HOVER_HIGHLIGHT_VIEW_H_ 100 #endif // ASH_SYSTEM_TRAY_HOVER_HIGHLIGHT_VIEW_H_
OLDNEW
« no previous file with comments | « ash/system/chromeos/network/vpn_list_view.cc ('k') | ash/system/tray/hover_highlight_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698