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

Side by Side Diff: ash/display/mirror_window_controller.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
« no previous file with comments | « no previous file | ash/display/window_tree_host_manager.cc » ('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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/mirror_window_controller.h" 5 #include "ash/display/mirror_window_controller.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #if defined(USE_X11) 9 #if defined(USE_X11)
10 #include <X11/extensions/XInput2.h> 10 #include <X11/extensions/XInput2.h>
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 host->window()->SetName( 185 host->window()->SetName(
186 base::StringPrintf("MirrorRootWindow-%d", mirror_host_count++)); 186 base::StringPrintf("MirrorRootWindow-%d", mirror_host_count++));
187 host->compositor()->SetBackgroundColor(SK_ColorBLACK); 187 host->compositor()->SetBackgroundColor(SK_ColorBLACK);
188 // No need to remove the observer because the WindowTreeHostManager 188 // No need to remove the observer because the WindowTreeHostManager
189 // outlives the host. 189 // outlives the host.
190 host->AddObserver(Shell::GetInstance()->window_tree_host_manager()); 190 host->AddObserver(Shell::GetInstance()->window_tree_host_manager());
191 host->AddObserver(this); 191 host->AddObserver(this);
192 // TODO(oshima): TouchHUD is using idkey. 192 // TODO(oshima): TouchHUD is using idkey.
193 InitRootWindowSettings(host->window())->display_id = display_info.id(); 193 InitRootWindowSettings(host->window())->display_id = display_info.id();
194 host->InitHost(); 194 host->InitHost();
195 host->window()->Show();
mfomitchev 2016/12/13 22:30:32 We are already calling host->Show() below, so we s
195 #if defined(USE_X11) 196 #if defined(USE_X11)
196 if (!display_manager->IsInUnifiedMode()) { 197 if (!display_manager->IsInUnifiedMode()) {
197 // Mirror window shouldn't handle input events. 198 // Mirror window shouldn't handle input events.
198 static_cast<aura::WindowTreeHostX11*>(host)->DisableInput(); 199 static_cast<aura::WindowTreeHostX11*>(host)->DisableInput();
199 } 200 }
200 #endif 201 #endif
201 202
202 #if defined(OS_CHROMEOS) 203 #if defined(OS_CHROMEOS)
203 if (display_manager->IsInUnifiedMode()) { 204 if (display_manager->IsInUnifiedMode()) {
204 host_info->ash_host->ConfineCursorToRootWindow(); 205 host_info->ash_host->ConfineCursorToRootWindow();
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 // EventProcessor may be accessed after this call if the mirroring window 372 // EventProcessor may be accessed after this call if the mirroring window
372 // was deleted as a result of input event (e.g. shortcut), so don't delete 373 // was deleted as a result of input event (e.g. shortcut), so don't delete
373 // now. 374 // now.
374 if (delay_host_deletion) 375 if (delay_host_deletion)
375 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, host_info); 376 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, host_info);
376 else 377 else
377 delete host_info; 378 delete host_info;
378 } 379 }
379 380
380 } // namespace ash 381 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/display/window_tree_host_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698