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/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
10 #include "ash/system/tray/tray_constants.h" | 10 #include "ash/system/tray/tray_constants.h" |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 } | 397 } |
398 | 398 |
399 void TrayBubbleView::OnMouseExited(const ui::MouseEvent& event) { | 399 void TrayBubbleView::OnMouseExited(const ui::MouseEvent& event) { |
400 if (host_) | 400 if (host_) |
401 host_->OnMouseExitedView(); | 401 host_->OnMouseExitedView(); |
402 } | 402 } |
403 | 403 |
404 void TrayBubbleView::GetAccessibleState(ui::AccessibleViewState* state) { | 404 void TrayBubbleView::GetAccessibleState(ui::AccessibleViewState* state) { |
405 if (params_.can_activate) { | 405 if (params_.can_activate) { |
406 state->role = ui::AccessibilityTypes::ROLE_WINDOW; | 406 state->role = ui::AccessibilityTypes::ROLE_WINDOW; |
407 state->name = l10n_util::GetStringUTF16( | 407 state->name = host_->GetAccessibleName(); |
408 IDS_ASH_STATUS_TRAY_ACCESSIBLE_NAME); | |
409 } | 408 } |
410 } | 409 } |
411 | 410 |
412 void TrayBubbleView::ChildPreferredSizeChanged(View* child) { | 411 void TrayBubbleView::ChildPreferredSizeChanged(View* child) { |
413 SizeToContents(); | 412 SizeToContents(); |
414 } | 413 } |
415 | 414 |
416 void TrayBubbleView::ViewHierarchyChanged(bool is_add, | 415 void TrayBubbleView::ViewHierarchyChanged(bool is_add, |
417 views::View* parent, | 416 views::View* parent, |
418 views::View* child) { | 417 views::View* child) { |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 return; | 506 return; |
508 } | 507 } |
509 // Handle clicking outside the bubble and tray. We don't block the event, so | 508 // Handle clicking outside the bubble and tray. We don't block the event, so |
510 // it will also be handled by whatever widget was clicked on. | 509 // it will also be handled by whatever widget was clicked on. |
511 OnClickedOutsideView(); | 510 OnClickedOutsideView(); |
512 } | 511 } |
513 | 512 |
514 | 513 |
515 } // namespace internal | 514 } // namespace internal |
516 } // namespace ash | 515 } // namespace ash |
OLD | NEW |