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

Unified Diff: ash/system/chromeos/screen_layout_observer.cc

Issue 2445583002: Relocate display_manager from ash to ui (Closed)
Patch Set: Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: ash/system/chromeos/screen_layout_observer.cc
diff --git a/ash/system/chromeos/screen_layout_observer.cc b/ash/system/chromeos/screen_layout_observer.cc
index 38cda20f996b45466f8e8bf1183c418c0b1ac4d4..e06405029d2f7affdb69dea701af3fd616e75e5e 100644
--- a/ash/system/chromeos/screen_layout_observer.cc
+++ b/ash/system/chromeos/screen_layout_observer.cc
@@ -17,7 +17,6 @@
#include "ash/common/system/tray/tray_constants.h"
#include "ash/common/system/tray/tray_notification_view.h"
#include "ash/common/wm_shell.h"
-#include "ash/display/display_manager.h"
#include "ash/display/screen_orientation_controller_chromeos.h"
#include "ash/shell.h"
#include "base/bind.h"
@@ -28,6 +27,7 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/display/display.h"
+#include "ui/display/manager/display_manager.h"
#include "ui/message_center/message_center.h"
#include "ui/message_center/notification.h"
#include "ui/message_center/notification_delegate.h"
@@ -37,7 +37,7 @@ using message_center::Notification;
namespace ash {
namespace {
-DisplayManager* GetDisplayManager() {
+display::DisplayManager* GetDisplayManager() {
return Shell::GetInstance()->display_manager();
}
@@ -47,7 +47,7 @@ base::string16 GetDisplayName(int64_t display_id) {
}
base::string16 GetDisplaySize(int64_t display_id) {
- DisplayManager* display_manager = GetDisplayManager();
+ display::DisplayManager* display_manager = GetDisplayManager();
const display::Display* display =
&display_manager->GetDisplayForId(display_id);
@@ -101,7 +101,7 @@ void OpenSettingsFromNotification() {
// Returns the name of the currently connected external display. This should not
// be used when the external display is used for mirroring.
base::string16 GetExternalDisplayName() {
- DisplayManager* display_manager = GetDisplayManager();
+ display::DisplayManager* display_manager = GetDisplayManager();
DCHECK(!display_manager->IsInMirrorMode());
int64_t external_id = display::Display::kInvalidDisplayID;
@@ -139,7 +139,7 @@ base::string16 GetExternalDisplayName() {
}
base::string16 GetDisplayMessage(base::string16* additional_message_out) {
- DisplayManager* display_manager = GetDisplayManager();
+ display::DisplayManager* display_manager = GetDisplayManager();
if (display_manager->GetNumDisplays() > 1) {
if (display::Display::HasInternalDisplay()) {
return l10n_util::GetStringFUTF16(IDS_ASH_STATUS_TRAY_DISPLAY_EXTENDED,
@@ -195,7 +195,7 @@ void ScreenLayoutObserver::UpdateDisplayInfo(
old_info->swap(display_info_);
display_info_.clear();
- DisplayManager* display_manager = GetDisplayManager();
+ display::DisplayManager* display_manager = GetDisplayManager();
for (size_t i = 0; i < display_manager->GetNumDisplays(); ++i) {
int64_t id = display_manager->GetDisplayAt(i).id();
display_info_[id] = display_manager->GetDisplayInfo(id);

Powered by Google App Engine
This is Rietveld 408576698