| 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 "mash/wm/non_client_frame_controller.h" | 5 #include "mash/wm/non_client_frame_controller.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "components/mus/public/cpp/property_type_converters.h" | 10 #include "components/mus/public/cpp/property_type_converters.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 aura::Window* window_; | 83 aura::Window* window_; |
| 84 const ShadowStyle style_; | 84 const ShadowStyle style_; |
| 85 Shadow* shadow_; | 85 Shadow* shadow_; |
| 86 | 86 |
| 87 DISALLOW_COPY_AND_ASSIGN(ContentWindowLayoutManager); | 87 DISALLOW_COPY_AND_ASSIGN(ContentWindowLayoutManager); |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 class WmNativeWidgetMus : public views::NativeWidgetMus { | 90 class WmNativeWidgetMus : public views::NativeWidgetMus { |
| 91 public: | 91 public: |
| 92 WmNativeWidgetMus(views::internal::NativeWidgetDelegate* delegate, | 92 WmNativeWidgetMus(views::internal::NativeWidgetDelegate* delegate, |
| 93 mojo::Shell* shell, | 93 mojo::shell::mojom::Shell* shell, |
| 94 mus::Window* window) | 94 mus::Window* window) |
| 95 : NativeWidgetMus(delegate, | 95 : NativeWidgetMus(delegate, |
| 96 shell, | 96 shell, |
| 97 window, | 97 window, |
| 98 mus::mojom::SurfaceType::UNDERLAY) {} | 98 mus::mojom::SurfaceType::UNDERLAY) {} |
| 99 ~WmNativeWidgetMus() override { | 99 ~WmNativeWidgetMus() override { |
| 100 } | 100 } |
| 101 | 101 |
| 102 // NativeWidgetMus: | 102 // NativeWidgetMus: |
| 103 views::NonClientFrameView* CreateNonClientFrameView() override { | 103 views::NonClientFrameView* CreateNonClientFrameView() override { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 161 |
| 162 private: | 162 private: |
| 163 NonClientFrameController* frame_controller_; | 163 NonClientFrameController* frame_controller_; |
| 164 | 164 |
| 165 DISALLOW_COPY_AND_ASSIGN(ClientViewMus); | 165 DISALLOW_COPY_AND_ASSIGN(ClientViewMus); |
| 166 }; | 166 }; |
| 167 | 167 |
| 168 } // namespace | 168 } // namespace |
| 169 | 169 |
| 170 NonClientFrameController::NonClientFrameController( | 170 NonClientFrameController::NonClientFrameController( |
| 171 mojo::Shell* shell, | 171 mojo::shell::mojom::Shell* shell, |
| 172 mus::Window* window, | 172 mus::Window* window, |
| 173 mus::WindowManagerClient* window_manager_client) | 173 mus::WindowManagerClient* window_manager_client) |
| 174 : widget_(new views::Widget), window_(window) { | 174 : widget_(new views::Widget), window_(window) { |
| 175 window_->AddObserver(this); | 175 window_->AddObserver(this); |
| 176 | 176 |
| 177 views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW); | 177 views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW); |
| 178 // We initiate focus at the mus level, not at the views level. | 178 // We initiate focus at the mus level, not at the views level. |
| 179 params.activatable = views::Widget::InitParams::ACTIVATABLE_NO; | 179 params.activatable = views::Widget::InitParams::ACTIVATABLE_NO; |
| 180 params.delegate = this; | 180 params.delegate = this; |
| 181 params.native_widget = new WmNativeWidgetMus(widget_, shell, window); | 181 params.native_widget = new WmNativeWidgetMus(widget_, shell, window); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 widget_->UpdateWindowTitle(); | 252 widget_->UpdateWindowTitle(); |
| 253 } | 253 } |
| 254 | 254 |
| 255 void NonClientFrameController::OnWindowDestroyed(mus::Window* window) { | 255 void NonClientFrameController::OnWindowDestroyed(mus::Window* window) { |
| 256 window_->RemoveObserver(this); | 256 window_->RemoveObserver(this); |
| 257 window_ = nullptr; | 257 window_ = nullptr; |
| 258 } | 258 } |
| 259 | 259 |
| 260 } // namespace wm | 260 } // namespace wm |
| 261 } // namespace mash | 261 } // namespace mash |
| OLD | NEW |