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

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

Issue 19267013: ash: Status Tray User Icon Update (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 7 years, 5 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/resources/ash_resources.grd ('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 #include "ash/system/tray/system_tray.h" 5 #include "ash/system/tray/system_tray.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/shelf/shelf_layout_manager.h" 8 #include "ash/shelf/shelf_layout_manager.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell/panel_window.h" 10 #include "ash/shell/panel_window.h"
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 void SystemTray::UpdateAfterLoginStatusChange(user::LoginStatus login_status) { 278 void SystemTray::UpdateAfterLoginStatusChange(user::LoginStatus login_status) {
279 DestroySystemBubble(); 279 DestroySystemBubble();
280 UpdateNotificationBubble(); 280 UpdateNotificationBubble();
281 281
282 for (std::vector<SystemTrayItem*>::iterator it = items_.begin(); 282 for (std::vector<SystemTrayItem*>::iterator it = items_.begin();
283 it != items_.end(); 283 it != items_.end();
284 ++it) { 284 ++it) {
285 (*it)->UpdateAfterLoginStatusChange(login_status); 285 (*it)->UpdateAfterLoginStatusChange(login_status);
286 } 286 }
287 287
288 // Items default to SHELF_ALIGNMENT_BOTTOM. Update them if the initial
289 // position of the shelf differs.
290 if (shelf_alignment() != SHELF_ALIGNMENT_BOTTOM)
291 UpdateAfterShelfAlignmentChange(shelf_alignment());
292
288 SetVisible(true); 293 SetVisible(true);
289 PreferredSizeChanged(); 294 PreferredSizeChanged();
290 } 295 }
291 296
292 void SystemTray::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) { 297 void SystemTray::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {
293 for (std::vector<SystemTrayItem*>::iterator it = items_.begin(); 298 for (std::vector<SystemTrayItem*>::iterator it = items_.begin();
294 it != items_.end(); 299 it != items_.end();
295 ++it) { 300 ++it) {
296 (*it)->UpdateAfterShelfAlignmentChange(alignment); 301 (*it)->UpdateAfterShelfAlignmentChange(alignment);
297 } 302 }
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 ConvertPointToWidget(this, &point); 612 ConvertPointToWidget(this, &point);
608 arrow_offset = point.x(); 613 arrow_offset = point.x();
609 } 614 }
610 } 615 }
611 ShowDefaultViewWithOffset(BUBBLE_CREATE_NEW, arrow_offset); 616 ShowDefaultViewWithOffset(BUBBLE_CREATE_NEW, arrow_offset);
612 } 617 }
613 return true; 618 return true;
614 } 619 }
615 620
616 } // namespace ash 621 } // namespace ash
OLDNEW
« no previous file with comments | « ash/resources/ash_resources.grd ('k') | ash/system/tray/tray_background_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698