OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/desktop_aura/desktop_native_widget_aura.h" | 5 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "ui/aura/client/activation_client.h" | 8 #include "ui/aura/client/activation_client.h" |
9 #include "ui/aura/client/aura_constants.h" | 9 #include "ui/aura/client/aura_constants.h" |
10 #include "ui/aura/client/cursor_client.h" | 10 #include "ui/aura/client/cursor_client.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
70 new DesktopNativeWidgetTopLevelHandler; | 70 new DesktopNativeWidgetTopLevelHandler; |
71 | 71 |
72 child_window->SetBounds(gfx::Rect(bounds.size())); | 72 child_window->SetBounds(gfx::Rect(bounds.size())); |
73 | 73 |
74 Widget::InitParams init_params; | 74 Widget::InitParams init_params; |
75 init_params.type = full_screen ? Widget::InitParams::TYPE_WINDOW : | 75 init_params.type = full_screen ? Widget::InitParams::TYPE_WINDOW : |
76 Widget::InitParams::TYPE_POPUP; | 76 Widget::InitParams::TYPE_POPUP; |
77 init_params.bounds = bounds; | 77 init_params.bounds = bounds; |
78 init_params.ownership = Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET; | 78 init_params.ownership = Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET; |
79 init_params.layer_type = ui::LAYER_NOT_DRAWN; | 79 init_params.layer_type = ui::LAYER_NOT_DRAWN; |
80 init_params.accept_events = full_screen; | 80 init_params.accept_events = true; |
sky
2013/09/06 22:11:12
You an nuke this entirely now (since true is the d
ananta
2013/09/06 22:21:49
Done.
| |
81 init_params.can_activate = full_screen; | 81 init_params.can_activate = full_screen; |
82 | |
83 // This widget instance will get deleted when the window is | 82 // This widget instance will get deleted when the window is |
84 // destroyed. | 83 // destroyed. |
85 top_level_handler->top_level_widget_ = new Widget(); | 84 top_level_handler->top_level_widget_ = new Widget(); |
86 top_level_handler->top_level_widget_->Init(init_params); | 85 top_level_handler->top_level_widget_->Init(init_params); |
87 | 86 |
88 top_level_handler->top_level_widget_->SetFullscreen(full_screen); | 87 top_level_handler->top_level_widget_->SetFullscreen(full_screen); |
89 top_level_handler->top_level_widget_->Show(); | 88 top_level_handler->top_level_widget_->Show(); |
90 | 89 |
91 aura::Window* native_window = | 90 aura::Window* native_window = |
92 top_level_handler->top_level_widget_->GetNativeView(); | 91 top_level_handler->top_level_widget_->GetNativeView(); |
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
962 } | 961 } |
963 | 962 |
964 //////////////////////////////////////////////////////////////////////////////// | 963 //////////////////////////////////////////////////////////////////////////////// |
965 // DesktopNativeWidgetAura, NativeWidget implementation: | 964 // DesktopNativeWidgetAura, NativeWidget implementation: |
966 | 965 |
967 ui::EventHandler* DesktopNativeWidgetAura::GetEventHandler() { | 966 ui::EventHandler* DesktopNativeWidgetAura::GetEventHandler() { |
968 return this; | 967 return this; |
969 } | 968 } |
970 | 969 |
971 } // namespace views | 970 } // namespace views |
OLD | NEW |