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

Side by Side Diff: ash/display/window_tree_host_manager.cc

Issue 2567293004: Makes WindowTreeHost::InitHost() not Show the window (Closed)
Patch Set: WTF::Show shows window 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 "ash/display/window_tree_host_manager.h" 5 #include "ash/display/window_tree_host_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 host->window()->SetName(base::StringPrintf( 877 host->window()->SetName(base::StringPrintf(
878 "%sRootWindow-%d", params_with_bounds.offscreen ? "Offscreen" : "", 878 "%sRootWindow-%d", params_with_bounds.offscreen ? "Offscreen" : "",
879 host_count++)); 879 host_count++));
880 host->window()->SetTitle(base::UTF8ToUTF16(display_info.name())); 880 host->window()->SetTitle(base::UTF8ToUTF16(display_info.name()));
881 host->compositor()->SetBackgroundColor(SK_ColorBLACK); 881 host->compositor()->SetBackgroundColor(SK_ColorBLACK);
882 // No need to remove our observer observer because the WindowTreeHostManager 882 // No need to remove our observer observer because the WindowTreeHostManager
883 // outlives the host. 883 // outlives the host.
884 host->AddObserver(this); 884 host->AddObserver(this);
885 InitRootWindowSettings(host->window())->display_id = display.id(); 885 InitRootWindowSettings(host->window())->display_id = display.id();
886 host->InitHost(); 886 host->InitHost();
887 host->window()->Show();
887 888
888 window_tree_hosts_[display.id()] = ash_host; 889 window_tree_hosts_[display.id()] = ash_host;
889 SetDisplayPropertiesOnHost(ash_host, display); 890 SetDisplayPropertiesOnHost(ash_host, display);
890 891
891 #if defined(OS_CHROMEOS) 892 #if defined(OS_CHROMEOS)
892 if (switches::ConstrainPointerToRoot()) 893 if (switches::ConstrainPointerToRoot())
893 ash_host->ConfineCursorToRootWindow(); 894 ash_host->ConfineCursorToRootWindow();
894 #endif 895 #endif
895 return ash_host; 896 return ash_host;
896 } 897 }
897 898
898 } // namespace ash 899 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698