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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 0, 0, kPaddingFromBottomOfScreenVerticalAlignment); | 338 0, 0, kPaddingFromBottomOfScreenVerticalAlignment); |
339 } else if (params_.shelf_alignment == SHELF_ALIGNMENT_RIGHT) { | 339 } else if (params_.shelf_alignment == SHELF_ALIGNMENT_RIGHT) { |
340 rect.Inset(0, 0, kPaddingFromInnerEdgeOfLauncherVerticalAlignment, | 340 rect.Inset(0, 0, kPaddingFromInnerEdgeOfLauncherVerticalAlignment, |
341 kPaddingFromBottomOfScreenVerticalAlignment); | 341 kPaddingFromBottomOfScreenVerticalAlignment); |
342 } | 342 } |
343 } | 343 } |
344 } | 344 } |
345 | 345 |
346 // TODO(jennyz): May need to add left/right alignment in the following code. | 346 // TODO(jennyz): May need to add left/right alignment in the following code. |
347 if (rect.IsEmpty()) { | 347 if (rect.IsEmpty()) { |
348 rect = gfx::Screen::GetPrimaryDisplay().bounds(); | 348 rect = Shell::GetScreen()->GetPrimaryDisplay().bounds(); |
349 rect = gfx::Rect( | 349 rect = gfx::Rect( |
350 base::i18n::IsRTL() ? kPaddingFromRightEdgeOfScreenBottomAlignment : | 350 base::i18n::IsRTL() ? kPaddingFromRightEdgeOfScreenBottomAlignment : |
351 rect.width() - kPaddingFromRightEdgeOfScreenBottomAlignment, | 351 rect.width() - kPaddingFromRightEdgeOfScreenBottomAlignment, |
352 rect.height() - kPaddingFromBottomOfScreenBottomAlignment, | 352 rect.height() - kPaddingFromBottomOfScreenBottomAlignment, |
353 0, 0); | 353 0, 0); |
354 } | 354 } |
355 return rect; | 355 return rect; |
356 } | 356 } |
357 | 357 |
358 bool TrayBubbleView::CanActivate() const { | 358 bool TrayBubbleView::CanActivate() const { |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 return; | 507 return; |
508 } | 508 } |
509 // 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 |
510 // it will also be handled by whatever widget was clicked on. | 510 // it will also be handled by whatever widget was clicked on. |
511 OnClickedOutsideView(); | 511 OnClickedOutsideView(); |
512 } | 512 } |
513 | 513 |
514 | 514 |
515 } // namespace internal | 515 } // namespace internal |
516 } // namespace ash | 516 } // namespace ash |
OLD | NEW |