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

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

Issue 2514243002: Propagates window type properties during aura-mus window creation (Closed)
Patch Set: merge Created 4 years, 1 month 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/views/mus/desktop_window_tree_host_mus.h ('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/drag_drop_client.h" 9 #include "ui/aura/client/drag_drop_client.h"
10 #include "ui/aura/client/focus_client.h" 10 #include "ui/aura/client/focus_client.h"
11 #include "ui/aura/env.h" 11 #include "ui/aura/env.h"
12 #include "ui/aura/mus/window_tree_host_mus.h" 12 #include "ui/aura/mus/window_tree_host_mus.h"
13 #include "ui/aura/window.h" 13 #include "ui/aura/window.h"
14 #include "ui/display/screen.h" 14 #include "ui/display/screen.h"
15 #include "ui/views/corewm/tooltip_aura.h" 15 #include "ui/views/corewm/tooltip_aura.h"
16 #include "ui/views/mus/mus_client.h" 16 #include "ui/views/mus/mus_client.h"
17 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" 17 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
18 #include "ui/views/widget/native_widget_aura.h" 18 #include "ui/views/widget/native_widget_aura.h"
19 #include "ui/views/widget/widget_delegate.h" 19 #include "ui/views/widget/widget_delegate.h"
20 #include "ui/wm/core/window_util.h" 20 #include "ui/wm/core/window_util.h"
21 #include "ui/wm/public/activation_client.h" 21 #include "ui/wm/public/activation_client.h"
22 22
23 namespace views { 23 namespace views {
24 24
25 DesktopWindowTreeHostMus::DesktopWindowTreeHostMus( 25 DesktopWindowTreeHostMus::DesktopWindowTreeHostMus(
26 internal::NativeWidgetDelegate* native_widget_delegate, 26 internal::NativeWidgetDelegate* native_widget_delegate,
27 DesktopNativeWidgetAura* desktop_native_widget_aura, 27 DesktopNativeWidgetAura* desktop_native_widget_aura,
28 const Widget::InitParams& init_params) 28 const std::map<std::string, std::vector<uint8_t>>* mus_properties)
29 : aura::WindowTreeHostMus(MusClient::Get()->window_tree_client(), 29 : aura::WindowTreeHostMus(MusClient::Get()->window_tree_client(),
30 &init_params.mus_properties), 30 mus_properties),
31 native_widget_delegate_(native_widget_delegate), 31 native_widget_delegate_(native_widget_delegate),
32 desktop_native_widget_aura_(desktop_native_widget_aura), 32 desktop_native_widget_aura_(desktop_native_widget_aura),
33 fullscreen_restore_state_(ui::SHOW_STATE_DEFAULT), 33 fullscreen_restore_state_(ui::SHOW_STATE_DEFAULT),
34 close_widget_factory_(this) { 34 close_widget_factory_(this) {
35 aura::Env::GetInstance()->AddObserver(this); 35 aura::Env::GetInstance()->AddObserver(this);
36 // TODO: use display id and bounds if available, likely need to pass in 36 // TODO: use display id and bounds if available, likely need to pass in
37 // InitParams for that. 37 // InitParams for that.
38 } 38 }
39 39
40 DesktopWindowTreeHostMus::~DesktopWindowTreeHostMus() { 40 DesktopWindowTreeHostMus::~DesktopWindowTreeHostMus() {
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 if (window == this->window()) { 452 if (window == this->window()) {
453 is_active_ = true; 453 is_active_ = true;
454 desktop_native_widget_aura_->HandleActivationChanged(true); 454 desktop_native_widget_aura_->HandleActivationChanged(true);
455 } else if (is_active_) { 455 } else if (is_active_) {
456 is_active_ = false; 456 is_active_ = false;
457 desktop_native_widget_aura_->HandleActivationChanged(false); 457 desktop_native_widget_aura_->HandleActivationChanged(false);
458 } 458 }
459 } 459 }
460 460
461 } // namespace views 461 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/mus/desktop_window_tree_host_mus.h ('k') | ui/views/mus/mus_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698