| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/non_client_frame_controller.h" | 5 #include "ash/mus/non_client_frame_controller.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "ash/common/ash_constants.h" | 13 #include "ash/common/ash_constants.h" |
| 14 #include "ash/common/ash_layout_constants.h" | 14 #include "ash/common/ash_layout_constants.h" |
| 15 #include "ash/common/frame/custom_frame_view_ash.h" | 15 #include "ash/common/frame/custom_frame_view_ash.h" |
| 16 #include "ash/common/wm/panels/panel_frame_view.h" |
| 16 #include "ash/mus/bridge/wm_window_mus.h" | 17 #include "ash/mus/bridge/wm_window_mus.h" |
| 17 #include "ash/mus/frame/custom_frame_view_mus.h" | 18 #include "ash/mus/frame/custom_frame_view_mus.h" |
| 18 #include "ash/mus/frame/detached_title_area_renderer.h" | 19 #include "ash/mus/frame/detached_title_area_renderer.h" |
| 19 #include "ash/mus/move_event_handler.h" | 20 #include "ash/mus/move_event_handler.h" |
| 20 #include "ash/mus/property_util.h" | 21 #include "ash/mus/property_util.h" |
| 21 #include "ash/mus/shadow.h" | 22 #include "ash/mus/shadow.h" |
| 22 #include "ash/shared/immersive_fullscreen_controller_delegate.h" | 23 #include "ash/shared/immersive_fullscreen_controller_delegate.h" |
| 23 #include "base/macros.h" | 24 #include "base/macros.h" |
| 24 #include "base/strings/utf_string_conversions.h" | 25 #include "base/strings/utf_string_conversions.h" |
| 25 #include "services/ui/public/cpp/property_type_converters.h" | 26 #include "services/ui/public/cpp/property_type_converters.h" |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 : NativeWidgetMus(delegate, window, ui::mojom::SurfaceType::UNDERLAY), | 225 : NativeWidgetMus(delegate, window, ui::mojom::SurfaceType::UNDERLAY), |
| 225 window_manager_client_(window_manager_client) {} | 226 window_manager_client_(window_manager_client) {} |
| 226 ~WmNativeWidgetMus() override {} | 227 ~WmNativeWidgetMus() override {} |
| 227 | 228 |
| 228 // NativeWidgetMus: | 229 // NativeWidgetMus: |
| 229 views::NonClientFrameView* CreateNonClientFrameView() override { | 230 views::NonClientFrameView* CreateNonClientFrameView() override { |
| 230 move_event_handler_.reset(new MoveEventHandler( | 231 move_event_handler_.reset(new MoveEventHandler( |
| 231 window(), window_manager_client_, GetNativeView())); | 232 window(), window_manager_client_, GetNativeView())); |
| 232 if (ShouldRemoveStandardFrame(window())) | 233 if (ShouldRemoveStandardFrame(window())) |
| 233 return new EmptyDraggableNonClientFrameView(); | 234 return new EmptyDraggableNonClientFrameView(); |
| 235 if (GetWindowType(window()) == ui::mojom::WindowType::PANEL) |
| 236 return new PanelFrameView(GetWidget(), PanelFrameView::FRAME_ASH); |
| 234 immersive_delegate_.reset( | 237 immersive_delegate_.reset( |
| 235 new ImmersiveFullscreenControllerDelegateMus(GetWidget(), window())); | 238 new ImmersiveFullscreenControllerDelegateMus(GetWidget(), window())); |
| 236 const bool enable_immersive = | 239 const bool enable_immersive = |
| 237 !window()->HasSharedProperty( | 240 !window()->HasSharedProperty( |
| 238 ui::mojom::WindowManager::kDisableImmersive_Property) || | 241 ui::mojom::WindowManager::kDisableImmersive_Property) || |
| 239 !window()->GetSharedProperty<bool>( | 242 !window()->GetSharedProperty<bool>( |
| 240 ui::mojom::WindowManager::kDisableImmersive_Property); | 243 ui::mojom::WindowManager::kDisableImmersive_Property); |
| 241 return new CustomFrameViewMus(GetWidget(), immersive_delegate_.get(), | 244 return new CustomFrameViewMus(GetWidget(), immersive_delegate_.get(), |
| 242 enable_immersive); | 245 enable_immersive); |
| 243 } | 246 } |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 } | 457 } |
| 455 } | 458 } |
| 456 | 459 |
| 457 void NonClientFrameController::OnWindowDestroyed(ui::Window* window) { | 460 void NonClientFrameController::OnWindowDestroyed(ui::Window* window) { |
| 458 window_->RemoveObserver(this); | 461 window_->RemoveObserver(this); |
| 459 window_ = nullptr; | 462 window_ = nullptr; |
| 460 } | 463 } |
| 461 | 464 |
| 462 } // namespace mus | 465 } // namespace mus |
| 463 } // namespace ash | 466 } // namespace ash |
| OLD | NEW |