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/system_tray.h" | 5 #include "ash/system/tray/system_tray.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell/panel_window.h" | 8 #include "ash/shell/panel_window.h" |
9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
10 #include "ash/system/audio/tray_volume.h" | 10 #include "ash/system/audio/tray_volume.h" |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 virtual gfx::Rect GetAnchorRect() OVERRIDE { | 322 virtual gfx::Rect GetAnchorRect() OVERRIDE { |
323 views::Widget* widget = tray_->GetWidget(); | 323 views::Widget* widget = tray_->GetWidget(); |
324 if (widget->IsVisible()) { | 324 if (widget->IsVisible()) { |
325 gfx::Rect rect = widget->GetWindowScreenBounds(); | 325 gfx::Rect rect = widget->GetWindowScreenBounds(); |
326 rect.Inset( | 326 rect.Inset( |
327 base::i18n::IsRTL() ? kPaddingFromRightEdgeOfScreen : 0, 0, | 327 base::i18n::IsRTL() ? kPaddingFromRightEdgeOfScreen : 0, 0, |
328 base::i18n::IsRTL() ? 0 : kPaddingFromRightEdgeOfScreen, | 328 base::i18n::IsRTL() ? 0 : kPaddingFromRightEdgeOfScreen, |
329 kPaddingFromBottomOfScreen); | 329 kPaddingFromBottomOfScreen); |
330 return rect; | 330 return rect; |
331 } | 331 } |
332 gfx::Rect rect = gfx::Screen::GetPrimaryMonitorBounds(); | 332 gfx::Rect rect = gfx::Screen::GetPrimaryMonitor().bounds(); |
333 return gfx::Rect(base::i18n::IsRTL() ? kPaddingFromRightEdgeOfScreen : | 333 return gfx::Rect(base::i18n::IsRTL() ? kPaddingFromRightEdgeOfScreen : |
334 rect.width() - kPaddingFromRightEdgeOfScreen, | 334 rect.width() - kPaddingFromRightEdgeOfScreen, |
335 rect.height() - kPaddingFromBottomOfScreen, | 335 rect.height() - kPaddingFromBottomOfScreen, |
336 0, 0); | 336 0, 0); |
337 } | 337 } |
338 | 338 |
339 // Overridden from views::View. | 339 // Overridden from views::View. |
340 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE { | 340 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE { |
341 if (can_activate_) { | 341 if (can_activate_) { |
342 state->role = ui::AccessibilityTypes::ROLE_WINDOW; | 342 state->role = ui::AccessibilityTypes::ROLE_WINDOW; |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
704 popup_->Hide(); | 704 popup_->Hide(); |
705 } | 705 } |
706 } | 706 } |
707 return base::EVENT_CONTINUE; | 707 return base::EVENT_CONTINUE; |
708 } | 708 } |
709 | 709 |
710 void SystemTray::DidProcessEvent(const base::NativeEvent& event) { | 710 void SystemTray::DidProcessEvent(const base::NativeEvent& event) { |
711 } | 711 } |
712 | 712 |
713 } // namespace ash | 713 } // namespace ash |
OLD | NEW |