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: ui/views/widget/widget.cc

Issue 10540123: Rename gfx::Screen::GetMonitorXXXX to gfx::Screen::GetDisplayXXX. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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
« no previous file with comments | « ui/views/widget/tooltip_manager_win.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/views/widget/widget.h" 5 #include "ui/views/widget/widget.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "ui/base/hit_test.h" 10 #include "ui/base/hit_test.h"
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 void Widget::SetSize(const gfx::Size& size) { 435 void Widget::SetSize(const gfx::Size& size) {
436 native_widget_->SetSize(size); 436 native_widget_->SetSize(size);
437 } 437 }
438 438
439 void Widget::CenterWindow(const gfx::Size& size) { 439 void Widget::CenterWindow(const gfx::Size& size) {
440 native_widget_->CenterWindow(size); 440 native_widget_->CenterWindow(size);
441 } 441 }
442 442
443 void Widget::SetBoundsConstrained(const gfx::Rect& bounds) { 443 void Widget::SetBoundsConstrained(const gfx::Rect& bounds) {
444 gfx::Rect work_area = 444 gfx::Rect work_area =
445 gfx::Screen::GetMonitorNearestPoint(bounds.origin()).work_area(); 445 gfx::Screen::GetDisplayNearestPoint(bounds.origin()).work_area();
446 if (work_area.IsEmpty()) { 446 if (work_area.IsEmpty()) {
447 SetBounds(bounds); 447 SetBounds(bounds);
448 } else { 448 } else {
449 // Inset the work area slightly. 449 // Inset the work area slightly.
450 work_area.Inset(10, 10, 10, 10); 450 work_area.Inset(10, 10, 10, 10);
451 SetBounds(work_area.AdjustToFit(bounds)); 451 SetBounds(work_area.AdjustToFit(bounds));
452 } 452 }
453 } 453 }
454 454
455 void Widget::SetVisibilityChangedAnimationsEnabled(bool value) { 455 void Widget::SetVisibilityChangedAnimationsEnabled(bool value) {
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after
1334 1334
1335 //////////////////////////////////////////////////////////////////////////////// 1335 ////////////////////////////////////////////////////////////////////////////////
1336 // internal::NativeWidgetPrivate, NativeWidget implementation: 1336 // internal::NativeWidgetPrivate, NativeWidget implementation:
1337 1337
1338 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { 1338 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() {
1339 return this; 1339 return this;
1340 } 1340 }
1341 1341
1342 } // namespace internal 1342 } // namespace internal
1343 } // namespace views 1343 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/tooltip_manager_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698