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 = host_->GetAccessibleName(); | 407 state->name = l10n_util::GetStringUTF16( |
| 408 IDS_ASH_STATUS_TRAY_ACCESSIBLE_NAME); |
408 } | 409 } |
409 } | 410 } |
410 | 411 |
411 void TrayBubbleView::ChildPreferredSizeChanged(View* child) { | 412 void TrayBubbleView::ChildPreferredSizeChanged(View* child) { |
412 SizeToContents(); | 413 SizeToContents(); |
413 } | 414 } |
414 | 415 |
415 void TrayBubbleView::ViewHierarchyChanged(bool is_add, | 416 void TrayBubbleView::ViewHierarchyChanged(bool is_add, |
416 views::View* parent, | 417 views::View* parent, |
417 views::View* child) { | 418 views::View* child) { |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 return; | 507 return; |
507 } | 508 } |
508 // Handle clicking outside the bubble and tray. We don't block the event, so | 509 // Handle clicking outside the bubble and tray. We don't block the event, so |
509 // it will also be handled by whatever widget was clicked on. | 510 // it will also be handled by whatever widget was clicked on. |
510 OnClickedOutsideView(); | 511 OnClickedOutsideView(); |
511 } | 512 } |
512 | 513 |
513 | 514 |
514 } // namespace internal | 515 } // namespace internal |
515 } // namespace ash | 516 } // namespace ash |
OLD | NEW |