| 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/tray_bubble_view.h" | 5 #include "ash/system/tray/tray_bubble_view.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/shell_window_ids.h" | 8 #include "ash/shell_window_ids.h" |
| 9 #include "ash/system/tray/tray_constants.h" | 9 #include "ash/system/tray/tray_constants.h" |
| 10 #include "ash/wm/shelf_layout_manager.h" | 10 #include "ash/wm/shelf_layout_manager.h" |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 } | 395 } |
| 396 | 396 |
| 397 void TrayBubbleView::OnMouseExited(const views::MouseEvent& event) { | 397 void TrayBubbleView::OnMouseExited(const views::MouseEvent& event) { |
| 398 if (host_) | 398 if (host_) |
| 399 host_->OnMouseExitedView(); | 399 host_->OnMouseExitedView(); |
| 400 } | 400 } |
| 401 | 401 |
| 402 void TrayBubbleView::GetAccessibleState(ui::AccessibleViewState* state) { | 402 void TrayBubbleView::GetAccessibleState(ui::AccessibleViewState* state) { |
| 403 if (params_.can_activate) { | 403 if (params_.can_activate) { |
| 404 state->role = ui::AccessibilityTypes::ROLE_WINDOW; | 404 state->role = ui::AccessibilityTypes::ROLE_WINDOW; |
| 405 state->name = l10n_util::GetStringUTF16( | 405 state->name = host_->GetAccessibleName(); |
| 406 IDS_ASH_STATUS_TRAY_ACCESSIBLE_NAME); | |
| 407 } | 406 } |
| 408 } | 407 } |
| 409 | 408 |
| 410 void TrayBubbleView::ChildPreferredSizeChanged(View* child) { | 409 void TrayBubbleView::ChildPreferredSizeChanged(View* child) { |
| 411 SizeToContents(); | 410 SizeToContents(); |
| 412 } | 411 } |
| 413 | 412 |
| 414 void TrayBubbleView::ViewHierarchyChanged(bool is_add, | 413 void TrayBubbleView::ViewHierarchyChanged(bool is_add, |
| 415 views::View* parent, | 414 views::View* parent, |
| 416 views::View* child) { | 415 views::View* child) { |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 return; | 495 return; |
| 497 } | 496 } |
| 498 // Handle clicking outside the bubble and tray. We don't block the event, so | 497 // Handle clicking outside the bubble and tray. We don't block the event, so |
| 499 // it will also be handled by whatever widget was clicked on. | 498 // it will also be handled by whatever widget was clicked on. |
| 500 OnClickedOutsideView(); | 499 OnClickedOutsideView(); |
| 501 } | 500 } |
| 502 | 501 |
| 503 | 502 |
| 504 } // namespace internal | 503 } // namespace internal |
| 505 } // namespace ash | 504 } // namespace ash |
| OLD | NEW |