| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "ash/mus/frame/detached_title_area_renderer.h" | 5 #include "ash/mus/frame/detached_title_area_renderer.h" |
| 6 | 6 |
| 7 #include "ash/frame/header_view.h" | 7 #include "ash/frame/header_view.h" |
| 8 #include "ash/mus/property_util.h" | 8 #include "ash/mus/property_util.h" |
| 9 #include "ash/mus/window_manager.h" | 9 #include "ash/mus/window_manager.h" |
| 10 #include "ash/wm/window_state.h" | 10 #include "ash/wm/window_state.h" |
| 11 #include "ash/wm_window.h" | |
| 12 #include "ui/aura/client/aura_constants.h" | 11 #include "ui/aura/client/aura_constants.h" |
| 13 #include "ui/aura/client/transient_window_client.h" | 12 #include "ui/aura/client/transient_window_client.h" |
| 14 #include "ui/aura/mus/property_converter.h" | 13 #include "ui/aura/mus/property_converter.h" |
| 15 #include "ui/aura/mus/property_utils.h" | 14 #include "ui/aura/mus/property_utils.h" |
| 16 #include "ui/aura/window.h" | 15 #include "ui/aura/window.h" |
| 17 #include "ui/base/class_property.h" | 16 #include "ui/base/class_property.h" |
| 18 #include "ui/views/view.h" | 17 #include "ui/views/view.h" |
| 19 #include "ui/views/widget/native_widget_aura.h" | 18 #include "ui/views/widget/native_widget_aura.h" |
| 20 #include "ui/views/widget/widget.h" | 19 #include "ui/views/widget/widget.h" |
| 21 | 20 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 46 params->activatable = views::Widget::InitParams::ACTIVATABLE_NO; | 45 params->activatable = views::Widget::InitParams::ACTIVATABLE_NO; |
| 47 return params; | 46 return params; |
| 48 } | 47 } |
| 49 | 48 |
| 50 // Configures properties common to both types. | 49 // Configures properties common to both types. |
| 51 void ConfigureCommonWidgetProperties(views::Widget* widget) { | 50 void ConfigureCommonWidgetProperties(views::Widget* widget) { |
| 52 aura::Window* window = widget->GetNativeView(); | 51 aura::Window* window = widget->GetNativeView(); |
| 53 // Default animations conflict with the reveal animation, so turn off the | 52 // Default animations conflict with the reveal animation, so turn off the |
| 54 // default animation. | 53 // default animation. |
| 55 window->SetProperty(aura::client::kAnimationsDisabledKey, true); | 54 window->SetProperty(aura::client::kAnimationsDisabledKey, true); |
| 56 WmWindow::Get(window)->GetWindowState()->set_ignored_by_shelf(true); | 55 wm::GetWindowState(window)->set_ignored_by_shelf(true); |
| 57 } | 56 } |
| 58 | 57 |
| 59 void CreateHeaderView(views::Widget* frame, | 58 void CreateHeaderView(views::Widget* frame, |
| 60 views::Widget* detached_widget, | 59 views::Widget* detached_widget, |
| 61 Source source) { | 60 Source source) { |
| 62 HeaderView* header_view = new HeaderView(frame); | 61 HeaderView* header_view = new HeaderView(frame); |
| 63 if (source == Source::CLIENT) { | 62 if (source == Source::CLIENT) { |
| 64 // HeaderView behaves differently when the widget it is associated with is | 63 // HeaderView behaves differently when the widget it is associated with is |
| 65 // fullscreen (HeaderView is normally the | 64 // fullscreen (HeaderView is normally the |
| 66 // ImmersiveFullscreenControllerDelegate). Set this as when creating for | 65 // ImmersiveFullscreenControllerDelegate). Set this as when creating for |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 } | 137 } |
| 139 | 138 |
| 140 void DetachedTitleAreaRendererForClient::DeleteDelegate() { | 139 void DetachedTitleAreaRendererForClient::DeleteDelegate() { |
| 141 delete this; | 140 delete this; |
| 142 } | 141 } |
| 143 | 142 |
| 144 DetachedTitleAreaRendererForClient::~DetachedTitleAreaRendererForClient() {} | 143 DetachedTitleAreaRendererForClient::~DetachedTitleAreaRendererForClient() {} |
| 145 | 144 |
| 146 } // namespace mus | 145 } // namespace mus |
| 147 } // namespace ash | 146 } // namespace ash |
| OLD | NEW |