| 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 "ui/views/mus/native_widget_mus.h" | 5 #include "ui/views/mus/native_widget_mus.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/thread_task_runner_handle.h" | 8 #include "base/thread_task_runner_handle.h" |
| 9 #include "components/mus/public/cpp/property_type_converters.h" | 9 #include "components/mus/public/cpp/property_type_converters.h" |
| 10 #include "components/mus/public/cpp/window.h" | 10 #include "components/mus/public/cpp/window.h" |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 content_->Show(); | 302 content_->Show(); |
| 303 content_->SetTransparent(true); | 303 content_->SetTransparent(true); |
| 304 content_->SetFillsBoundsCompletely(false); | 304 content_->SetFillsBoundsCompletely(false); |
| 305 | 305 |
| 306 window_tree_host_->window()->AddChild(content_); | 306 window_tree_host_->window()->AddChild(content_); |
| 307 // TODO(beng): much else, see [Desktop]NativeWidgetAura. | 307 // TODO(beng): much else, see [Desktop]NativeWidgetAura. |
| 308 | 308 |
| 309 native_widget_delegate_->OnNativeWidgetCreated(false); | 309 native_widget_delegate_->OnNativeWidgetCreated(false); |
| 310 } | 310 } |
| 311 | 311 |
| 312 void NativeWidgetMus::OnWidgetInitDone() { |
| 313 // The client area is calculated from the NonClientView. During |
| 314 // InitNativeWidget() the NonClientView has not been created. When this |
| 315 // function is called the NonClientView has been created, so that we can |
| 316 // correctly calculate the client area and push it to the mus::Window. |
| 317 UpdateClientArea(); |
| 318 } |
| 319 |
| 312 bool NativeWidgetMus::ShouldUseNativeFrame() const { | 320 bool NativeWidgetMus::ShouldUseNativeFrame() const { |
| 313 // NOTIMPLEMENTED(); | 321 // NOTIMPLEMENTED(); |
| 314 return false; | 322 return false; |
| 315 } | 323 } |
| 316 | 324 |
| 317 bool NativeWidgetMus::ShouldWindowContentsBeTransparent() const { | 325 bool NativeWidgetMus::ShouldWindowContentsBeTransparent() const { |
| 318 // NOTIMPLEMENTED(); | 326 // NOTIMPLEMENTED(); |
| 319 return true; | 327 return true; |
| 320 } | 328 } |
| 321 | 329 |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 802 | 810 |
| 803 void NativeWidgetMus::OnGestureEvent(ui::GestureEvent* event) { | 811 void NativeWidgetMus::OnGestureEvent(ui::GestureEvent* event) { |
| 804 native_widget_delegate_->OnGestureEvent(event); | 812 native_widget_delegate_->OnGestureEvent(event); |
| 805 } | 813 } |
| 806 | 814 |
| 807 void NativeWidgetMus::OnHostCloseRequested(const aura::WindowTreeHost* host) { | 815 void NativeWidgetMus::OnHostCloseRequested(const aura::WindowTreeHost* host) { |
| 808 GetWidget()->Close(); | 816 GetWidget()->Close(); |
| 809 } | 817 } |
| 810 | 818 |
| 811 } // namespace views | 819 } // namespace views |
| OLD | NEW |