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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 0, 0, kPaddingFromBottomOfScreenVerticalAlignment); | 402 0, 0, kPaddingFromBottomOfScreenVerticalAlignment); |
403 } else if (params_.shelf_alignment == SHELF_ALIGNMENT_RIGHT) { | 403 } else if (params_.shelf_alignment == SHELF_ALIGNMENT_RIGHT) { |
404 rect.Inset(0, 0, kPaddingFromInnerEdgeOfLauncherVerticalAlignment, | 404 rect.Inset(0, 0, kPaddingFromInnerEdgeOfLauncherVerticalAlignment, |
405 kPaddingFromBottomOfScreenVerticalAlignment); | 405 kPaddingFromBottomOfScreenVerticalAlignment); |
406 } | 406 } |
407 } | 407 } |
408 } | 408 } |
409 | 409 |
410 // TODO(jennyz): May need to add left/right alignment in the following code. | 410 // TODO(jennyz): May need to add left/right alignment in the following code. |
411 if (rect.IsEmpty()) { | 411 if (rect.IsEmpty()) { |
412 rect = gfx::Screen::GetPrimaryDisplay().bounds(); | 412 rect = ash::Shell::GetAshScreen()->GetPrimaryDisplay().bounds(); |
413 rect = gfx::Rect( | 413 rect = gfx::Rect( |
414 base::i18n::IsRTL() ? kPaddingFromRightEdgeOfScreenBottomAlignment : | 414 base::i18n::IsRTL() ? kPaddingFromRightEdgeOfScreenBottomAlignment : |
415 rect.width() - kPaddingFromRightEdgeOfScreenBottomAlignment, | 415 rect.width() - kPaddingFromRightEdgeOfScreenBottomAlignment, |
416 rect.height() - kPaddingFromBottomOfScreenBottomAlignment, | 416 rect.height() - kPaddingFromBottomOfScreenBottomAlignment, |
417 0, 0); | 417 0, 0); |
418 } | 418 } |
419 return rect; | 419 return rect; |
420 } | 420 } |
421 | 421 |
422 gfx::Rect TrayBubbleView::GetBubbleBounds() { | 422 gfx::Rect TrayBubbleView::GetBubbleBounds() { |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 return; | 563 return; |
564 } | 564 } |
565 // Handle clicking outside the bubble and tray. We don't block the event, so | 565 // Handle clicking outside the bubble and tray. We don't block the event, so |
566 // it will also be handled by whatever widget was clicked on. | 566 // it will also be handled by whatever widget was clicked on. |
567 OnClickedOutsideView(); | 567 OnClickedOutsideView(); |
568 } | 568 } |
569 | 569 |
570 | 570 |
571 } // namespace internal | 571 } // namespace internal |
572 } // namespace ash | 572 } // namespace ash |
OLD | NEW |