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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "ui/aura/desktop.h" | 8 #include "ui/aura/desktop.h" |
9 #include "ui/aura/event.h" | 9 #include "ui/aura/event.h" |
10 #include "ui/aura/window.h" | 10 #include "ui/aura/window.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 // NativeWidgetAura, internal::NativeWidgetPrivate implementation: | 95 // NativeWidgetAura, internal::NativeWidgetPrivate implementation: |
96 | 96 |
97 void NativeWidgetAura::InitNativeWidget(const Widget::InitParams& params) { | 97 void NativeWidgetAura::InitNativeWidget(const Widget::InitParams& params) { |
98 ownership_ = params.ownership; | 98 ownership_ = params.ownership; |
99 window_->set_user_data(this); | 99 window_->set_user_data(this); |
100 window_->SetType(GetAuraWindowTypeFromInitParams(params)); | 100 window_->SetType(GetAuraWindowTypeFromInitParams(params)); |
101 window_->Init(); | 101 window_->Init(); |
102 // TODO(beng): respect |params| authoritah wrt transparency. | 102 // TODO(beng): respect |params| authoritah wrt transparency. |
103 window_->layer()->SetFillsBoundsOpaquely(false); | 103 window_->layer()->SetFillsBoundsOpaquely(false); |
104 delegate_->OnNativeWidgetCreated(); | 104 delegate_->OnNativeWidgetCreated(); |
| 105 window_->set_minimum_size(delegate_->GetMinimumSize()); |
105 window_->SetBounds(params.bounds); | 106 window_->SetBounds(params.bounds); |
106 window_->SetParent( | 107 window_->SetParent( |
107 params.type == Widget::InitParams::TYPE_MENU ? NULL : params.parent); | 108 params.type == Widget::InitParams::TYPE_MENU ? NULL : params.parent); |
108 // TODO(beng): do this some other way. | 109 // TODO(beng): do this some other way. |
109 delegate_->OnNativeWidgetSizeChanged(params.bounds.size()); | 110 delegate_->OnNativeWidgetSizeChanged(params.bounds.size()); |
110 can_activate_ = params.can_activate; | 111 can_activate_ = params.can_activate; |
111 } | 112 } |
112 | 113 |
113 NonClientFrameView* NativeWidgetAura::CreateNonClientFrameView() { | 114 NonClientFrameView* NativeWidgetAura::CreateNonClientFrameView() { |
114 NOTIMPLEMENTED(); | 115 NOTIMPLEMENTED(); |
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
653 } | 654 } |
654 | 655 |
655 // static | 656 // static |
656 bool NativeWidgetPrivate::IsMouseButtonDown() { | 657 bool NativeWidgetPrivate::IsMouseButtonDown() { |
657 NOTIMPLEMENTED(); | 658 NOTIMPLEMENTED(); |
658 return false; | 659 return false; |
659 } | 660 } |
660 | 661 |
661 } // namespace internal | 662 } // namespace internal |
662 } // namespace views | 663 } // namespace views |
OLD | NEW |