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

Side by Side Diff: chrome/browser/notifications/balloon_collection_impl.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: fix some new gfx::Screen additions 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "chrome/browser/notifications/balloon_collection_impl.h" 5 #include "chrome/browser/notifications/balloon_collection_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "chrome/browser/notifications/balloon.h" 10 #include "chrome/browser/notifications/balloon.h"
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 offset_to_move_above_panels_ = offset_to_move_above_panels; 457 offset_to_move_above_panels_ = offset_to_move_above_panels;
458 return true; 458 return true;
459 } 459 }
460 460
461 bool BalloonCollectionImpl::Layout::RefreshSystemMetrics() { 461 bool BalloonCollectionImpl::Layout::RefreshSystemMetrics() {
462 bool changed = false; 462 bool changed = false;
463 463
464 #if defined(OS_MACOSX) 464 #if defined(OS_MACOSX)
465 gfx::Rect new_work_area = GetMacWorkArea(); 465 gfx::Rect new_work_area = GetMacWorkArea();
466 #else 466 #else
467 gfx::Rect new_work_area = gfx::Screen::GetPrimaryDisplay().work_area(); 467 // TODO(scottmg): NativeScreen might be wrong. http://crbug.com/133312
oshima 2012/10/10 17:58:23 Yep, this should be a screen on which notification
scottmg 2012/10/10 19:04:47 Done. (more emphatic :)
468 gfx::Rect new_work_area =
469 gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().work_area();
468 #endif 470 #endif
469 if (!work_area_.Equals(new_work_area)) { 471 if (!work_area_.Equals(new_work_area)) {
470 work_area_.SetRect(new_work_area.x(), new_work_area.y(), 472 work_area_.SetRect(new_work_area.x(), new_work_area.y(),
471 new_work_area.width(), new_work_area.height()); 473 new_work_area.width(), new_work_area.height());
472 changed = true; 474 changed = true;
473 } 475 }
474 476
475 return changed; 477 return changed;
476 } 478 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698