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

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

Issue 2523873002: Remove DisplayChangeObserver ash dependencies. (Closed)
Patch Set: Remove comment. 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
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/aura/wm_window_aura.h" 7 #include "ash/aura/wm_window_aura.h"
8 #include "ash/common/shelf/shelf_widget.h" 8 #include "ash/common/shelf/shelf_widget.h"
9 #include "ash/common/wm/root_window_finder.h" 9 #include "ash/common/wm/root_window_finder.h"
10 #include "ash/display/ash_display_string_provider.h"
10 #include "ash/display/window_tree_host_manager.h" 11 #include "ash/display/window_tree_host_manager.h"
11 #include "ash/root_window_controller.h" 12 #include "ash/root_window_controller.h"
12 #include "ash/root_window_settings.h" 13 #include "ash/root_window_settings.h"
13 #include "ash/shell.h" 14 #include "ash/shell.h"
14 #include "base/logging.h" 15 #include "base/logging.h"
15 #include "ui/aura/client/screen_position_client.h" 16 #include "ui/aura/client/screen_position_client.h"
16 #include "ui/aura/env.h" 17 #include "ui/aura/env.h"
17 #include "ui/aura/window_event_dispatcher.h" 18 #include "ui/aura/window_event_dispatcher.h"
18 #include "ui/display/display.h" 19 #include "ui/display/display.h"
19 #include "ui/display/display_finder.h" 20 #include "ui/display/display_finder.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 179
179 // static 180 // static
180 display::DisplayManager* ScreenAsh::CreateDisplayManager() { 181 display::DisplayManager* ScreenAsh::CreateDisplayManager() {
181 std::unique_ptr<ScreenAsh> screen(new ScreenAsh); 182 std::unique_ptr<ScreenAsh> screen(new ScreenAsh);
182 183
183 display::Screen* current = display::Screen::GetScreen(); 184 display::Screen* current = display::Screen::GetScreen();
184 // If there is no native, or the native was for shutdown, 185 // If there is no native, or the native was for shutdown,
185 // use ash's screen. 186 // use ash's screen.
186 if (!current || current == screen_for_shutdown) 187 if (!current || current == screen_for_shutdown)
187 display::Screen::SetScreenInstance(screen.get()); 188 display::Screen::SetScreenInstance(screen.get());
188 return new display::DisplayManager(std::move(screen)); 189 return new display::DisplayManager(
190 std::move(screen), base::MakeUnique<AshDisplayStringProvider>());
189 } 191 }
190 192
191 // static 193 // static
192 void ScreenAsh::CreateScreenForShutdown() { 194 void ScreenAsh::CreateScreenForShutdown() {
193 delete screen_for_shutdown; 195 delete screen_for_shutdown;
194 screen_for_shutdown = new ScreenForShutdown(display::Screen::GetScreen()); 196 screen_for_shutdown = new ScreenForShutdown(display::Screen::GetScreen());
195 display::Screen::SetScreenInstance(screen_for_shutdown); 197 display::Screen::SetScreenInstance(screen_for_shutdown);
196 } 198 }
197 199
198 } // namespace ash 200 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698