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

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

Issue 1641003002: [exp] ash: Ash in Mus. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tot-merge Created 4 years, 10 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/screen_ash.h" 5 #include "ash/display/screen_ash.h"
6 6
7 #include "ash/display/display_manager.h" 7 #include "ash/display/display_manager.h"
8 #include "ash/display/window_tree_host_manager.h" 8 #include "ash/display/window_tree_host_manager.h"
9 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/root_window_settings.h" 10 #include "ash/root_window_settings.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 return GetDisplayManager()->active_display_list(); 123 return GetDisplayManager()->active_display_list();
124 } 124 }
125 125
126 gfx::Display ScreenAsh::GetDisplayNearestWindow(gfx::NativeView window) const { 126 gfx::Display ScreenAsh::GetDisplayNearestWindow(gfx::NativeView window) const {
127 if (!window) 127 if (!window)
128 return GetPrimaryDisplay(); 128 return GetPrimaryDisplay();
129 const aura::Window* root_window = window->GetRootWindow(); 129 const aura::Window* root_window = window->GetRootWindow();
130 if (!root_window) 130 if (!root_window)
131 return GetPrimaryDisplay(); 131 return GetPrimaryDisplay();
132 const RootWindowSettings* rws = GetRootWindowSettings(root_window); 132 const RootWindowSettings* rws = GetRootWindowSettings(root_window);
133 if (!rws)
134 return GetPrimaryDisplay();
133 int64_t id = rws->display_id; 135 int64_t id = rws->display_id;
134 // if id is |kInvaildDisplayID|, it's being deleted. 136 // if id is |kInvaildDisplayID|, it's being deleted.
135 DCHECK(id != gfx::Display::kInvalidDisplayID); 137 DCHECK(id != gfx::Display::kInvalidDisplayID);
136 if (id == gfx::Display::kInvalidDisplayID) 138 if (id == gfx::Display::kInvalidDisplayID)
137 return GetPrimaryDisplay(); 139 return GetPrimaryDisplay();
138 140
139 DisplayManager* display_manager = GetDisplayManager(); 141 DisplayManager* display_manager = GetDisplayManager();
140 // RootWindow needs Display to determine its device scale factor 142 // RootWindow needs Display to determine its device scale factor
141 // for non desktop display. 143 // for non desktop display.
142 gfx::Display mirroring_display = display_manager->GetMirroringDisplayById(id); 144 gfx::Display mirroring_display = display_manager->GetMirroringDisplayById(id);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 179
178 void ScreenAsh::RemoveObserver(gfx::DisplayObserver* observer) { 180 void ScreenAsh::RemoveObserver(gfx::DisplayObserver* observer) {
179 observers_.RemoveObserver(observer); 181 observers_.RemoveObserver(observer);
180 } 182 }
181 183
182 gfx::Screen* ScreenAsh::CloneForShutdown() { 184 gfx::Screen* ScreenAsh::CloneForShutdown() {
183 return new ScreenForShutdown(this); 185 return new ScreenForShutdown(this);
184 } 186 }
185 187
186 } // namespace ash 188 } // namespace ash
OLDNEW
« no previous file with comments | « ash/desktop_background/desktop_background_controller.cc ('k') | ash/host/ash_window_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698