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

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

Issue 9561003: ash uber tray: Add a tray item for the user. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: GetUserDisplayName instead of GetUserName Created 8 years, 9 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/shell.cc ('k') | ash/system/tray/system_tray_delegate.h » ('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/shell/panel_window.h" 7 #include "ash/shell/panel_window.h"
8 #include "ash/system/tray/system_tray_item.h" 8 #include "ash/system/tray/system_tray_item.h"
9 #include "ash/wm/shadow_types.h" 9 #include "ash/wm/shadow_types.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 ++it) { 86 ++it) {
87 (*it)->DestroyTrayView(); 87 (*it)->DestroyTrayView();
88 } 88 }
89 } 89 }
90 90
91 void SystemTray::AddTrayItem(SystemTrayItem* item) { 91 void SystemTray::AddTrayItem(SystemTrayItem* item) {
92 items_.push_back(item); 92 items_.push_back(item);
93 93
94 views::View* tray_item = item->CreateTrayView(); 94 views::View* tray_item = item->CreateTrayView();
95 if (tray_item) { 95 if (tray_item) {
96 AddChildView(tray_item); 96 AddChildViewAt(tray_item, 0);
97 PreferredSizeChanged(); 97 PreferredSizeChanged();
98 } 98 }
99 } 99 }
100 100
101 void SystemTray::RemoveTrayItem(SystemTrayItem* item) { 101 void SystemTray::RemoveTrayItem(SystemTrayItem* item) {
102 NOTIMPLEMENTED(); 102 NOTIMPLEMENTED();
103 } 103 }
104 104
105 void SystemTray::ShowDetailedView(SystemTrayItem* item) { 105 void SystemTray::ShowDetailedView(SystemTrayItem* item) {
106 if (popup_) 106 if (popup_)
(...skipping 20 matching lines...) Expand all
127 ShowItems(items_, false); 127 ShowItems(items_, false);
128 return true; 128 return true;
129 } 129 }
130 130
131 void SystemTray::OnWidgetClosing(views::Widget* widget) { 131 void SystemTray::OnWidgetClosing(views::Widget* widget) {
132 CHECK_EQ(popup_, widget); 132 CHECK_EQ(popup_, widget);
133 popup_ = NULL; 133 popup_ = NULL;
134 } 134 }
135 135
136 } // namespace ash 136 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.cc ('k') | ash/system/tray/system_tray_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698