| 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.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/audio/tray_volume.h" | 10 #include "ash/system/audio/tray_volume.h" |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 } | 343 } |
| 344 | 344 |
| 345 void SystemTray::RemoveBubble(SystemTrayBubble* bubble) { | 345 void SystemTray::RemoveBubble(SystemTrayBubble* bubble) { |
| 346 if (bubble == bubble_.get()) { | 346 if (bubble == bubble_.get()) { |
| 347 DestroyBubble(); | 347 DestroyBubble(); |
| 348 UpdateNotificationBubble(); // State changed, re-create notifications. | 348 UpdateNotificationBubble(); // State changed, re-create notifications. |
| 349 if (should_show_launcher_) { | 349 if (should_show_launcher_) { |
| 350 // No need to show the launcher if the mouse isn't over the status area | 350 // No need to show the launcher if the mouse isn't over the status area |
| 351 // anymore. | 351 // anymore. |
| 352 aura::RootWindow* root = GetWidget()->GetNativeView()->GetRootWindow(); | 352 aura::RootWindow* root = GetWidget()->GetNativeView()->GetRootWindow(); |
| 353 should_show_launcher_ = GetWidget()->GetWindowScreenBounds().Contains( | 353 should_show_launcher_ = GetWidget()->GetWindowBoundsInScreen().Contains( |
| 354 root->last_mouse_location()); | 354 root->last_mouse_location()); |
| 355 if (!should_show_launcher_) | 355 if (!should_show_launcher_) |
| 356 Shell::GetInstance()->shelf()->UpdateAutoHideState(); | 356 Shell::GetInstance()->shelf()->UpdateAutoHideState(); |
| 357 } | 357 } |
| 358 } else if (bubble == notification_bubble_) { | 358 } else if (bubble == notification_bubble_) { |
| 359 notification_bubble_.reset(); | 359 notification_bubble_.reset(); |
| 360 } else { | 360 } else { |
| 361 NOTREACHED(); | 361 NOTREACHED(); |
| 362 } | 362 } |
| 363 } | 363 } |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 | 578 |
| 579 void SystemTray::OnPaintFocusBorder(gfx::Canvas* canvas) { | 579 void SystemTray::OnPaintFocusBorder(gfx::Canvas* canvas) { |
| 580 // The tray itself expands to the right and bottom edge of the screen to make | 580 // The tray itself expands to the right and bottom edge of the screen to make |
| 581 // sure clicking on the edges brings up the popup. However, the focus border | 581 // sure clicking on the edges brings up the popup. However, the focus border |
| 582 // should be only around the container. | 582 // should be only around the container. |
| 583 if (GetWidget() && GetWidget()->IsActive()) | 583 if (GetWidget() && GetWidget()->IsActive()) |
| 584 canvas->DrawFocusRect(tray_container_->bounds()); | 584 canvas->DrawFocusRect(tray_container_->bounds()); |
| 585 } | 585 } |
| 586 | 586 |
| 587 } // namespace ash | 587 } // namespace ash |
| OLD | NEW |