| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "views/widget/widget.h" | 5 #include "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 Loading... |
| 435 gfx::Screen::GetMonitorWorkAreaNearestPoint(bounds.origin()); | 435 gfx::Screen::GetMonitorWorkAreaNearestPoint(bounds.origin()); |
| 436 if (work_area.IsEmpty()) { | 436 if (work_area.IsEmpty()) { |
| 437 SetBounds(bounds); | 437 SetBounds(bounds); |
| 438 } else { | 438 } else { |
| 439 // Inset the work area slightly. | 439 // Inset the work area slightly. |
| 440 work_area.Inset(10, 10, 10, 10); | 440 work_area.Inset(10, 10, 10, 10); |
| 441 SetBounds(work_area.AdjustToFit(bounds)); | 441 SetBounds(work_area.AdjustToFit(bounds)); |
| 442 } | 442 } |
| 443 } | 443 } |
| 444 | 444 |
| 445 void Widget::MoveAboveWidget(Widget* widget) { | 445 void Widget::StackAboveWidget(Widget* widget) { |
| 446 native_widget_->MoveAbove(widget->GetNativeView()); | 446 native_widget_->StackAbove(widget->GetNativeView()); |
| 447 } | 447 } |
| 448 | 448 |
| 449 void Widget::MoveAbove(gfx::NativeView native_view) { | 449 void Widget::StackAbove(gfx::NativeView native_view) { |
| 450 native_widget_->MoveAbove(native_view); | 450 native_widget_->StackAbove(native_view); |
| 451 } | 451 } |
| 452 | 452 |
| 453 void Widget::MoveToTop() { | 453 void Widget::StackAtTop() { |
| 454 native_widget_->MoveToTop(); | 454 native_widget_->StackAtTop(); |
| 455 } | 455 } |
| 456 | 456 |
| 457 void Widget::SetShape(gfx::NativeRegion shape) { | 457 void Widget::SetShape(gfx::NativeRegion shape) { |
| 458 native_widget_->SetShape(shape); | 458 native_widget_->SetShape(shape); |
| 459 } | 459 } |
| 460 | 460 |
| 461 void Widget::Close() { | 461 void Widget::Close() { |
| 462 if (widget_closed_) { | 462 if (widget_closed_) { |
| 463 // It appears we can hit this code path if you close a modal dialog then | 463 // It appears we can hit this code path if you close a modal dialog then |
| 464 // close the last browser before the destructor is hit, which triggers | 464 // close the last browser before the destructor is hit, which triggers |
| (...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1209 | 1209 |
| 1210 //////////////////////////////////////////////////////////////////////////////// | 1210 //////////////////////////////////////////////////////////////////////////////// |
| 1211 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1211 // internal::NativeWidgetPrivate, NativeWidget implementation: |
| 1212 | 1212 |
| 1213 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1213 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
| 1214 return this; | 1214 return this; |
| 1215 } | 1215 } |
| 1216 | 1216 |
| 1217 } // namespace internal | 1217 } // namespace internal |
| 1218 } // namespace views | 1218 } // namespace views |
| OLD | NEW |