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

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

Issue 10535112: Prepare status area to support multiple trays. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 6 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/status_area_widget_delegate.cc ('k') | ash/system/tray/system_tray.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_SYSTEM_TRAY_H_ 5 #ifndef ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_
6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ 6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ash/ash_export.h" 9 #include "ash/ash_export.h"
10 #include "ash/system/power/power_supply_status.h" 10 #include "ash/system/power/power_supply_status.h"
11 #include "ash/system/tray/tray_background_view.h" 11 #include "ash/system/tray/tray_background_view.h"
12 #include "ash/system/tray/tray_views.h" 12 #include "ash/system/tray/tray_views.h"
13 #include "ash/system/user/login_status.h" 13 #include "ash/system/user/login_status.h"
14 #include "ash/wm/shelf_auto_hide_behavior.h"
15 #include "base/basictypes.h" 14 #include "base/basictypes.h"
16 #include "base/compiler_specific.h" 15 #include "base/compiler_specific.h"
17 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
18 #include "base/memory/scoped_vector.h" 17 #include "base/memory/scoped_vector.h"
19 #include "ui/views/view.h" 18 #include "ui/views/view.h"
20 19
21 #include <map> 20 #include <map>
22 #include <vector> 21 #include <vector>
23 22
24 namespace ash { 23 namespace ash {
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 } 139 }
141 UserObserver* user_observer() const { 140 UserObserver* user_observer() const {
142 return user_observer_; 141 return user_observer_;
143 } 142 }
144 143
145 // Accessors for testing. 144 // Accessors for testing.
146 145
147 // Returns true if the bubble exists. 146 // Returns true if the bubble exists.
148 bool CloseBubbleForTest() const; 147 bool CloseBubbleForTest() const;
149 148
150 void SetShelfAlignment(ShelfAlignment alignment); 149 // Overridden from TrayBackgroundView.
151 ShelfAlignment shelf_alignment() const { return shelf_alignment_; } 150 virtual void SetShelfAlignment(ShelfAlignment alignment) OVERRIDE;
152 151
153 private: 152 private:
154 friend class internal::SystemTrayLayerAnimationObserver; 153 friend class internal::SystemTrayLayerAnimationObserver;
155 friend class internal::SystemTrayBubble; 154 friend class internal::SystemTrayBubble;
156 155
157 // Resets |bubble_| and clears any related state. 156 // Resets |bubble_| and clears any related state.
158 void DestroyBubble(); 157 void DestroyBubble();
159 158
160 // Called when the widget associated with |bubble| closes. |bubble| should 159 // Called when the widget associated with |bubble| closes. |bubble| should
161 // always == |bubble_|. This triggers destroying |bubble_| and hiding the 160 // always == |bubble_|. This triggers destroying |bubble_| and hiding the
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 227
229 // Bubble for default and detailed views. 228 // Bubble for default and detailed views.
230 scoped_ptr<internal::SystemTrayBubble> bubble_; 229 scoped_ptr<internal::SystemTrayBubble> bubble_;
231 230
232 // Buble for notifications. 231 // Buble for notifications.
233 scoped_ptr<internal::SystemTrayBubble> notification_bubble_; 232 scoped_ptr<internal::SystemTrayBubble> notification_bubble_;
234 233
235 // See description agove getter. 234 // See description agove getter.
236 bool should_show_launcher_; 235 bool should_show_launcher_;
237 236
238 // Shelf alignment.
239 ShelfAlignment shelf_alignment_;
240
241 scoped_ptr<internal::SystemTrayLayerAnimationObserver> 237 scoped_ptr<internal::SystemTrayLayerAnimationObserver>
242 layer_animation_observer_; 238 layer_animation_observer_;
243 239
244 // Keep track of the default view height so that when we create detailed 240 // Keep track of the default view height so that when we create detailed
245 // views directly (e.g. from a notification) we know what height to use. 241 // views directly (e.g. from a notification) we know what height to use.
246 int default_bubble_height_; 242 int default_bubble_height_;
247 243
248 DISALLOW_COPY_AND_ASSIGN(SystemTray); 244 DISALLOW_COPY_AND_ASSIGN(SystemTray);
249 }; 245 };
250 246
251 } // namespace ash 247 } // namespace ash
252 248
253 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ 249 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_
OLDNEW
« no previous file with comments | « ash/system/status_area_widget_delegate.cc ('k') | ash/system/tray/system_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698