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

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

Issue 685483004: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 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 unified diff | Download patch
« no previous file with comments | « ash/system/tray/tray_popup_header_button.h ('k') | ash/system/tray/tray_popup_label_button.h » ('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 (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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_TRAY_POPUP_ITEM_CONTAINER_H_ 5 #ifndef ASH_SYSTEM_TRAY_TRAY_POPUP_ITEM_CONTAINER_H_
6 #define ASH_SYSTEM_TRAY_TRAY_POPUP_ITEM_CONTAINER_H_ 6 #define ASH_SYSTEM_TRAY_TRAY_POPUP_ITEM_CONTAINER_H_
7 7
8 #include "ui/views/view.h" 8 #include "ui/views/view.h"
9 9
10 namespace ash { 10 namespace ash {
11 11
12 // A view which can optionally change the background color when a mouse is 12 // A view which can optionally change the background color when a mouse is
13 // hovering or a user is interacting via touch. 13 // hovering or a user is interacting via touch.
14 class TrayPopupItemContainer : public views::View { 14 class TrayPopupItemContainer : public views::View {
15 public: 15 public:
16 TrayPopupItemContainer(views::View* view, 16 TrayPopupItemContainer(views::View* view,
17 bool change_background, 17 bool change_background,
18 bool draw_border); 18 bool draw_border);
19 19
20 virtual ~TrayPopupItemContainer(); 20 ~TrayPopupItemContainer() override;
21 21
22 bool active() { 22 bool active() {
23 return active_; 23 return active_;
24 } 24 }
25 25
26 private: 26 private:
27 // Sets whether the active background is to be used, and triggers a paint. 27 // Sets whether the active background is to be used, and triggers a paint.
28 void SetActive(bool active); 28 void SetActive(bool active);
29 29
30 // views::View: 30 // views::View:
31 virtual void ChildVisibilityChanged(views::View* child) override; 31 void ChildVisibilityChanged(views::View* child) override;
32 virtual void ChildPreferredSizeChanged(views::View* child) override; 32 void ChildPreferredSizeChanged(views::View* child) override;
33 virtual void OnMouseEntered(const ui::MouseEvent& event) override; 33 void OnMouseEntered(const ui::MouseEvent& event) override;
34 virtual void OnMouseExited(const ui::MouseEvent& event) override; 34 void OnMouseExited(const ui::MouseEvent& event) override;
35 virtual void OnGestureEvent(ui::GestureEvent* event) override; 35 void OnGestureEvent(ui::GestureEvent* event) override;
36 virtual void OnPaintBackground(gfx::Canvas* canvas) override; 36 void OnPaintBackground(gfx::Canvas* canvas) override;
37 37
38 // True if either a mouse is hovering over this view, or if a user has touched 38 // True if either a mouse is hovering over this view, or if a user has touched
39 // down. 39 // down.
40 bool active_; 40 bool active_;
41 41
42 // True if mouse hover and touch feedback can alter the background color of 42 // True if mouse hover and touch feedback can alter the background color of
43 // the container. 43 // the container.
44 bool change_background_; 44 bool change_background_;
45 45
46 DISALLOW_COPY_AND_ASSIGN(TrayPopupItemContainer); 46 DISALLOW_COPY_AND_ASSIGN(TrayPopupItemContainer);
47 }; 47 };
48 48
49 } // namespace ash 49 } // namespace ash
50 50
51 #endif // ASH_SYSTEM_TRAY_TRAY_POPUP_ITEM_CONTAINER_H_ 51 #endif // ASH_SYSTEM_TRAY_TRAY_POPUP_ITEM_CONTAINER_H_
OLDNEW
« no previous file with comments | « ash/system/tray/tray_popup_header_button.h ('k') | ash/system/tray/tray_popup_label_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698