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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_native_widget_aura.cc

Issue 2575243002: Changes DesktopNativeWidgetAura to not call InitHost or window->Show() (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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/widget/desktop_aura/desktop_native_widget_aura.h" 5 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 417
418 if (!desktop_window_tree_host_) { 418 if (!desktop_window_tree_host_) {
419 desktop_window_tree_host_ = 419 desktop_window_tree_host_ =
420 params.desktop_window_tree_host 420 params.desktop_window_tree_host
421 ? params.desktop_window_tree_host 421 ? params.desktop_window_tree_host
422 : DesktopWindowTreeHost::Create(native_widget_delegate_, this); 422 : DesktopWindowTreeHost::Create(native_widget_delegate_, this);
423 host_.reset(desktop_window_tree_host_->AsWindowTreeHost()); 423 host_.reset(desktop_window_tree_host_->AsWindowTreeHost());
424 } 424 }
425 desktop_window_tree_host_->Init(content_window_, params); 425 desktop_window_tree_host_->Init(content_window_, params);
426 426
427 host_->InitHost();
428 host_->window()->Show();
429 host_->window()->AddChild(content_window_container_); 427 host_->window()->AddChild(content_window_container_);
430 host_->window()->SetProperty(kDesktopNativeWidgetAuraKey, this); 428 host_->window()->SetProperty(kDesktopNativeWidgetAuraKey, this);
431 429
432 host_->window()->AddObserver(new RootWindowDestructionObserver(this)); 430 host_->window()->AddObserver(new RootWindowDestructionObserver(this));
433 431
434 // The WindowsModalityController event filter should be at the head of the 432 // The WindowsModalityController event filter should be at the head of the
435 // pre target handlers list. This ensures that it handles input events first 433 // pre target handlers list. This ensures that it handles input events first
436 // when modal windows are at the top of the Zorder. 434 // when modal windows are at the top of the Zorder.
437 if (widget_type_ == Widget::InitParams::TYPE_WINDOW) 435 if (widget_type_ == Widget::InitParams::TYPE_WINDOW)
438 window_modality_controller_.reset( 436 window_modality_controller_.reset(
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
1205 if (cursor_reference_count_ == 0) { 1203 if (cursor_reference_count_ == 0) {
1206 // We are the last DesktopNativeWidgetAura instance, and we are responsible 1204 // We are the last DesktopNativeWidgetAura instance, and we are responsible
1207 // for cleaning up |cursor_manager_|. 1205 // for cleaning up |cursor_manager_|.
1208 delete cursor_manager_; 1206 delete cursor_manager_;
1209 native_cursor_manager_ = NULL; 1207 native_cursor_manager_ = NULL;
1210 cursor_manager_ = NULL; 1208 cursor_manager_ = NULL;
1211 } 1209 }
1212 } 1210 }
1213 1211
1214 } // namespace views 1212 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/mus/desktop_window_tree_host_mus_unittest.cc ('k') | ui/views/widget/desktop_aura/desktop_window_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698