| 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_aura.h" | 5 #include "views/widget/native_widget_aura.h" |
| 6 | 6 |
| 7 #include "ui/aura/event.h" | 7 #include "ui/aura/event.h" |
| 8 #include "ui/aura/window.h" | 8 #include "ui/aura/window.h" |
| 9 #include "ui/gfx/canvas.h" | 9 #include "ui/gfx/canvas.h" |
| 10 #include "ui/gfx/compositor/layer.h" | 10 #include "ui/gfx/compositor/layer.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 } | 52 } |
| 53 | 53 |
| 54 //////////////////////////////////////////////////////////////////////////////// | 54 //////////////////////////////////////////////////////////////////////////////// |
| 55 // NativeWidgetAura, internal::NativeWidgetPrivate implementation: | 55 // NativeWidgetAura, internal::NativeWidgetPrivate implementation: |
| 56 | 56 |
| 57 void NativeWidgetAura::InitNativeWidget(const Widget::InitParams& params) { | 57 void NativeWidgetAura::InitNativeWidget(const Widget::InitParams& params) { |
| 58 ownership_ = params.ownership; | 58 ownership_ = params.ownership; |
| 59 window_->set_user_data(this); | 59 window_->set_user_data(this); |
| 60 window_->Init(); | 60 window_->Init(); |
| 61 delegate_->OnNativeWidgetCreated(); | 61 delegate_->OnNativeWidgetCreated(); |
| 62 window_->SetBounds(params.bounds, 0); | 62 window_->SetBounds(params.bounds); |
| 63 window_->SetParent(params.parent); | 63 window_->SetParent(params.parent); |
| 64 // TODO(beng): do this some other way. | 64 // TODO(beng): do this some other way. |
| 65 delegate_->OnNativeWidgetSizeChanged(params.bounds.size()); | 65 delegate_->OnNativeWidgetSizeChanged(params.bounds.size()); |
| 66 window_->SetVisibility(aura::Window::VISIBILITY_SHOWN); | 66 window_->SetVisibility(aura::Window::VISIBILITY_SHOWN); |
| 67 can_activate_ = params.can_activate; | 67 can_activate_ = params.can_activate; |
| 68 } | 68 } |
| 69 | 69 |
| 70 NonClientFrameView* NativeWidgetAura::CreateNonClientFrameView() { | 70 NonClientFrameView* NativeWidgetAura::CreateNonClientFrameView() { |
| 71 NOTIMPLEMENTED(); | 71 NOTIMPLEMENTED(); |
| 72 return NULL; | 72 return NULL; |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 // TODO(beng): | 211 // TODO(beng): |
| 212 return window_->bounds(); | 212 return window_->bounds(); |
| 213 } | 213 } |
| 214 | 214 |
| 215 gfx::Rect NativeWidgetAura::GetRestoredBounds() const { | 215 gfx::Rect NativeWidgetAura::GetRestoredBounds() const { |
| 216 // TODO(beng): | 216 // TODO(beng): |
| 217 return window_->bounds(); | 217 return window_->bounds(); |
| 218 } | 218 } |
| 219 | 219 |
| 220 void NativeWidgetAura::SetBounds(const gfx::Rect& bounds) { | 220 void NativeWidgetAura::SetBounds(const gfx::Rect& bounds) { |
| 221 window_->SetBounds(bounds, 0); | 221 window_->SetBounds(bounds); |
| 222 } | 222 } |
| 223 | 223 |
| 224 void NativeWidgetAura::SetSize(const gfx::Size& size) { | 224 void NativeWidgetAura::SetSize(const gfx::Size& size) { |
| 225 window_->SetBounds(gfx::Rect(window_->bounds().origin(), size), 0); | 225 window_->SetBounds(gfx::Rect(window_->bounds().origin(), size)); |
| 226 } | 226 } |
| 227 | 227 |
| 228 void NativeWidgetAura::SetBoundsConstrained(const gfx::Rect& bounds, | 228 void NativeWidgetAura::SetBoundsConstrained(const gfx::Rect& bounds, |
| 229 Widget* other_widget) { | 229 Widget* other_widget) { |
| 230 NOTIMPLEMENTED(); | 230 NOTIMPLEMENTED(); |
| 231 } | 231 } |
| 232 | 232 |
| 233 void NativeWidgetAura::MoveAbove(gfx::NativeView native_view) { | 233 void NativeWidgetAura::MoveAbove(gfx::NativeView native_view) { |
| 234 NOTIMPLEMENTED(); | 234 NOTIMPLEMENTED(); |
| 235 } | 235 } |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 } | 518 } |
| 519 | 519 |
| 520 // static | 520 // static |
| 521 bool NativeWidgetPrivate::IsMouseButtonDown() { | 521 bool NativeWidgetPrivate::IsMouseButtonDown() { |
| 522 NOTIMPLEMENTED(); | 522 NOTIMPLEMENTED(); |
| 523 return false; | 523 return false; |
| 524 } | 524 } |
| 525 | 525 |
| 526 } // namespace internal | 526 } // namespace internal |
| 527 } // namespace views | 527 } // namespace views |
| OLD | NEW |