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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 // NativeWidgetAura, internal::NativeWidgetPrivate implementation: | 92 // NativeWidgetAura, internal::NativeWidgetPrivate implementation: |
93 | 93 |
94 void NativeWidgetAura::InitNativeWidget(const Widget::InitParams& params) { | 94 void NativeWidgetAura::InitNativeWidget(const Widget::InitParams& params) { |
95 ownership_ = params.ownership; | 95 ownership_ = params.ownership; |
96 window_->set_user_data(this); | 96 window_->set_user_data(this); |
97 window_->SetType(GetAuraWindowTypeFromInitParams(params)); | 97 window_->SetType(GetAuraWindowTypeFromInitParams(params)); |
98 window_->Init(); | 98 window_->Init(); |
99 // TODO(beng): respect |params| authoritah wrt transparency. | 99 // TODO(beng): respect |params| authoritah wrt transparency. |
100 window_->layer()->SetFillsBoundsOpaquely(false); | 100 window_->layer()->SetFillsBoundsOpaquely(false); |
101 delegate_->OnNativeWidgetCreated(); | 101 delegate_->OnNativeWidgetCreated(); |
| 102 window_->SetMinimumSize(delegate_->GetMinimumSize()); |
102 window_->SetBounds(params.bounds); | 103 window_->SetBounds(params.bounds); |
103 window_->SetParent( | 104 window_->SetParent( |
104 params.type == Widget::InitParams::TYPE_MENU ? NULL : params.parent); | 105 params.type == Widget::InitParams::TYPE_MENU ? NULL : params.parent); |
105 // TODO(beng): do this some other way. | 106 // TODO(beng): do this some other way. |
106 delegate_->OnNativeWidgetSizeChanged(params.bounds.size()); | 107 delegate_->OnNativeWidgetSizeChanged(params.bounds.size()); |
107 can_activate_ = params.can_activate; | 108 can_activate_ = params.can_activate; |
108 } | 109 } |
109 | 110 |
110 NonClientFrameView* NativeWidgetAura::CreateNonClientFrameView() { | 111 NonClientFrameView* NativeWidgetAura::CreateNonClientFrameView() { |
111 NOTIMPLEMENTED(); | 112 NOTIMPLEMENTED(); |
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
634 } | 635 } |
635 | 636 |
636 // static | 637 // static |
637 bool NativeWidgetPrivate::IsMouseButtonDown() { | 638 bool NativeWidgetPrivate::IsMouseButtonDown() { |
638 NOTIMPLEMENTED(); | 639 NOTIMPLEMENTED(); |
639 return false; | 640 return false; |
640 } | 641 } |
641 | 642 |
642 } // namespace internal | 643 } // namespace internal |
643 } // namespace views | 644 } // namespace views |
OLD | NEW |