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/client/aura_constants.h" | 8 #include "ui/aura/client/aura_constants.h" |
9 #include "ui/aura/desktop.h" | 9 #include "ui/aura/desktop.h" |
10 #include "ui/aura/desktop_observer.h" | 10 #include "ui/aura/desktop_observer.h" |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 } else { | 140 } else { |
141 // Set up the transient child before the window is added. This way the | 141 // Set up the transient child before the window is added. This way the |
142 // LayoutManager knows the window has a transient parent. | 142 // LayoutManager knows the window has a transient parent. |
143 gfx::NativeView parent = params.GetParent(); | 143 gfx::NativeView parent = params.GetParent(); |
144 if (parent) | 144 if (parent) |
145 parent->AddTransientChild(window_); | 145 parent->AddTransientChild(window_); |
146 // SetAlwaysOnTop before SetParent so that always-on-top container is used. | 146 // SetAlwaysOnTop before SetParent so that always-on-top container is used. |
147 SetAlwaysOnTop(params.keep_on_top); | 147 SetAlwaysOnTop(params.keep_on_top); |
148 window_->SetParent(NULL); | 148 window_->SetParent(NULL); |
149 } | 149 } |
| 150 window_->set_ignore_events(!params.accept_events); |
150 // TODO(beng): do this some other way. | 151 // TODO(beng): do this some other way. |
151 delegate_->OnNativeWidgetSizeChanged(params.bounds.size()); | 152 delegate_->OnNativeWidgetSizeChanged(params.bounds.size()); |
152 can_activate_ = params.can_activate; | 153 can_activate_ = params.can_activate; |
153 if (params.type != Widget::InitParams::TYPE_TOOLTIP && !params.child) { | 154 if (params.type != Widget::InitParams::TYPE_TOOLTIP && !params.child) { |
154 DCHECK(GetWidget()->GetRootView()); | 155 DCHECK(GetWidget()->GetRootView()); |
155 views::TooltipManagerViews* manager = new views::TooltipManagerViews( | 156 views::TooltipManagerViews* manager = new views::TooltipManagerViews( |
156 GetWidget()->GetRootView()); | 157 GetWidget()->GetRootView()); |
157 tooltip_manager_.reset(manager); | 158 tooltip_manager_.reset(manager); |
158 } | 159 } |
159 } | 160 } |
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 NOTIMPLEMENTED(); | 723 NOTIMPLEMENTED(); |
723 } | 724 } |
724 | 725 |
725 // static | 726 // static |
726 bool NativeWidgetPrivate::IsMouseButtonDown() { | 727 bool NativeWidgetPrivate::IsMouseButtonDown() { |
727 return aura::Desktop::GetInstance()->IsMouseButtonDown(); | 728 return aura::Desktop::GetInstance()->IsMouseButtonDown(); |
728 } | 729 } |
729 | 730 |
730 } // namespace internal | 731 } // namespace internal |
731 } // namespace views | 732 } // namespace views |
OLD | NEW |