| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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); | 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_->Show(); |
| 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; |
| 73 } | 73 } |
| 74 | 74 |
| 75 void NativeWidgetAura::UpdateFrameAfterFrameChange() { | 75 void NativeWidgetAura::UpdateFrameAfterFrameChange() { |
| 76 NOTIMPLEMENTED(); | 76 NOTIMPLEMENTED(); |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 | 257 |
| 258 void NativeWidgetAura::CloseNow() { | 258 void NativeWidgetAura::CloseNow() { |
| 259 delete window_; | 259 delete window_; |
| 260 } | 260 } |
| 261 | 261 |
| 262 void NativeWidgetAura::EnableClose(bool enable) { | 262 void NativeWidgetAura::EnableClose(bool enable) { |
| 263 NOTIMPLEMENTED(); | 263 NOTIMPLEMENTED(); |
| 264 } | 264 } |
| 265 | 265 |
| 266 void NativeWidgetAura::Show() { | 266 void NativeWidgetAura::Show() { |
| 267 window_->SetVisibility(aura::Window::VISIBILITY_SHOWN); | 267 window_->Show(); |
| 268 } | 268 } |
| 269 | 269 |
| 270 void NativeWidgetAura::Hide() { | 270 void NativeWidgetAura::Hide() { |
| 271 window_->SetVisibility(aura::Window::VISIBILITY_HIDDEN); | 271 window_->Hide(); |
| 272 } | 272 } |
| 273 | 273 |
| 274 void NativeWidgetAura::ShowMaximizedWithBounds( | 274 void NativeWidgetAura::ShowMaximizedWithBounds( |
| 275 const gfx::Rect& restored_bounds) { | 275 const gfx::Rect& restored_bounds) { |
| 276 NOTIMPLEMENTED(); | 276 NOTIMPLEMENTED(); |
| 277 } | 277 } |
| 278 | 278 |
| 279 void NativeWidgetAura::ShowWithWindowState(ui::WindowShowState state) { | 279 void NativeWidgetAura::ShowWithWindowState(ui::WindowShowState state) { |
| 280 window_->SetVisibility(aura::Window::VISIBILITY_SHOWN); | 280 window_->Show(); |
| 281 NOTIMPLEMENTED(); | 281 NOTIMPLEMENTED(); |
| 282 } | 282 } |
| 283 | 283 |
| 284 bool NativeWidgetAura::IsVisible() const { | 284 bool NativeWidgetAura::IsVisible() const { |
| 285 return window_->visibility() != aura::Window::VISIBILITY_HIDDEN; | 285 return window_->visible(); |
| 286 } | 286 } |
| 287 | 287 |
| 288 void NativeWidgetAura::Activate() { | 288 void NativeWidgetAura::Activate() { |
| 289 NOTIMPLEMENTED(); | 289 NOTIMPLEMENTED(); |
| 290 } | 290 } |
| 291 | 291 |
| 292 void NativeWidgetAura::Deactivate() { | 292 void NativeWidgetAura::Deactivate() { |
| 293 NOTIMPLEMENTED(); | 293 NOTIMPLEMENTED(); |
| 294 } | 294 } |
| 295 | 295 |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 } | 521 } |
| 522 | 522 |
| 523 // static | 523 // static |
| 524 bool NativeWidgetPrivate::IsMouseButtonDown() { | 524 bool NativeWidgetPrivate::IsMouseButtonDown() { |
| 525 NOTIMPLEMENTED(); | 525 NOTIMPLEMENTED(); |
| 526 return false; | 526 return false; |
| 527 } | 527 } |
| 528 | 528 |
| 529 } // namespace internal | 529 } // namespace internal |
| 530 } // namespace views | 530 } // namespace views |
| OLD | NEW |