| Index: ui/views/mus/window_manager_connection.cc
|
| diff --git a/ui/views/mus/window_manager_connection.cc b/ui/views/mus/window_manager_connection.cc
|
| index defc7e419227c81dfc744de85ba1cd103f3f1abe..5bf6255651ffbafaf4c7345fdb28728922f8a30a 100644
|
| --- a/ui/views/mus/window_manager_connection.cc
|
| +++ b/ui/views/mus/window_manager_connection.cc
|
| @@ -17,7 +17,6 @@
|
| #include "mojo/shell/public/cpp/application_impl.h"
|
| #include "ui/views/mus/native_widget_mus.h"
|
| #include "ui/views/mus/screen_mus.h"
|
| -#include "ui/views/mus/window_manager_frame_values.h"
|
| #include "ui/views/views_delegate.h"
|
|
|
| namespace views {
|
| @@ -30,22 +29,6 @@ using WindowManagerConnectionPtr =
|
| base::LazyInstance<WindowManagerConnectionPtr>::Leaky lazy_tls_ptr =
|
| LAZY_INSTANCE_INITIALIZER;
|
|
|
| -void GetWindowManagerFrameValues(mus::mojom::WindowManagerPtr* window_manager) {
|
| - // TODO(sky): maybe this should be associated with Display?
|
| - WindowManagerFrameValues frame_values;
|
| - (*window_manager)
|
| - ->GetConfig([&frame_values](mus::mojom::WindowManagerConfigPtr results) {
|
| - frame_values.normal_insets =
|
| - results->normal_client_area_insets.To<gfx::Insets>();
|
| - frame_values.maximized_insets =
|
| - results->maximized_client_area_insets.To<gfx::Insets>();
|
| - frame_values.max_title_bar_button_width =
|
| - results->max_title_bar_button_width;
|
| - });
|
| - CHECK(window_manager->WaitForIncomingResponse());
|
| - WindowManagerFrameValues::SetInstance(frame_values);
|
| -}
|
| -
|
| } // namespace
|
|
|
| // static
|
| @@ -86,9 +69,7 @@ WindowManagerConnection::WindowManagerConnection(mojo::ApplicationImpl* app)
|
| : app_(app), window_tree_connection_(nullptr) {
|
| app->ConnectToService("mojo:mus", &window_manager_);
|
|
|
| - GetWindowManagerFrameValues(&window_manager_);
|
| -
|
| - screen_.reset(new ScreenMus);
|
| + screen_.reset(new ScreenMus(this));
|
| screen_->Init(app);
|
| ViewsDelegate::GetInstance()->set_native_widget_factory(
|
| base::Bind(&WindowManagerConnection::CreateNativeWidget,
|
| @@ -106,6 +87,11 @@ void WindowManagerConnection::OnEmbed(mus::Window* root) {}
|
| void WindowManagerConnection::OnConnectionLost(
|
| mus::WindowTreeConnection* connection) {}
|
|
|
| +void WindowManagerConnection::OnWindowManagerFrameValuesChanged() {
|
| + if (window_tree_connection_)
|
| + NativeWidgetMus::NotifyFrameChanged(window_tree_connection_.get());
|
| +}
|
| +
|
| NativeWidget* WindowManagerConnection::CreateNativeWidget(
|
| const Widget::InitParams& init_params,
|
| internal::NativeWidgetDelegate* delegate) {
|
|
|