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

Side by Side Diff: components/mus/ws/display.cc

Issue 2081253002: Implement rudimentary touchscreen support in mus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing pure virtual. 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 | « components/mus/ws/display.h ('k') | components/mus/ws/platform_display.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 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 #include "components/mus/ws/display.h" 5 #include "components/mus/ws/display.h"
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/debug/debugger.h" 10 #include "base/debug/debugger.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 const WindowManagerState* Display::GetWindowManagerStateForUser( 137 const WindowManagerState* Display::GetWindowManagerStateForUser(
138 const UserId& user_id) const { 138 const UserId& user_id) const {
139 auto iter = window_manager_state_map_.find(user_id); 139 auto iter = window_manager_state_map_.find(user_id);
140 return iter == window_manager_state_map_.end() ? nullptr : iter->second.get(); 140 return iter == window_manager_state_map_.end() ? nullptr : iter->second.get();
141 } 141 }
142 142
143 mojom::Rotation Display::GetRotation() const { 143 mojom::Rotation Display::GetRotation() const {
144 return platform_display_->GetRotation(); 144 return platform_display_->GetRotation();
145 } 145 }
146 146
147 gfx::Size Display::GetSize() const {
148 return root_->bounds().size();
149 }
150
151 int64_t Display::GetPlatformDisplayId() const {
152 return platform_display_->GetDisplayId();
153 }
154
147 const WindowManagerState* Display::GetActiveWindowManagerState() const { 155 const WindowManagerState* Display::GetActiveWindowManagerState() const {
148 return GetWindowManagerStateForUser( 156 return GetWindowManagerStateForUser(
149 window_server_->user_id_tracker()->active_id()); 157 window_server_->user_id_tracker()->active_id());
150 } 158 }
151 159
152 bool Display::SetFocusedWindow(ServerWindow* new_focused_window) { 160 bool Display::SetFocusedWindow(ServerWindow* new_focused_window) {
153 ServerWindow* old_focused_window = focus_controller_->GetFocusedWindow(); 161 ServerWindow* old_focused_window = focus_controller_->GetFocusedWindow();
154 if (old_focused_window == new_focused_window) 162 if (old_focused_window == new_focused_window)
155 return true; 163 return true;
156 DCHECK(!new_focused_window || root_window()->Contains(new_focused_window)); 164 DCHECK(!new_focused_window || root_window()->Contains(new_focused_window));
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 } 454 }
447 455
448 void Display::OnWindowManagerWindowTreeFactoryReady( 456 void Display::OnWindowManagerWindowTreeFactoryReady(
449 WindowManagerWindowTreeFactory* factory) { 457 WindowManagerWindowTreeFactory* factory) {
450 if (!binding_) 458 if (!binding_)
451 CreateWindowManagerStateFromFactory(factory); 459 CreateWindowManagerStateFromFactory(factory);
452 } 460 }
453 461
454 } // namespace ws 462 } // namespace ws
455 } // namespace mus 463 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/ws/display.h ('k') | components/mus/ws/platform_display.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698