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

Side by Side Diff: ui/aura/window_tree_host.cc

Issue 2027943002: [WIP] Make content_shell run under Wayland Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on tonikitoo's CL (included) Created 4 years, 6 months 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 | ui/display/screen.h » ('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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 } 57 }
58 58
59 void WindowTreeHost::InitHost() { 59 void WindowTreeHost::InitHost() {
60 InitCompositor(); 60 InitCompositor();
61 UpdateRootWindowSize(GetBounds().size()); 61 UpdateRootWindowSize(GetBounds().size());
62 Env::GetInstance()->NotifyHostInitialized(this); 62 Env::GetInstance()->NotifyHostInitialized(this);
63 window()->Show(); 63 window()->Show();
64 } 64 }
65 65
66 void WindowTreeHost::InitCompositor() { 66 void WindowTreeHost::InitCompositor() {
67 display::Screen::GetScreen()->WaitForScreenSizeAvailable();
zoli 2016/07/18 06:53:33 Missing dependency on //ui/display. This will brea
67 compositor_->SetScaleAndSize(GetDeviceScaleFactorFromDisplay(window()), 68 compositor_->SetScaleAndSize(GetDeviceScaleFactorFromDisplay(window()),
68 GetBounds().size()); 69 GetBounds().size());
69 compositor_->SetRootLayer(window()->layer()); 70 compositor_->SetRootLayer(window()->layer());
70 } 71 }
71 72
72 void WindowTreeHost::AddObserver(WindowTreeHostObserver* observer) { 73 void WindowTreeHost::AddObserver(WindowTreeHostObserver* observer) {
73 observers_.AddObserver(observer); 74 observers_.AddObserver(observer);
74 } 75 }
75 76
76 void WindowTreeHost::RemoveObserver(WindowTreeHostObserver* observer) { 77 void WindowTreeHost::RemoveObserver(WindowTreeHostObserver* observer) {
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 client::CursorClient* cursor_client = client::GetCursorClient(window()); 320 client::CursorClient* cursor_client = client::GetCursorClient(window());
320 if (cursor_client) { 321 if (cursor_client) {
321 const display::Display& display = 322 const display::Display& display =
322 display::Screen::GetScreen()->GetDisplayNearestWindow(window()); 323 display::Screen::GetScreen()->GetDisplayNearestWindow(window());
323 cursor_client->SetDisplay(display); 324 cursor_client->SetDisplay(display);
324 } 325 }
325 dispatcher()->OnCursorMovedToRootLocation(root_location); 326 dispatcher()->OnCursorMovedToRootLocation(root_location);
326 } 327 }
327 328
328 } // namespace aura 329 } // namespace aura
OLDNEW
« no previous file with comments | « no previous file | ui/display/screen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698