| 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> |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "base/macros.h" | 27 #include "base/macros.h" |
| 28 #include "base/memory/ptr_util.h" | 28 #include "base/memory/ptr_util.h" |
| 29 #include "base/strings/utf_string_conversions.h" | 29 #include "base/strings/utf_string_conversions.h" |
| 30 #include "services/ui/public/interfaces/window_manager.mojom.h" | 30 #include "services/ui/public/interfaces/window_manager.mojom.h" |
| 31 #include "ui/aura/client/aura_constants.h" | 31 #include "ui/aura/client/aura_constants.h" |
| 32 #include "ui/aura/mus/property_converter.h" | 32 #include "ui/aura/mus/property_converter.h" |
| 33 #include "ui/aura/mus/property_utils.h" | 33 #include "ui/aura/mus/property_utils.h" |
| 34 #include "ui/aura/mus/window_manager_delegate.h" | 34 #include "ui/aura/mus/window_manager_delegate.h" |
| 35 #include "ui/aura/mus/window_port_mus.h" | 35 #include "ui/aura/mus/window_port_mus.h" |
| 36 #include "ui/aura/window.h" | 36 #include "ui/aura/window.h" |
| 37 #include "ui/aura/window_property.h" | 37 #include "ui/base/class_property.h" |
| 38 #include "ui/base/hit_test.h" | 38 #include "ui/base/hit_test.h" |
| 39 #include "ui/compositor/layer.h" | 39 #include "ui/compositor/layer.h" |
| 40 #include "ui/gfx/geometry/vector2d.h" | 40 #include "ui/gfx/geometry/vector2d.h" |
| 41 #include "ui/views/widget/native_widget_aura.h" | 41 #include "ui/views/widget/native_widget_aura.h" |
| 42 #include "ui/views/widget/widget.h" | 42 #include "ui/views/widget/widget.h" |
| 43 | 43 |
| 44 DECLARE_WINDOW_PROPERTY_TYPE(ash::mus::NonClientFrameController*); | 44 DECLARE_CLASS_PROPERTY_TYPE(ash::mus::NonClientFrameController*); |
| 45 | 45 |
| 46 namespace ash { | 46 namespace ash { |
| 47 namespace mus { | 47 namespace mus { |
| 48 namespace { | 48 namespace { |
| 49 | 49 |
| 50 DEFINE_WINDOW_PROPERTY_KEY(NonClientFrameController*, | 50 DEFINE_CLASS_PROPERTY_KEY(NonClientFrameController*, |
| 51 kNonClientFrameControllerKey, | 51 kNonClientFrameControllerKey, |
| 52 nullptr); | 52 nullptr); |
| 53 | 53 |
| 54 // This class supports draggable app windows that paint their own custom frames. | 54 // This class supports draggable app windows that paint their own custom frames. |
| 55 // It uses empty insets, doesn't paint anything, and hit tests return HTCAPTION. | 55 // It uses empty insets, doesn't paint anything, and hit tests return HTCAPTION. |
| 56 class EmptyDraggableNonClientFrameView : public views::NonClientFrameView { | 56 class EmptyDraggableNonClientFrameView : public views::NonClientFrameView { |
| 57 public: | 57 public: |
| 58 EmptyDraggableNonClientFrameView() {} | 58 EmptyDraggableNonClientFrameView() {} |
| 59 ~EmptyDraggableNonClientFrameView() override {} | 59 ~EmptyDraggableNonClientFrameView() override {} |
| 60 | 60 |
| 61 // views::NonClientFrameView: | 61 // views::NonClientFrameView: |
| 62 gfx::Rect GetBoundsForClientView() const override { return bounds(); } | 62 gfx::Rect GetBoundsForClientView() const override { return bounds(); } |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 } | 450 } |
| 451 } | 451 } |
| 452 | 452 |
| 453 void NonClientFrameController::OnWindowDestroyed(aura::Window* window) { | 453 void NonClientFrameController::OnWindowDestroyed(aura::Window* window) { |
| 454 window_->RemoveObserver(this); | 454 window_->RemoveObserver(this); |
| 455 window_ = nullptr; | 455 window_ = nullptr; |
| 456 } | 456 } |
| 457 | 457 |
| 458 } // namespace mus | 458 } // namespace mus |
| 459 } // namespace ash | 459 } // namespace ash |
| OLD | NEW |