| Index: ash/system/tray/system_tray.cc
|
| diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc
|
| index ed64a7e2e9dc44f78a42a7656ffb13e71a722a74..23a3df2225f1f34788f127d89f2f300f558af915 100644
|
| --- a/ash/system/tray/system_tray.cc
|
| +++ b/ash/system/tray/system_tray.cc
|
| @@ -28,6 +28,7 @@
|
| #include "ui/base/accessibility/accessible_view_state.h"
|
| #include "ui/base/l10n/l10n_util.h"
|
| #include "ui/gfx/canvas.h"
|
| +#include "ui/gfx/screen.h"
|
| #include "ui/gfx/skia_util.h"
|
| #include "ui/views/border.h"
|
| #include "ui/views/bubble/bubble_delegate.h"
|
| @@ -351,6 +352,20 @@ class SystemTrayBubble : public views::BubbleDelegateView {
|
| }
|
| }
|
|
|
| + virtual gfx::Rect GetAnchorRect() OVERRIDE {
|
| + views::Widget* widget = tray_->GetWidget();
|
| + if (widget->IsVisible()) {
|
| + gfx::Rect rect = widget->GetWindowScreenBounds();
|
| + rect.Inset(0, 0, kPaddingFromRightEdgeOfScreen,
|
| + kPaddingFromBottomOfScreen);
|
| + return rect;
|
| + }
|
| + gfx::Rect rect = gfx::Screen::GetPrimaryMonitorBounds();
|
| + return gfx::Rect(rect.width() - kPaddingFromRightEdgeOfScreen,
|
| + rect.height() - kPaddingFromBottomOfScreen,
|
| + 0, 0);
|
| + }
|
| +
|
| // Overridden from views::View.
|
| virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE {
|
| state->role = ui::AccessibilityTypes::ROLE_WINDOW;
|
|
|