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

Side by Side Diff: ui/aura/window_tree_host.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
« no previous file with comments | « ui/aura/window_event_dispatcher_unittest.cc ('k') | ui/views/mus/native_widget_mus.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 "ui/aura/window_tree_host.h" 5 #include "ui/aura/window_tree_host.h"
6 6
7 #include "base/threading/thread_task_runner_handle.h" 7 #include "base/threading/thread_task_runner_handle.h"
8 #include "base/trace_event/trace_event.h" 8 #include "base/trace_event/trace_event.h"
9 #include "ui/aura/client/capture_client.h" 9 #include "ui/aura/client/capture_client.h"
10 #include "ui/aura/client/cursor_client.h" 10 #include "ui/aura/client/cursor_client.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 WindowTreeHost* WindowTreeHost::GetForAcceleratedWidget( 56 WindowTreeHost* WindowTreeHost::GetForAcceleratedWidget(
57 gfx::AcceleratedWidget widget) { 57 gfx::AcceleratedWidget widget) {
58 return reinterpret_cast<WindowTreeHost*>( 58 return reinterpret_cast<WindowTreeHost*>(
59 ui::ViewProp::GetValue(widget, kWindowTreeHostForAcceleratedWidget)); 59 ui::ViewProp::GetValue(widget, kWindowTreeHostForAcceleratedWidget));
60 } 60 }
61 61
62 void WindowTreeHost::InitHost() { 62 void WindowTreeHost::InitHost() {
63 InitCompositor(); 63 InitCompositor();
64 UpdateRootWindowSizeInPixels(GetBoundsInPixels().size()); 64 UpdateRootWindowSizeInPixels(GetBoundsInPixels().size());
65 Env::GetInstance()->NotifyHostInitialized(this); 65 Env::GetInstance()->NotifyHostInitialized(this);
66 window()->Show();
mfomitchev 2016/12/13 19:33:53 Why not add this to WindowTreeHost::Show? Otherwis
sky 2016/12/13 21:38:46 Good idea, done. I could see the argument for Hid
67 } 66 }
68 67
69 void WindowTreeHost::AddObserver(WindowTreeHostObserver* observer) { 68 void WindowTreeHost::AddObserver(WindowTreeHostObserver* observer) {
70 observers_.AddObserver(observer); 69 observers_.AddObserver(observer);
71 } 70 }
72 71
73 void WindowTreeHost::RemoveObserver(WindowTreeHostObserver* observer) { 72 void WindowTreeHost::RemoveObserver(WindowTreeHostObserver* observer) {
74 observers_.RemoveObserver(observer); 73 observers_.RemoveObserver(observer);
75 } 74 }
76 75
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 client::CursorClient* cursor_client = client::GetCursorClient(window()); 341 client::CursorClient* cursor_client = client::GetCursorClient(window());
343 if (cursor_client) { 342 if (cursor_client) {
344 const display::Display& display = 343 const display::Display& display =
345 display::Screen::GetScreen()->GetDisplayNearestWindow(window()); 344 display::Screen::GetScreen()->GetDisplayNearestWindow(window());
346 cursor_client->SetDisplay(display); 345 cursor_client->SetDisplay(display);
347 } 346 }
348 dispatcher()->OnCursorMovedToRootLocation(root_location); 347 dispatcher()->OnCursorMovedToRootLocation(root_location);
349 } 348 }
350 349
351 } // namespace aura 350 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/window_event_dispatcher_unittest.cc ('k') | ui/views/mus/native_widget_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698