Chromium Code Reviews| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 82 | 82 |
| 83 // Mus windows are assumed hidden. | 83 // Mus windows are assumed hidden. |
| 84 compositor()->SetVisible(false); | 84 compositor()->SetVisible(false); |
| 85 } | 85 } |
| 86 | 86 |
| 87 WindowTreeHostMus::WindowTreeHostMus( | 87 WindowTreeHostMus::WindowTreeHostMus( |
| 88 WindowTreeClient* window_tree_client, | 88 WindowTreeClient* window_tree_client, |
| 89 const std::map<std::string, std::vector<uint8_t>>* properties) | 89 const std::map<std::string, std::vector<uint8_t>>* properties) |
| 90 : WindowTreeHostMus( | 90 : WindowTreeHostMus( |
| 91 static_cast<WindowTreeHostMusDelegate*>(window_tree_client) | 91 static_cast<WindowTreeHostMusDelegate*>(window_tree_client) |
| 92 ->CreateWindowPortForTopLevel(), | 92 ->CreateWindowPortForTopLevel(properties), |
| 93 window_tree_client, | 93 window_tree_client, |
| 94 display::Screen::GetScreen()->GetPrimaryDisplay().id(), | 94 display::Screen::GetScreen()->GetPrimaryDisplay().id(), |
| 95 properties) {} | 95 properties) {} |
|
msw
2016/12/02 00:31:08
The other constructor re-applies these properties;
sky
2016/12/02 01:08:43
Ya, sorry, I agree this is weird. WindowPort is th
msw
2016/12/02 01:21:40
Okay, thanks for the explanation, would a comment
| |
| 96 | 96 |
| 97 WindowTreeHostMus::~WindowTreeHostMus() { | 97 WindowTreeHostMus::~WindowTreeHostMus() { |
| 98 DestroyCompositor(); | 98 DestroyCompositor(); |
| 99 DestroyDispatcher(); | 99 DestroyDispatcher(); |
| 100 } | 100 } |
| 101 | 101 |
| 102 void WindowTreeHostMus::SetBoundsFromServer(const gfx::Rect& bounds) { | 102 void WindowTreeHostMus::SetBoundsFromServer(const gfx::Rect& bounds) { |
| 103 base::AutoReset<bool> resetter(&in_set_bounds_from_server_, true); | 103 base::AutoReset<bool> resetter(&in_set_bounds_from_server_, true); |
| 104 SetBoundsInPixels(bounds); | 104 SetBoundsInPixels(bounds); |
| 105 } | 105 } |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 157 void WindowTreeHostMus::OnCloseRequest() { | 157 void WindowTreeHostMus::OnCloseRequest() { |
| 158 OnHostCloseRequested(); | 158 OnHostCloseRequested(); |
| 159 } | 159 } |
| 160 | 160 |
| 161 gfx::ICCProfile WindowTreeHostMus::GetICCProfileForCurrentDisplay() { | 161 gfx::ICCProfile WindowTreeHostMus::GetICCProfileForCurrentDisplay() { |
| 162 // TODO: This should read the profile from mus. crbug.com/647510 | 162 // TODO: This should read the profile from mus. crbug.com/647510 |
| 163 return gfx::ICCProfile(); | 163 return gfx::ICCProfile(); |
| 164 } | 164 } |
| 165 | 165 |
| 166 } // namespace aura | 166 } // namespace aura |
| OLD | NEW |