| 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/aura/mus/window_tree_host_mus.h" | 5 #include "ui/aura/mus/window_tree_host_mus.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "ui/aura/env.h" | 8 #include "ui/aura/env.h" |
| 9 #include "ui/aura/mus/input_method_mus.h" | 9 #include "ui/aura/mus/input_method_mus.h" |
| 10 #include "ui/aura/mus/window_port_mus.h" | 10 #include "ui/aura/mus/window_port_mus.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 OnAcceleratedWidgetAvailable(accelerated_widget, 1.f); | 56 OnAcceleratedWidgetAvailable(accelerated_widget, 1.f); |
| 57 | 57 |
| 58 delegate_->OnWindowTreeHostCreated(this); | 58 delegate_->OnWindowTreeHostCreated(this); |
| 59 | 59 |
| 60 SetPlatformWindow(base::MakeUnique<ui::StubWindow>( | 60 SetPlatformWindow(base::MakeUnique<ui::StubWindow>( |
| 61 this, | 61 this, |
| 62 false)); // Do not advertise accelerated widget; already set manually. | 62 false)); // Do not advertise accelerated widget; already set manually. |
| 63 | 63 |
| 64 input_method_ = base::MakeUnique<InputMethodMus>(this, window()); | 64 input_method_ = base::MakeUnique<InputMethodMus>(this, window()); |
| 65 | 65 |
| 66 // TODO: hook up to compositor correctly. | |
| 67 // compositor()->SetWindow(window); | |
| 68 | |
| 69 compositor()->SetHostHasTransparentBackground(true); | 66 compositor()->SetHostHasTransparentBackground(true); |
| 70 | 67 |
| 71 // Mus windows are assumed hidden. | 68 // Mus windows are assumed hidden. |
| 72 compositor()->SetVisible(false); | 69 compositor()->SetVisible(false); |
| 73 } | 70 } |
| 74 | 71 |
| 75 WindowTreeHostMus::WindowTreeHostMus(WindowTreeClient* window_tree_client) | 72 WindowTreeHostMus::WindowTreeHostMus(WindowTreeClient* window_tree_client) |
| 76 : WindowTreeHostMus( | 73 : WindowTreeHostMus( |
| 77 static_cast<WindowTreeHostMusDelegate*>(window_tree_client) | 74 static_cast<WindowTreeHostMusDelegate*>(window_tree_client) |
| 78 ->CreateWindowPortForTopLevel(), | 75 ->CreateWindowPortForTopLevel(), |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 void WindowTreeHostMus::OnCloseRequest() { | 130 void WindowTreeHostMus::OnCloseRequest() { |
| 134 OnHostCloseRequested(); | 131 OnHostCloseRequested(); |
| 135 } | 132 } |
| 136 | 133 |
| 137 gfx::ICCProfile WindowTreeHostMus::GetICCProfileForCurrentDisplay() { | 134 gfx::ICCProfile WindowTreeHostMus::GetICCProfileForCurrentDisplay() { |
| 138 // TODO: This should read the profile from mus. crbug.com/647510 | 135 // TODO: This should read the profile from mus. crbug.com/647510 |
| 139 return gfx::ICCProfile(); | 136 return gfx::ICCProfile(); |
| 140 } | 137 } |
| 141 | 138 |
| 142 } // namespace aura | 139 } // namespace aura |
| OLD | NEW |