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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 = full_screen; |
| 81 init_params.can_activate = full_screen; |
81 | 82 |
82 // This widget instance will get deleted when the window is | 83 // This widget instance will get deleted when the window is |
83 // destroyed. | 84 // destroyed. |
84 top_level_handler->top_level_widget_ = new Widget(); | 85 top_level_handler->top_level_widget_ = new Widget(); |
85 top_level_handler->top_level_widget_->Init(init_params); | 86 top_level_handler->top_level_widget_->Init(init_params); |
86 | 87 |
87 top_level_handler->top_level_widget_->SetFullscreen(full_screen); | 88 top_level_handler->top_level_widget_->SetFullscreen(full_screen); |
88 top_level_handler->top_level_widget_->Show(); | 89 top_level_handler->top_level_widget_->Show(); |
89 | 90 |
90 aura::Window* native_window = | 91 aura::Window* native_window = |
(...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
961 } | 962 } |
962 | 963 |
963 //////////////////////////////////////////////////////////////////////////////// | 964 //////////////////////////////////////////////////////////////////////////////// |
964 // DesktopNativeWidgetAura, NativeWidget implementation: | 965 // DesktopNativeWidgetAura, NativeWidget implementation: |
965 | 966 |
966 ui::EventHandler* DesktopNativeWidgetAura::GetEventHandler() { | 967 ui::EventHandler* DesktopNativeWidgetAura::GetEventHandler() { |
967 return this; | 968 return this; |
968 } | 969 } |
969 | 970 |
970 } // namespace views | 971 } // namespace views |
OLD | NEW |