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

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

Issue 12313118: Refactor: Shelf Widget (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: formatting and moved a couple unit tests Created 7 years, 10 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
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/shelf/background_animator.h"
10 #include "ash/shelf_types.h" 10 #include "ash/shelf/shelf_types.h"
11 #include "ash/system/tray/actionable_view.h" 11 #include "ash/system/tray/actionable_view.h"
12 #include "ash/system/tray/tray_views.h"
12 #include "ui/views/bubble/tray_bubble_view.h" 13 #include "ui/views/bubble/tray_bubble_view.h"
13 14
14 namespace ash { 15 namespace ash {
15 namespace internal { 16 namespace internal {
16 17
17 class ShelfLayoutManager; 18 class ShelfLayoutManager;
18 class StatusAreaWidget; 19 class StatusAreaWidget;
19 class TrayEventFilter; 20 class TrayEventFilter;
20 class TrayBackground; 21 class TrayBackground;
21 22
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // Called by the bubble wrapper when a click event occurs outside the bubble. 94 // Called by the bubble wrapper when a click event occurs outside the bubble.
94 // May close the bubble. Returns true if the event is handled. 95 // May close the bubble. Returns true if the event is handled.
95 virtual bool ClickedOutsideBubble() = 0; 96 virtual bool ClickedOutsideBubble() = 0;
96 97
97 // Sets |contents| as a child. 98 // Sets |contents| as a child.
98 void SetContents(views::View* contents); 99 void SetContents(views::View* contents);
99 100
100 // Creates and sets contents background to |background_|. 101 // Creates and sets contents background to |background_|.
101 void SetContentsBackground(); 102 void SetContentsBackground();
102 103
103 // Sets whether the tray paints a background. Default is true, but is set to
104 // false if a window overlaps the shelf.
105 void SetPaintsBackground(
106 bool value,
107 internal::BackgroundAnimator::ChangeType change_type);
108
109 // Initializes animations for the bubble. 104 // Initializes animations for the bubble.
110 void InitializeBubbleAnimations(views::Widget* bubble_widget); 105 void InitializeBubbleAnimations(views::Widget* bubble_widget);
111 106
112 // Returns the window hosting the bubble. 107 // Returns the window hosting the bubble.
113 aura::Window* GetBubbleWindowContainer() const; 108 aura::Window* GetBubbleWindowContainer() const;
114 109
115 // Returns the anchor rect for the bubble. 110 // Returns the anchor rect for the bubble.
116 gfx::Rect GetBubbleAnchorRect( 111 gfx::Rect GetBubbleAnchorRect(
117 views::Widget* anchor_widget, 112 views::Widget* anchor_widget,
118 views::TrayBubbleView::AnchorType anchor_type, 113 views::TrayBubbleView::AnchorType anchor_type,
(...skipping 29 matching lines...) Expand all
148 143
149 // Convenience pointer to the contents view. 144 // Convenience pointer to the contents view.
150 TrayContainer* tray_container_; 145 TrayContainer* tray_container_;
151 146
152 // Shelf alignment. 147 // Shelf alignment.
153 ShelfAlignment shelf_alignment_; 148 ShelfAlignment shelf_alignment_;
154 149
155 // Owned by the view passed to SetContents(). 150 // Owned by the view passed to SetContents().
156 internal::TrayBackground* background_; 151 internal::TrayBackground* background_;
157 152
158 internal::BackgroundAnimator hide_background_animator_;
159 internal::BackgroundAnimator hover_background_animator_; 153 internal::BackgroundAnimator hover_background_animator_;
160 scoped_ptr<TrayWidgetObserver> widget_observer_; 154 scoped_ptr<TrayWidgetObserver> widget_observer_;
161 scoped_ptr<TrayEventFilter> tray_event_filter_; 155 scoped_ptr<TrayEventFilter> tray_event_filter_;
162 156
163 DISALLOW_COPY_AND_ASSIGN(TrayBackgroundView); 157 DISALLOW_COPY_AND_ASSIGN(TrayBackgroundView);
164 }; 158 };
165 159
166 } // namespace internal 160 } // namespace internal
167 } // namespace ash 161 } // namespace ash
168 162
169 #endif // ASH_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_ 163 #endif // ASH_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698