| 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 "components/mus/example/client/client_application_delegate.h" | 5 #include "components/mus/example/client/client_application_delegate.h" |
| 6 | 6 |
| 7 #include "components/mus/example/wm/wm.mojom.h" | 7 #include "components/mus/example/wm/wm.mojom.h" |
| 8 #include "components/mus/public/cpp/view_tree_connection.h" | 8 #include "components/mus/public/cpp/view_tree_connection.h" |
| 9 #include "components/mus/public/cpp/view_tree_host_factory.h" | 9 #include "components/mus/public/cpp/view_tree_host_factory.h" |
| 10 #include "mandoline/ui/aura/aura_init.h" | 10 #include "mandoline/ui/aura/aura_init.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 if (!aura_init_) { | 44 if (!aura_init_) { |
| 45 aura_init_.reset( | 45 aura_init_.reset( |
| 46 new mandoline::AuraInit(root, app_->shell(), "example_resources.pak")); | 46 new mandoline::AuraInit(root, app_->shell(), "example_resources.pak")); |
| 47 } | 47 } |
| 48 | 48 |
| 49 views::WidgetDelegateView* widget_delegate = new views::WidgetDelegateView; | 49 views::WidgetDelegateView* widget_delegate = new views::WidgetDelegateView; |
| 50 widget_delegate->GetContentsView()->set_background( | 50 widget_delegate->GetContentsView()->set_background( |
| 51 views::Background::CreateSolidBackground(0xFFDDDDDD)); | 51 views::Background::CreateSolidBackground(0xFFDDDDDD)); |
| 52 | 52 |
| 53 views::Widget* widget = new views::Widget; | 53 views::Widget* widget = new views::Widget; |
| 54 // TODO(sky): make this TYPE_WINDOW. I need to fix resources in order to use | 54 views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW); |
| 55 // TYPE_WINDOW. | |
| 56 views::Widget::InitParams params( | |
| 57 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); | |
| 58 params.delegate = widget_delegate; | 55 params.delegate = widget_delegate; |
| 59 params.native_widget = | 56 params.native_widget = |
| 60 new mandoline::NativeWidgetViewManager(widget, app_->shell(), root); | 57 new mandoline::NativeWidgetViewManager(widget, app_->shell(), root); |
| 61 params.bounds = root->bounds().To<gfx::Rect>(); | 58 params.bounds = root->bounds().To<gfx::Rect>(); |
| 62 widget->Init(params); | 59 widget->Init(params); |
| 63 widget->Show(); | 60 widget->Show(); |
| 64 } | 61 } |
| 65 | 62 |
| 66 void ClientApplicationDelegate::OnConnectionLost( | 63 void ClientApplicationDelegate::OnConnectionLost( |
| 67 mus::ViewTreeConnection* connection) {} | 64 mus::ViewTreeConnection* connection) {} |
| OLD | NEW |