Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1047)

Unified Diff: ash/launcher/overflow_bubble.cc

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tidy Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ash/launcher/overflow_bubble.cc
diff --git a/ash/launcher/overflow_bubble.cc b/ash/launcher/overflow_bubble.cc
index 6489583e3f5a2f3937dcce7991376c85415cd5c2..c2b12369100df069b4b8c65097e11e194ac6b45e 100644
--- a/ash/launcher/overflow_bubble.cc
+++ b/ash/launcher/overflow_bubble.cc
@@ -8,6 +8,7 @@
#include "ash/launcher/launcher_types.h"
#include "ash/launcher/launcher_view.h"
+#include "ash/shell.h"
#include "ui/gfx/insets.h"
#include "ui/gfx/screen.h"
#include "ui/views/bubble/bubble_delegate.h"
@@ -146,6 +147,7 @@ gfx::Size OverflowBubbleView::GetPreferredSize() {
gfx::Size preferred_size = GetContentsSize();
const gfx::Rect monitor_rect = gfx::Screen::GetDisplayNearestPoint(
+ ash::Shell::GetRootNativeView(),
GetAnchorRect().CenterPoint()).work_area();
if (!monitor_rect.IsEmpty()) {
if (is_horizontal_alignment()) {
@@ -216,7 +218,7 @@ gfx::Rect OverflowBubbleView::GetBubbleBounds() {
false);
gfx::Rect monitor_rect = gfx::Screen::GetDisplayNearestPoint(
- anchor_rect.CenterPoint()).work_area();
+ ash::Shell::GetRootNativeView(), anchor_rect.CenterPoint()).work_area();
int offset = 0;
if (views::BubbleBorder::is_arrow_on_horizontal(arrow_location())) {

Powered by Google App Engine
This is Rietveld 408576698