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

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

Issue 2567293004: Makes WindowTreeHost::InitHost() not Show the window (Closed)
Patch Set: tweak 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 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 // This has to be before any other includes, else default is picked up. 5 // This has to be before any other includes, else default is picked up.
6 // See base/logging for details on this. 6 // See base/logging for details on this.
7 #define NOTIMPLEMENTED_POLICY 5 7 #define NOTIMPLEMENTED_POLICY 5
8 8
9 #include "ui/views/mus/native_widget_mus.h" 9 #include "ui/views/mus/native_widget_mus.h"
10 10
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 NativeWidgetAura::RegisterNativeWidgetForWindow(this, content_); 713 NativeWidgetAura::RegisterNativeWidgetForWindow(this, content_);
714 aura::Window* hosted_window = window_tree_host_->window(); 714 aura::Window* hosted_window = window_tree_host_->window();
715 715
716 ownership_ = params.ownership; 716 ownership_ = params.ownership;
717 window_->SetCanFocus(params.activatable == 717 window_->SetCanFocus(params.activatable ==
718 Widget::InitParams::ACTIVATABLE_YES); 718 Widget::InitParams::ACTIVATABLE_YES);
719 window_->SetCanAcceptEvents(params.accept_events); 719 window_->SetCanAcceptEvents(params.accept_events);
720 720
721 window_tree_host_->AddObserver(this); 721 window_tree_host_->AddObserver(this);
722 window_tree_host_->InitHost(); 722 window_tree_host_->InitHost();
723 window_tree_host_->window()->Show();
723 hosted_window->SetProperty(kMusWindow, window_); 724 hosted_window->SetProperty(kMusWindow, window_);
724 725
725 // TODO(moshayedi): crbug.com/641039. Investigate whether there are any cases 726 // TODO(moshayedi): crbug.com/641039. Investigate whether there are any cases
726 // where we need input method but don't have the WindowManagerConnection here. 727 // where we need input method but don't have the WindowManagerConnection here.
727 if (WindowManagerConnection::Exists()) 728 if (WindowManagerConnection::Exists())
728 input_method_->Init(WindowManagerConnection::Get()->connector()); 729 input_method_->Init(WindowManagerConnection::Get()->connector());
729 730
730 focus_client_ = 731 focus_client_ =
731 base::MakeUnique<FocusControllerMus>(new FocusRulesImpl(hosted_window)); 732 base::MakeUnique<FocusControllerMus>(new FocusRulesImpl(hosted_window));
732 733
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after
1564 1565
1565 gfx::Path mask_path; 1566 gfx::Path mask_path;
1566 native_widget_delegate_->GetHitTestMask(&mask_path); 1567 native_widget_delegate_->GetHitTestMask(&mask_path);
1567 // TODO(jamescook): Use the full path for the mask. 1568 // TODO(jamescook): Use the full path for the mask.
1568 gfx::Rect mask_rect = 1569 gfx::Rect mask_rect =
1569 gfx::ToEnclosingRect(gfx::SkRectToRectF(mask_path.getBounds())); 1570 gfx::ToEnclosingRect(gfx::SkRectToRectF(mask_path.getBounds()));
1570 window_->SetHitTestMask(mask_rect); 1571 window_->SetHitTestMask(mask_rect);
1571 } 1572 }
1572 1573
1573 } // namespace views 1574 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698