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 "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 NativeWidgetAura::RegisterNativeWidgetForWindow(this, content_window_); | 402 NativeWidgetAura::RegisterNativeWidgetForWindow(this, content_window_); |
403 // Animations on TYPE_WINDOW are handled by the OS. Additionally if we animate | 403 // Animations on TYPE_WINDOW are handled by the OS. Additionally if we animate |
404 // these windows the size of the window gets augmented, effecting restore | 404 // these windows the size of the window gets augmented, effecting restore |
405 // bounds and maximized windows in bad ways. | 405 // bounds and maximized windows in bad ways. |
406 if (params.type == Widget::InitParams::TYPE_WINDOW && | 406 if (params.type == Widget::InitParams::TYPE_WINDOW && |
407 !params.remove_standard_frame) { | 407 !params.remove_standard_frame) { |
408 content_window_->SetProperty(aura::client::kAnimationsDisabledKey, true); | 408 content_window_->SetProperty(aura::client::kAnimationsDisabledKey, true); |
409 } | 409 } |
410 content_window_->SetType(GetAuraWindowTypeForWidgetType(params.type)); | 410 content_window_->SetType(GetAuraWindowTypeForWidgetType(params.type)); |
411 content_window_->Init(params.layer_type); | 411 content_window_->Init(params.layer_type); |
412 wm::SetShadowType(content_window_, wm::SHADOW_TYPE_NONE); | 412 wm::SetShadowElevation(content_window_, wm::ShadowElevation::NONE); |
413 | 413 |
414 content_window_container_ = new aura::Window(NULL); | 414 content_window_container_ = new aura::Window(NULL); |
415 content_window_container_->Init(ui::LAYER_NOT_DRAWN); | 415 content_window_container_->Init(ui::LAYER_NOT_DRAWN); |
416 content_window_container_->Show(); | 416 content_window_container_->Show(); |
417 content_window_container_->AddChild(content_window_); | 417 content_window_container_->AddChild(content_window_); |
418 | 418 |
419 if (!desktop_window_tree_host_) { | 419 if (!desktop_window_tree_host_) { |
420 desktop_window_tree_host_ = | 420 desktop_window_tree_host_ = |
421 params.desktop_window_tree_host | 421 params.desktop_window_tree_host |
422 ? params.desktop_window_tree_host | 422 ? params.desktop_window_tree_host |
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1204 if (cursor_reference_count_ == 0) { | 1204 if (cursor_reference_count_ == 0) { |
1205 // We are the last DesktopNativeWidgetAura instance, and we are responsible | 1205 // We are the last DesktopNativeWidgetAura instance, and we are responsible |
1206 // for cleaning up |cursor_manager_|. | 1206 // for cleaning up |cursor_manager_|. |
1207 delete cursor_manager_; | 1207 delete cursor_manager_; |
1208 native_cursor_manager_ = NULL; | 1208 native_cursor_manager_ = NULL; |
1209 cursor_manager_ = NULL; | 1209 cursor_manager_ = NULL; |
1210 } | 1210 } |
1211 } | 1211 } |
1212 | 1212 |
1213 } // namespace views | 1213 } // namespace views |
OLD | NEW |