Chromium Code Reviews| 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 "ui/views/widget/native_widget_aura.h" | 5 #include "ui/views/widget/native_widget_aura.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "ui/aura/client/activation_client.h" | 9 #include "ui/aura/client/activation_client.h" |
| 10 #include "ui/aura/client/aura_constants.h" | 10 #include "ui/aura/client/aura_constants.h" |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 179 if (window_type == Widget::InitParams::TYPE_CONTROL) { | 179 if (window_type == Widget::InitParams::TYPE_CONTROL) { |
| 180 window_->SetParent(params.GetParent()); | 180 window_->SetParent(params.GetParent()); |
| 181 } else { | 181 } else { |
| 182 // Set up the transient child before the window is added. This way the | 182 // Set up the transient child before the window is added. This way the |
| 183 // LayoutManager knows the window has a transient parent. | 183 // LayoutManager knows the window has a transient parent. |
| 184 gfx::NativeView parent = params.GetParent(); | 184 gfx::NativeView parent = params.GetParent(); |
| 185 if (parent) | 185 if (parent) |
| 186 parent->AddTransientChild(window_); | 186 parent->AddTransientChild(window_); |
| 187 // SetAlwaysOnTop before SetParent so that always-on-top container is used. | 187 // SetAlwaysOnTop before SetParent so that always-on-top container is used. |
| 188 SetAlwaysOnTop(params.keep_on_top); | 188 SetAlwaysOnTop(params.keep_on_top); |
| 189 window_->SetIntProperty(aura::kPanelKey, params.is_panel); | |
|
Ben Goodger (Google)
2011/12/22 23:22:45
So, I looked at code in the aura shell, and I beli
prasadt
2011/12/23 01:51:40
Done.
| |
| 189 window_->SetParent(NULL); | 190 window_->SetParent(NULL); |
| 190 } | 191 } |
| 191 window_->set_ignore_events(!params.accept_events); | 192 window_->set_ignore_events(!params.accept_events); |
| 192 // TODO(beng): do this some other way. | 193 // TODO(beng): do this some other way. |
| 193 delegate_->OnNativeWidgetSizeChanged(params.bounds.size()); | 194 delegate_->OnNativeWidgetSizeChanged(params.bounds.size()); |
| 194 can_activate_ = params.can_activate; | 195 can_activate_ = params.can_activate; |
| 195 DCHECK(GetWidget()->GetRootView()); | 196 DCHECK(GetWidget()->GetRootView()); |
| 196 if (params.type != Widget::InitParams::TYPE_TOOLTIP) { | 197 if (params.type != Widget::InitParams::TYPE_TOOLTIP) { |
| 197 tooltip_manager_.reset(new views::TooltipManagerAura(this)); | 198 tooltip_manager_.reset(new views::TooltipManagerAura(this)); |
| 198 } | 199 } |
| (...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 862 } | 863 } |
| 863 } | 864 } |
| 864 | 865 |
| 865 // static | 866 // static |
| 866 bool NativeWidgetPrivate::IsMouseButtonDown() { | 867 bool NativeWidgetPrivate::IsMouseButtonDown() { |
| 867 return aura::RootWindow::GetInstance()->IsMouseButtonDown(); | 868 return aura::RootWindow::GetInstance()->IsMouseButtonDown(); |
| 868 } | 869 } |
| 869 | 870 |
| 870 } // namespace internal | 871 } // namespace internal |
| 871 } // namespace views | 872 } // namespace views |
| OLD | NEW |