diff options
Diffstat (limited to 'views/widget')
-rw-r--r-- | views/widget/native_widget_gtk.cc | 5 | ||||
-rw-r--r-- | views/widget/native_widget_gtk.h | 1 | ||||
-rw-r--r-- | views/widget/native_widget_private.h | 1 | ||||
-rw-r--r-- | views/widget/native_widget_views.cc | 5 | ||||
-rw-r--r-- | views/widget/native_widget_views.h | 1 | ||||
-rw-r--r-- | views/widget/native_widget_win.cc | 4 | ||||
-rw-r--r-- | views/widget/native_widget_win.h | 1 | ||||
-rw-r--r-- | views/widget/widget.cc | 4 | ||||
-rw-r--r-- | views/widget/widget.h | 1 |
9 files changed, 23 insertions, 0 deletions
diff --git a/views/widget/native_widget_gtk.cc b/views/widget/native_widget_gtk.cc index 8ca9870..6fc908f 100644 --- a/views/widget/native_widget_gtk.cc +++ b/views/widget/native_widget_gtk.cc @@ -1060,6 +1060,11 @@ void NativeWidgetGtk::MoveAbove(gfx::NativeView native_view) { ui::StackPopupWindow(GetNativeView(), native_view); } +void NativeWidgetGtk::MoveToTop() { + DCHECK(GTK_IS_WINDOW(GetNativeView())); + gtk_window_present(GTK_WINDOW(GetNativeView())); +} + void NativeWidgetGtk::SetShape(gfx::NativeRegion region) { if (widget_ && widget_->window) { gdk_window_shape_combine_region(widget_->window, region, 0, 0); diff --git a/views/widget/native_widget_gtk.h b/views/widget/native_widget_gtk.h index 4565b39..2171d52 100644 --- a/views/widget/native_widget_gtk.h +++ b/views/widget/native_widget_gtk.h @@ -195,6 +195,7 @@ class NativeWidgetGtk : public internal::NativeWidgetPrivate, virtual void SetBoundsConstrained(const gfx::Rect& bounds, Widget* other_widget) OVERRIDE; virtual void MoveAbove(gfx::NativeView native_view) OVERRIDE; + virtual void MoveToTop() OVERRIDE; virtual void SetShape(gfx::NativeRegion shape) OVERRIDE; virtual void Close() OVERRIDE; virtual void CloseNow() OVERRIDE; diff --git a/views/widget/native_widget_private.h b/views/widget/native_widget_private.h index 1e08184..91ea7d6 100644 --- a/views/widget/native_widget_private.h +++ b/views/widget/native_widget_private.h @@ -167,6 +167,7 @@ class NativeWidgetPrivate : public NativeWidget { virtual void SetBoundsConstrained(const gfx::Rect& bounds, Widget* other_widget) = 0; virtual void MoveAbove(gfx::NativeView native_view) = 0; + virtual void MoveToTop() = 0; virtual void SetShape(gfx::NativeRegion shape) = 0; virtual void Close() = 0; virtual void CloseNow() = 0; diff --git a/views/widget/native_widget_views.cc b/views/widget/native_widget_views.cc index 438b755..dfdd553 100644 --- a/views/widget/native_widget_views.cc +++ b/views/widget/native_widget_views.cc @@ -42,6 +42,7 @@ void NativeWidgetViews::OnActivate(bool active) { void NativeWidgetViews::InitNativeWidget(const Widget::InitParams& params) { view_ = new internal::NativeWidgetView(this); + view_->SetPaintToTexture(true); host_view_->AddChildView(view_); // TODO(beng): handle parenting. @@ -202,6 +203,10 @@ void NativeWidgetViews::MoveAbove(gfx::NativeView native_view) { NOTIMPLEMENTED(); } +void NativeWidgetViews::MoveToTop() { + host_view_->ReorderChildView(view_, -1); +} + void NativeWidgetViews::SetShape(gfx::NativeRegion region) { NOTIMPLEMENTED(); } diff --git a/views/widget/native_widget_views.h b/views/widget/native_widget_views.h index db6e097..34809a3 100644 --- a/views/widget/native_widget_views.h +++ b/views/widget/native_widget_views.h @@ -76,6 +76,7 @@ class NativeWidgetViews : public internal::NativeWidgetPrivate { virtual void SetBoundsConstrained(const gfx::Rect& bounds, Widget* other_widget) OVERRIDE; virtual void MoveAbove(gfx::NativeView native_view) OVERRIDE; + virtual void MoveToTop() OVERRIDE; virtual void SetShape(gfx::NativeRegion shape) OVERRIDE; virtual void Close() OVERRIDE; virtual void CloseNow() OVERRIDE; diff --git a/views/widget/native_widget_win.cc b/views/widget/native_widget_win.cc index cb1482d..5ffe7f2 100644 --- a/views/widget/native_widget_win.cc +++ b/views/widget/native_widget_win.cc @@ -790,6 +790,10 @@ void NativeWidgetWin::MoveAbove(gfx::NativeView native_view) { SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); } +void NativeWidgetWin::MoveToTop() { + NOTIMPLEMENTED(); +} + void NativeWidgetWin::SetShape(gfx::NativeRegion region) { SetWindowRgn(region, TRUE); } diff --git a/views/widget/native_widget_win.h b/views/widget/native_widget_win.h index dadbc38..ed40644 100644 --- a/views/widget/native_widget_win.h +++ b/views/widget/native_widget_win.h @@ -229,6 +229,7 @@ class NativeWidgetWin : public ui::WindowImpl, virtual void SetBoundsConstrained(const gfx::Rect& bounds, Widget* other_widget) OVERRIDE; virtual void MoveAbove(gfx::NativeView native_view) OVERRIDE; + virtual void MoveToTop() OVERRIDE; virtual void SetShape(gfx::NativeRegion shape) OVERRIDE; virtual void Close() OVERRIDE; virtual void CloseNow() OVERRIDE; diff --git a/views/widget/widget.cc b/views/widget/widget.cc index 8b19ce2..292b081 100644 --- a/views/widget/widget.cc +++ b/views/widget/widget.cc @@ -357,6 +357,10 @@ void Widget::MoveAbove(gfx::NativeView native_view) { native_widget_->MoveAbove(native_view); } +void Widget::MoveToTop() { + native_widget_->MoveToTop(); +} + void Widget::SetShape(gfx::NativeRegion shape) { native_widget_->SetShape(shape); } diff --git a/views/widget/widget.h b/views/widget/widget.h index 1e1b6f8..a320a07 100644 --- a/views/widget/widget.h +++ b/views/widget/widget.h @@ -281,6 +281,7 @@ class Widget : public internal::NativeWidgetDelegate, // Places the widget in front of the specified widget in z-order. void MoveAboveWidget(Widget* widget); void MoveAbove(gfx::NativeView native_view); + void MoveToTop(); // Sets a shape on the widget. This takes ownership of shape. void SetShape(gfx::NativeRegion shape); |