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

Side by Side Diff: ash/system/tray/tray_background_view.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/throbber_view.h ('k') | ash/system/tray/tray_background_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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_BACKGROUND_VIEW_H_ 5 #ifndef ASH_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_
6 #define ASH_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_ 6 #define ASH_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/shelf/background_animator.h" 9 #include "ash/shelf/background_animator.h"
10 #include "ash/shelf/shelf_types.h" 10 #include "ash/shelf/shelf_types.h"
(...skipping 16 matching lines...) Expand all
27 public BackgroundAnimatorDelegate, 27 public BackgroundAnimatorDelegate,
28 public ui::ImplicitAnimationObserver { 28 public ui::ImplicitAnimationObserver {
29 public: 29 public:
30 static const char kViewClassName[]; 30 static const char kViewClassName[];
31 31
32 // Base class for tray containers. Sets the border and layout. The container 32 // Base class for tray containers. Sets the border and layout. The container
33 // auto-resizes the widget when necessary. 33 // auto-resizes the widget when necessary.
34 class TrayContainer : public views::View { 34 class TrayContainer : public views::View {
35 public: 35 public:
36 explicit TrayContainer(ShelfAlignment alignment); 36 explicit TrayContainer(ShelfAlignment alignment);
37 virtual ~TrayContainer() {} 37 ~TrayContainer() override {}
38 38
39 void SetAlignment(ShelfAlignment alignment); 39 void SetAlignment(ShelfAlignment alignment);
40 40
41 void set_size(const gfx::Size& size) { size_ = size; } 41 void set_size(const gfx::Size& size) { size_ = size; }
42 42
43 // views::View: 43 // views::View:
44 virtual gfx::Size GetPreferredSize() const override; 44 gfx::Size GetPreferredSize() const override;
45 45
46 protected: 46 protected:
47 // views::View: 47 // views::View:
48 virtual void ChildPreferredSizeChanged(views::View* child) override; 48 void ChildPreferredSizeChanged(views::View* child) override;
49 virtual void ChildVisibilityChanged(View* child) override; 49 void ChildVisibilityChanged(View* child) override;
50 virtual void ViewHierarchyChanged( 50 void ViewHierarchyChanged(
51 const ViewHierarchyChangedDetails& details) override; 51 const ViewHierarchyChangedDetails& details) override;
52 52
53 private: 53 private:
54 void UpdateLayout(); 54 void UpdateLayout();
55 55
56 ShelfAlignment alignment_; 56 ShelfAlignment alignment_;
57 gfx::Size size_; 57 gfx::Size size_;
58 58
59 DISALLOW_COPY_AND_ASSIGN(TrayContainer); 59 DISALLOW_COPY_AND_ASSIGN(TrayContainer);
60 }; 60 };
61 61
62 explicit TrayBackgroundView(StatusAreaWidget* status_area_widget); 62 explicit TrayBackgroundView(StatusAreaWidget* status_area_widget);
63 virtual ~TrayBackgroundView(); 63 ~TrayBackgroundView() override;
64 64
65 // Called after the tray has been added to the widget containing it. 65 // Called after the tray has been added to the widget containing it.
66 virtual void Initialize(); 66 virtual void Initialize();
67 67
68 // views::View: 68 // views::View:
69 virtual void SetVisible(bool visible) override; 69 void SetVisible(bool visible) override;
70 virtual const char* GetClassName() const override; 70 const char* GetClassName() const override;
71 virtual void OnMouseEntered(const ui::MouseEvent& event) override; 71 void OnMouseEntered(const ui::MouseEvent& event) override;
72 virtual void OnMouseExited(const ui::MouseEvent& event) override; 72 void OnMouseExited(const ui::MouseEvent& event) override;
73 virtual void ChildPreferredSizeChanged(views::View* child) override; 73 void ChildPreferredSizeChanged(views::View* child) override;
74 virtual void GetAccessibleState(ui::AXViewState* state) override; 74 void GetAccessibleState(ui::AXViewState* state) override;
75 virtual void AboutToRequestFocusFromTabTraversal(bool reverse) override; 75 void AboutToRequestFocusFromTabTraversal(bool reverse) override;
76 76
77 // ActionableView: 77 // ActionableView:
78 virtual bool PerformAction(const ui::Event& event) override; 78 bool PerformAction(const ui::Event& event) override;
79 virtual gfx::Rect GetFocusBounds() override; 79 gfx::Rect GetFocusBounds() override;
80 virtual void OnGestureEvent(ui::GestureEvent* event) override; 80 void OnGestureEvent(ui::GestureEvent* event) override;
81 81
82 // BackgroundAnimatorDelegate: 82 // BackgroundAnimatorDelegate:
83 virtual void UpdateBackground(int alpha) override; 83 void UpdateBackground(int alpha) override;
84 84
85 // Called whenever the shelf alignment changes. 85 // Called whenever the shelf alignment changes.
86 virtual void SetShelfAlignment(ShelfAlignment alignment); 86 virtual void SetShelfAlignment(ShelfAlignment alignment);
87 87
88 // Called when the anchor (tray or bubble) may have moved or changed. 88 // Called when the anchor (tray or bubble) may have moved or changed.
89 virtual void AnchorUpdated() {} 89 virtual void AnchorUpdated() {}
90 90
91 // Called from GetAccessibleState, must return a valid accessible name. 91 // Called from GetAccessibleState, must return a valid accessible name.
92 virtual base::string16 GetAccessibleNameForTray() = 0; 92 virtual base::string16 GetAccessibleNameForTray() = 0;
93 93
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 void UpdateBubbleViewArrow(views::TrayBubbleView* bubble_view); 150 void UpdateBubbleViewArrow(views::TrayBubbleView* bubble_view);
151 151
152 private: 152 private:
153 class TrayWidgetObserver; 153 class TrayWidgetObserver;
154 154
155 // Called from Initialize after all status area trays have been created. 155 // Called from Initialize after all status area trays have been created.
156 // Sets the border based on the position of the view. 156 // Sets the border based on the position of the view.
157 void SetTrayBorder(); 157 void SetTrayBorder();
158 158
159 // ui::ImplicitAnimationObserver: 159 // ui::ImplicitAnimationObserver:
160 virtual void OnImplicitAnimationsCompleted() override; 160 void OnImplicitAnimationsCompleted() override;
161 161
162 // Applies transformations to the |layer()| to animate the view when 162 // Applies transformations to the |layer()| to animate the view when
163 // SetVisible(false) is called. 163 // SetVisible(false) is called.
164 void HideTransformation(); 164 void HideTransformation();
165 165
166 // Unowned pointer to parent widget. 166 // Unowned pointer to parent widget.
167 StatusAreaWidget* status_area_widget_; 167 StatusAreaWidget* status_area_widget_;
168 168
169 // Convenience pointer to the contents view. 169 // Convenience pointer to the contents view.
170 TrayContainer* tray_container_; 170 TrayContainer* tray_container_;
(...skipping 17 matching lines...) Expand all
188 188
189 scoped_ptr<TrayWidgetObserver> widget_observer_; 189 scoped_ptr<TrayWidgetObserver> widget_observer_;
190 scoped_ptr<TrayEventFilter> tray_event_filter_; 190 scoped_ptr<TrayEventFilter> tray_event_filter_;
191 191
192 DISALLOW_COPY_AND_ASSIGN(TrayBackgroundView); 192 DISALLOW_COPY_AND_ASSIGN(TrayBackgroundView);
193 }; 193 };
194 194
195 } // namespace ash 195 } // namespace ash
196 196
197 #endif // ASH_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_ 197 #endif // ASH_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_
OLDNEW
« no previous file with comments | « ash/system/tray/throbber_view.h ('k') | ash/system/tray/tray_background_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698