Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Side by Side Diff: ui/views/mus/desktop_window_tree_host_mus.cc

Issue 2577963006: Revert of Converts chrome to aura-mus (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/aura/mus/focus_synchronizer.cc ('k') | ui/views/mus/mus_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ui/aura/client/aura_constants.h" 8 #include "ui/aura/client/aura_constants.h"
9 #include "ui/aura/client/cursor_client.h" 9 #include "ui/aura/client/cursor_client.h"
10 #include "ui/aura/client/drag_drop_client.h" 10 #include "ui/aura/client/drag_drop_client.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 DesktopNativeWidgetAura* desktop_native_widget_aura, 173 DesktopNativeWidgetAura* desktop_native_widget_aura,
174 const std::map<std::string, std::vector<uint8_t>>* mus_properties) 174 const std::map<std::string, std::vector<uint8_t>>* mus_properties)
175 : aura::WindowTreeHostMus(MusClient::Get()->window_tree_client(), 175 : aura::WindowTreeHostMus(MusClient::Get()->window_tree_client(),
176 mus_properties), 176 mus_properties),
177 native_widget_delegate_(native_widget_delegate), 177 native_widget_delegate_(native_widget_delegate),
178 desktop_native_widget_aura_(desktop_native_widget_aura), 178 desktop_native_widget_aura_(desktop_native_widget_aura),
179 fullscreen_restore_state_(ui::SHOW_STATE_DEFAULT), 179 fullscreen_restore_state_(ui::SHOW_STATE_DEFAULT),
180 close_widget_factory_(this) { 180 close_widget_factory_(this) {
181 aura::Env::GetInstance()->AddObserver(this); 181 aura::Env::GetInstance()->AddObserver(this);
182 MusClient::Get()->AddObserver(this); 182 MusClient::Get()->AddObserver(this);
183 // DesktopNativeWidgetAura registers the association between |content_window_|
184 // and Widget, but code may also want to go from the root (window()) to the
185 // Widget. This call enables that.
186 NativeWidgetAura::RegisterNativeWidgetForWindow(desktop_native_widget_aura,
187 window());
188 // TODO: use display id and bounds if available, likely need to pass in 183 // TODO: use display id and bounds if available, likely need to pass in
189 // InitParams for that. 184 // InitParams for that.
190 } 185 }
191 186
192 DesktopWindowTreeHostMus::~DesktopWindowTreeHostMus() { 187 DesktopWindowTreeHostMus::~DesktopWindowTreeHostMus() {
193 MusClient::Get()->RemoveObserver(this); 188 MusClient::Get()->RemoveObserver(this);
194 aura::Env::GetInstance()->RemoveObserver(this); 189 aura::Env::GetInstance()->RemoveObserver(this);
195 desktop_native_widget_aura_->OnDesktopWindowTreeHostDestroyed(this); 190 desktop_native_widget_aura_->OnDesktopWindowTreeHostDestroyed(this);
196 } 191 }
197 192
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 if (window == this->window()) { 703 if (window == this->window()) {
709 is_active_ = true; 704 is_active_ = true;
710 desktop_native_widget_aura_->HandleActivationChanged(true); 705 desktop_native_widget_aura_->HandleActivationChanged(true);
711 } else if (is_active_) { 706 } else if (is_active_) {
712 is_active_ = false; 707 is_active_ = false;
713 desktop_native_widget_aura_->HandleActivationChanged(false); 708 desktop_native_widget_aura_->HandleActivationChanged(false);
714 } 709 }
715 } 710 }
716 711
717 } // namespace views 712 } // namespace views
OLDNEW
« no previous file with comments | « ui/aura/mus/focus_synchronizer.cc ('k') | ui/views/mus/mus_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698