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

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

Issue 9664056: ash uber tray: Add the detailed network popup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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
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.h" 7 #include "ash/shell.h"
8 #include "ash/shell/panel_window.h" 8 #include "ash/shell/panel_window.h"
9 #include "ash/shell_window_ids.h" 9 #include "ash/shell_window_ids.h"
10 #include "ash/system/tray/system_tray_delegate.h" 10 #include "ash/system/tray/system_tray_delegate.h"
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 if (tray_item) { 314 if (tray_item) {
315 container_->AddChildViewAt(tray_item, 0); 315 container_->AddChildViewAt(tray_item, 0);
316 PreferredSizeChanged(); 316 PreferredSizeChanged();
317 } 317 }
318 } 318 }
319 319
320 void SystemTray::RemoveTrayItem(SystemTrayItem* item) { 320 void SystemTray::RemoveTrayItem(SystemTrayItem* item) {
321 NOTIMPLEMENTED(); 321 NOTIMPLEMENTED();
322 } 322 }
323 323
324 void SystemTray::ShowDefaultView() {
325 if (popup_) {
326 popup_->RemoveObserver(this);
327 popup_->Close();
328 }
329 popup_ = NULL;
330 bubble_ = NULL;
331
332 ShowItems(items_, false, true);
333 }
334
324 void SystemTray::ShowDetailedView(SystemTrayItem* item, 335 void SystemTray::ShowDetailedView(SystemTrayItem* item,
325 int close_delay, 336 int close_delay,
326 bool activate) { 337 bool activate) {
327 if (popup_) { 338 if (popup_) {
328 popup_->RemoveObserver(this); 339 popup_->RemoveObserver(this);
329 popup_->Close(); 340 popup_->Close();
330 } 341 }
331 popup_ = NULL; 342 popup_ = NULL;
332 bubble_ = NULL; 343 bubble_ = NULL;
333 344
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 SchedulePaint(); 426 SchedulePaint();
416 } 427 }
417 428
418 void SystemTray::OnWidgetClosing(views::Widget* widget) { 429 void SystemTray::OnWidgetClosing(views::Widget* widget) {
419 CHECK_EQ(popup_, widget); 430 CHECK_EQ(popup_, widget);
420 popup_ = NULL; 431 popup_ = NULL;
421 bubble_ = NULL; 432 bubble_ = NULL;
422 } 433 }
423 434
424 } // namespace ash 435 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698