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

Side by Side Diff: ash/system/user/button_from_view.h

Issue 210903003: Implemented system tray UI for new account management. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge conflicts resolved. Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « ash/system/user/accounts_detailed_view.cc ('k') | ash/system/user/button_from_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
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef ASH_SYSTEM_USER_BUTTON_FROM_VIEW_H_
6 #define ASH_SYSTEM_USER_BUTTON_FROM_VIEW_H_
7
8 #include "base/macros.h"
9
10 #include "ui/views/controls/button/custom_button.h"
11
12 namespace ash {
13 namespace tray {
14
15 // This view is used to wrap it's content and transform it into button.
16 class ButtonFromView : public views::CustomButton {
17 public:
18 ButtonFromView(views::View* content,
19 views::ButtonListener* listener,
20 bool highlight_on_hover);
21 virtual ~ButtonFromView();
22
23 // Called when the border should remain even in the non highlighted state.
24 void ForceBorderVisible(bool show);
25
26 // Overridden from views::View
27 virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE;
28 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
29
30 // Check if the item is hovered.
31 bool is_hovered_for_test() { return button_hovered_; }
32
33 private:
34 // Change the hover/active state of the "button" when the status changes.
35 void ShowActive();
36
37 // Content of button.
38 views::View* content_;
39
40 // Whether button should be highligthed on hover.
41 bool highlight_on_hover_;
42
43 // True if button is hovered.
44 bool button_hovered_;
45
46 // True if the border should be always visible.
47 bool show_border_;
48
49 DISALLOW_COPY_AND_ASSIGN(ButtonFromView);
50 };
51
52 } // namespace tray
53 } // namespace ash
54
55 #endif // ASH_SYSTEM_USER_BUTTON_FROM_VIEW_H_
OLDNEW
« no previous file with comments | « ash/system/user/accounts_detailed_view.cc ('k') | ash/system/user/button_from_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698