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/native_widget_views.h" | 5 #include "views/widget/native_widget_views.h" |
6 | 6 |
7 #include "views/view.h" | 7 #include "views/view.h" |
8 #include "views/widget/native_widget_view.h" | 8 #include "views/widget/native_widget_view.h" |
9 | 9 |
10 namespace views { | 10 namespace views { |
(...skipping 24 matching lines...) Expand all Loading... |
35 void NativeWidgetViews::OnActivate(bool active) { | 35 void NativeWidgetViews::OnActivate(bool active) { |
36 active_ = active; | 36 active_ = active; |
37 view_->SchedulePaint(); | 37 view_->SchedulePaint(); |
38 } | 38 } |
39 | 39 |
40 //////////////////////////////////////////////////////////////////////////////// | 40 //////////////////////////////////////////////////////////////////////////////// |
41 // NativeWidgetViews, NativeWidget implementation: | 41 // NativeWidgetViews, NativeWidget implementation: |
42 | 42 |
43 void NativeWidgetViews::InitNativeWidget(const Widget::InitParams& params) { | 43 void NativeWidgetViews::InitNativeWidget(const Widget::InitParams& params) { |
44 view_ = new internal::NativeWidgetView(this); | 44 view_ = new internal::NativeWidgetView(this); |
| 45 view_->SetPaintToTexture(true); |
45 host_view_->AddChildView(view_); | 46 host_view_->AddChildView(view_); |
46 | 47 |
47 // TODO(beng): handle parenting. | 48 // TODO(beng): handle parenting. |
48 // TODO(beng): SetInitParams(). | 49 // TODO(beng): SetInitParams(). |
49 } | 50 } |
50 | 51 |
51 NonClientFrameView* NativeWidgetViews::CreateNonClientFrameView() { | 52 NonClientFrameView* NativeWidgetViews::CreateNonClientFrameView() { |
52 return NULL; | 53 return NULL; |
53 } | 54 } |
54 | 55 |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 void NativeWidgetViews::SetBoundsConstrained(const gfx::Rect& bounds, | 196 void NativeWidgetViews::SetBoundsConstrained(const gfx::Rect& bounds, |
196 Widget* other_widget) { | 197 Widget* other_widget) { |
197 // TODO(beng): honor other_widget. | 198 // TODO(beng): honor other_widget. |
198 SetBounds(bounds); | 199 SetBounds(bounds); |
199 } | 200 } |
200 | 201 |
201 void NativeWidgetViews::MoveAbove(gfx::NativeView native_view) { | 202 void NativeWidgetViews::MoveAbove(gfx::NativeView native_view) { |
202 NOTIMPLEMENTED(); | 203 NOTIMPLEMENTED(); |
203 } | 204 } |
204 | 205 |
| 206 void NativeWidgetViews::MoveToTop() { |
| 207 host_view_->ReorderChildView(view_, -1); |
| 208 } |
| 209 |
205 void NativeWidgetViews::SetShape(gfx::NativeRegion region) { | 210 void NativeWidgetViews::SetShape(gfx::NativeRegion region) { |
206 NOTIMPLEMENTED(); | 211 NOTIMPLEMENTED(); |
207 } | 212 } |
208 | 213 |
209 void NativeWidgetViews::Close() { | 214 void NativeWidgetViews::Close() { |
210 Hide(); | 215 Hide(); |
211 if (close_widget_factory_.empty()) { | 216 if (close_widget_factory_.empty()) { |
212 MessageLoop::current()->PostTask(FROM_HERE, | 217 MessageLoop::current()->PostTask(FROM_HERE, |
213 close_widget_factory_.NewRunnableMethod(&NativeWidgetViews::CloseNow)); | 218 close_widget_factory_.NewRunnableMethod(&NativeWidgetViews::CloseNow)); |
214 } | 219 } |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 NativeWidget* NativeWidgetViews::GetParentNativeWidget() { | 327 NativeWidget* NativeWidgetViews::GetParentNativeWidget() { |
323 return view_->GetWidget()->native_widget(); | 328 return view_->GetWidget()->native_widget(); |
324 } | 329 } |
325 | 330 |
326 const NativeWidget* NativeWidgetViews::GetParentNativeWidget() const { | 331 const NativeWidget* NativeWidgetViews::GetParentNativeWidget() const { |
327 return view_->GetWidget()->native_widget(); | 332 return view_->GetWidget()->native_widget(); |
328 } | 333 } |
329 | 334 |
330 } // namespace views | 335 } // namespace views |
331 | 336 |
OLD | NEW |