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

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

Issue 10878068: Replace Ash web notification tray view with a button. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
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/launcher/background_animator.h" 9 #include "ash/launcher/background_animator.h"
10 #include "ash/system/tray/tray_views.h" 10 #include "ash/system/tray/tray_views.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 private: 50 private:
51 void UpdateLayout(); 51 void UpdateLayout();
52 52
53 ShelfAlignment alignment_; 53 ShelfAlignment alignment_;
54 gfx::Size size_; 54 gfx::Size size_;
55 55
56 DISALLOW_COPY_AND_ASSIGN(TrayContainer); 56 DISALLOW_COPY_AND_ASSIGN(TrayContainer);
57 }; 57 };
58 58
59 explicit TrayBackgroundView(internal::StatusAreaWidget* status_area_widget); 59 TrayBackgroundView(internal::StatusAreaWidget* status_area_widget,
60 bool set_background);
tfarina 2012/08/26 22:17:59 nit: fix indentation here.
60 virtual ~TrayBackgroundView(); 61 virtual ~TrayBackgroundView();
61 62
62 // Called after the tray has been added to the widget containing it. 63 // Called after the tray has been added to the widget containing it.
63 virtual void Initialize(); 64 virtual void Initialize();
64 65
65 // Overridden from views::View. 66 // Overridden from views::View.
66 virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE; 67 virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE;
67 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; 68 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
68 virtual void ChildPreferredSizeChanged(views::View* child) OVERRIDE; 69 virtual void ChildPreferredSizeChanged(views::View* child) OVERRIDE;
69 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE; 70 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE;
70 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; 71 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
71 virtual void AboutToRequestFocusFromTabTraversal(bool reverse) OVERRIDE; 72 virtual void AboutToRequestFocusFromTabTraversal(bool reverse) OVERRIDE;
72 73
73 // Overridden from internal::ActionableView. 74 // Overridden from internal::ActionableView.
74 virtual bool PerformAction(const ui::Event& event) OVERRIDE; 75 virtual bool PerformAction(const ui::Event& event) OVERRIDE;
75 76
76 // Overridden from internal::BackgroundAnimatorDelegate. 77 // Overridden from internal::BackgroundAnimatorDelegate.
77 virtual void UpdateBackground(int alpha) OVERRIDE; 78 virtual void UpdateBackground(int alpha) OVERRIDE;
78 79
79 // Called whenever the shelf alignment changes. 80 // Called whenever the shelf alignment changes.
80 virtual void SetShelfAlignment(ShelfAlignment alignment); 81 virtual void SetShelfAlignment(ShelfAlignment alignment);
81 82
82 // Called when the anchor (tray or bubble) may have moved or changed. 83 // Called when the anchor (tray or bubble) may have moved or changed.
83 virtual void AnchorUpdated() {} 84 virtual void AnchorUpdated() {}
84 85
85 virtual string16 GetAccessibleName() = 0; 86 virtual string16 GetAccessibleName() = 0;
86 87
87 // Sets |contents| as a child and sets its background to |background_|. 88 // Sets |contents| as a child. If |set_background| is true, also creates and
88 void SetContents(views::View* contents); 89 // sets |background_|.
90 void SetContents(views::View* contents, bool set_background);
89 91
90 // Sets whether the tray paints a background. Default is true, but is set to 92 // Sets whether the tray paints a background. Default is true, but is set to
91 // false if a window overlaps the shelf. 93 // false if a window overlaps the shelf.
92 void SetPaintsBackground( 94 void SetPaintsBackground(
93 bool value, 95 bool value,
94 internal::BackgroundAnimator::ChangeType change_type); 96 internal::BackgroundAnimator::ChangeType change_type);
95 97
96 // Convenience function to call same function in status_area_widget_. 98 // Convenience function to call same function in status_area_widget_.
97 void UpdateShouldShowLauncher(); 99 void UpdateShouldShowLauncher();
98 100
(...skipping 27 matching lines...) Expand all
126 scoped_ptr<internal::TrayLayerAnimationObserver> 128 scoped_ptr<internal::TrayLayerAnimationObserver>
127 layer_animation_observer_; 129 layer_animation_observer_;
128 130
129 DISALLOW_COPY_AND_ASSIGN(TrayBackgroundView); 131 DISALLOW_COPY_AND_ASSIGN(TrayBackgroundView);
130 }; 132 };
131 133
132 } // namespace internal 134 } // namespace internal
133 } // namespace ash 135 } // namespace ash
134 136
135 #endif // ASH_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_ 137 #endif // ASH_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698