OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/views/mus/desktop_window_tree_host_mus.h" | 5 #include "ui/views/mus/desktop_window_tree_host_mus.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 bool in_success) { | 178 bool in_success) { |
179 *out_success = in_success; | 179 *out_success = in_success; |
180 quit_closure.Run(); | 180 quit_closure.Run(); |
181 } | 181 } |
182 | 182 |
183 } // namespace | 183 } // namespace |
184 | 184 |
185 DesktopWindowTreeHostMus::DesktopWindowTreeHostMus( | 185 DesktopWindowTreeHostMus::DesktopWindowTreeHostMus( |
186 internal::NativeWidgetDelegate* native_widget_delegate, | 186 internal::NativeWidgetDelegate* native_widget_delegate, |
187 DesktopNativeWidgetAura* desktop_native_widget_aura, | 187 DesktopNativeWidgetAura* desktop_native_widget_aura, |
| 188 const cc::FrameSinkId& frame_sink_id, |
188 const std::map<std::string, std::vector<uint8_t>>* mus_properties) | 189 const std::map<std::string, std::vector<uint8_t>>* mus_properties) |
189 : aura::WindowTreeHostMus(MusClient::Get()->window_tree_client(), | 190 : aura::WindowTreeHostMus(MusClient::Get()->window_tree_client(), |
| 191 frame_sink_id, |
190 mus_properties), | 192 mus_properties), |
191 native_widget_delegate_(native_widget_delegate), | 193 native_widget_delegate_(native_widget_delegate), |
192 desktop_native_widget_aura_(desktop_native_widget_aura), | 194 desktop_native_widget_aura_(desktop_native_widget_aura), |
193 close_widget_factory_(this) { | 195 close_widget_factory_(this) { |
194 aura::Env::GetInstance()->AddObserver(this); | 196 aura::Env::GetInstance()->AddObserver(this); |
195 MusClient::Get()->AddObserver(this); | 197 MusClient::Get()->AddObserver(this); |
196 native_widget_delegate_->AsWidget()->AddObserver(this); | 198 native_widget_delegate_->AsWidget()->AddObserver(this); |
197 desktop_native_widget_aura_->content_window()->AddObserver(this); | 199 desktop_native_widget_aura_->content_window()->AddObserver(this); |
198 // DesktopNativeWidgetAura registers the association between |content_window_| | 200 // DesktopNativeWidgetAura registers the association between |content_window_| |
199 // and Widget, but code may also want to go from the root (window()) to the | 201 // and Widget, but code may also want to go from the root (window()) to the |
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 aura::client::FocusClient* focus_client, | 817 aura::client::FocusClient* focus_client, |
816 aura::Window* window) { | 818 aura::Window* window) { |
817 if (window == this->window()) { | 819 if (window == this->window()) { |
818 desktop_native_widget_aura_->HandleActivationChanged(true); | 820 desktop_native_widget_aura_->HandleActivationChanged(true); |
819 } else if (is_active_) { | 821 } else if (is_active_) { |
820 desktop_native_widget_aura_->HandleActivationChanged(false); | 822 desktop_native_widget_aura_->HandleActivationChanged(false); |
821 } | 823 } |
822 } | 824 } |
823 | 825 |
824 } // namespace views | 826 } // namespace views |
OLD | NEW |