OLD | NEW |
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_bubble.h" | 5 #include "ash/system/tray/system_tray_bubble.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/system/tray/system_tray.h" | 8 #include "ash/system/tray/system_tray.h" |
9 #include "ash/system/tray/system_tray_delegate.h" | 9 #include "ash/system/tray/system_tray_delegate.h" |
10 #include "ash/system/tray/system_tray_item.h" | 10 #include "ash/system/tray/system_tray_item.h" |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 void SystemTrayBubble::OnMouseExitedView() { | 326 void SystemTrayBubble::OnMouseExitedView() { |
327 RestartAutoCloseTimer(); | 327 RestartAutoCloseTimer(); |
328 tray_->UpdateShouldShowLauncher(); | 328 tray_->UpdateShouldShowLauncher(); |
329 } | 329 } |
330 | 330 |
331 void SystemTrayBubble::OnClickedOutsideView() { | 331 void SystemTrayBubble::OnClickedOutsideView() { |
332 if (bubble_type_ != BUBBLE_TYPE_NOTIFICATION) | 332 if (bubble_type_ != BUBBLE_TYPE_NOTIFICATION) |
333 bubble_widget_->Close(); | 333 bubble_widget_->Close(); |
334 } | 334 } |
335 | 335 |
336 string16 SystemTrayBubble::GetAccessibleName() { | |
337 return tray_->GetAccessibleName(); | |
338 } | |
339 | |
340 void SystemTrayBubble::DestroyItemViews() { | 336 void SystemTrayBubble::DestroyItemViews() { |
341 for (std::vector<ash::SystemTrayItem*>::iterator it = items_.begin(); | 337 for (std::vector<ash::SystemTrayItem*>::iterator it = items_.begin(); |
342 it != items_.end(); | 338 it != items_.end(); |
343 ++it) { | 339 ++it) { |
344 switch (bubble_type_) { | 340 switch (bubble_type_) { |
345 case BUBBLE_TYPE_DEFAULT: | 341 case BUBBLE_TYPE_DEFAULT: |
346 (*it)->DestroyDefaultView(); | 342 (*it)->DestroyDefaultView(); |
347 break; | 343 break; |
348 case BUBBLE_TYPE_DETAILED: | 344 case BUBBLE_TYPE_DETAILED: |
349 (*it)->DestroyDetailedView(); | 345 (*it)->DestroyDetailedView(); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 } | 412 } |
417 | 413 |
418 void SystemTrayBubble::OnWidgetClosing(views::Widget* widget) { | 414 void SystemTrayBubble::OnWidgetClosing(views::Widget* widget) { |
419 CHECK_EQ(bubble_widget_, widget); | 415 CHECK_EQ(bubble_widget_, widget); |
420 bubble_widget_ = NULL; | 416 bubble_widget_ = NULL; |
421 tray_->RemoveBubble(this); | 417 tray_->RemoveBubble(this); |
422 } | 418 } |
423 | 419 |
424 } // namespace internal | 420 } // namespace internal |
425 } // namespace ash | 421 } // namespace ash |
OLD | NEW |