| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 WindowTreeClient* window_tree_client, | 42 WindowTreeClient* window_tree_client, |
| 43 int64_t display_id, | 43 int64_t display_id, |
| 44 const std::map<std::string, std::vector<uint8_t>>* properties) | 44 const std::map<std::string, std::vector<uint8_t>>* properties) |
| 45 : WindowTreeHostPlatform(std::move(window_port)), | 45 : WindowTreeHostPlatform(std::move(window_port)), |
| 46 display_id_(display_id), | 46 display_id_(display_id), |
| 47 delegate_(window_tree_client) { | 47 delegate_(window_tree_client) { |
| 48 window()->SetProperty(kWindowTreeHostMusKey, this); | 48 window()->SetProperty(kWindowTreeHostMusKey, this); |
| 49 // TODO(sky): find a cleaner way to set this! Better solution is to likely | 49 // TODO(sky): find a cleaner way to set this! Better solution is to likely |
| 50 // have constructor take aura::Window. | 50 // have constructor take aura::Window. |
| 51 WindowPortMus::Get(window())->window_ = window(); | 51 WindowPortMus::Get(window())->window_ = window(); |
| 52 fprintf(stderr, ">>>WindowTreeHostMus server_id: %d window_type: %d\n", |
| 53 WindowPortMus::Get(window())->server_id(), window()->type()); |
| 52 if (properties) { | 54 if (properties) { |
| 53 // Apply the properties before initializing the window, that way the | 55 // Apply the properties before initializing the window, that way the |
| 54 // server seems them at the time the window is created. | 56 // server seems them at the time the window is created. |
| 55 WindowMus* window_mus = WindowMus::Get(window()); | 57 WindowMus* window_mus = WindowMus::Get(window()); |
| 56 for (auto& pair : *properties) | 58 for (auto& pair : *properties) |
| 57 window_mus->SetPropertyFromServer(pair.first, &pair.second); | 59 window_mus->SetPropertyFromServer(pair.first, &pair.second); |
| 58 } | 60 } |
| 59 Id server_id = WindowMus::Get(window())->server_id(); | 61 Id server_id = WindowMus::Get(window())->server_id(); |
| 60 cc::FrameSinkId frame_sink_id(server_id, 0); | 62 cc::FrameSinkId frame_sink_id(server_id, 0); |
| 61 DCHECK(frame_sink_id.is_valid()); | 63 DCHECK(frame_sink_id.is_valid()); |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 void WindowTreeHostMus::OnCloseRequest() { | 191 void WindowTreeHostMus::OnCloseRequest() { |
| 190 OnHostCloseRequested(); | 192 OnHostCloseRequested(); |
| 191 } | 193 } |
| 192 | 194 |
| 193 gfx::ICCProfile WindowTreeHostMus::GetICCProfileForCurrentDisplay() { | 195 gfx::ICCProfile WindowTreeHostMus::GetICCProfileForCurrentDisplay() { |
| 194 // TODO: This should read the profile from mus. crbug.com/647510 | 196 // TODO: This should read the profile from mus. crbug.com/647510 |
| 195 return gfx::ICCProfile(); | 197 return gfx::ICCProfile(); |
| 196 } | 198 } |
| 197 | 199 |
| 198 } // namespace aura | 200 } // namespace aura |
| OLD | NEW |