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

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

Issue 11363124: Move DisplayManager and DisplayChangeObserverX11 from aura to ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix rebase Created 8 years, 1 month 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
« no previous file with comments | « ash/system/chromeos/tray_display.h ('k') | ash/test/ash_test_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/chromeos/tray_display.cc
diff --git a/ash/system/chromeos/tray_display.cc b/ash/system/chromeos/tray_display.cc
index 1a09c2e747d8338652af9b5b445a8efef4f94d06..bf958d6063c2e0f6d2dab13cc7d1bb66b547ee00 100644
--- a/ash/system/chromeos/tray_display.cc
+++ b/ash/system/chromeos/tray_display.cc
@@ -5,7 +5,7 @@
#include "ash/system/chromeos/tray_display.h"
#include "ash/display/display_controller.h"
-#include "ash/display/multi_display_manager.h"
+#include "ash/display/display_manager.h"
#include "ash/screen_ash.h"
#include "ash/shell.h"
#include "ash/system/tray/system_tray.h"
@@ -15,7 +15,6 @@
#include "base/utf_string_conversions.h"
#include "grit/ash_resources.h"
#include "grit/ash_strings.h"
-#include "ui/aura/display_manager.h"
#include "ui/aura/env.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
@@ -78,8 +77,7 @@ class DisplayView : public ash::internal::ActionableView {
private:
// Returns the name of the currently connected external display.
string16 GetExternalDisplayName() {
- MultiDisplayManager* display_manager = static_cast<MultiDisplayManager*>(
- aura::Env::GetInstance()->display_manager());
+ DisplayManager* display_manager = Shell::GetInstance()->display_manager();
gfx::Display external_display(gfx::Display::kInvalidDisplayID);
if (display_manager->HasInternalDisplay()) {
@@ -118,13 +116,13 @@ class DisplayView : public ash::internal::ActionableView {
TrayDisplay::TrayDisplay()
: default_(NULL) {
- aura::Env::GetInstance()->display_manager()->AddObserver(this);
- ash::Shell::GetInstance()->output_configurator()->AddObserver(this);
+ Shell::GetScreen()->AddObserver(this);
+ Shell::GetInstance()->output_configurator()->AddObserver(this);
}
TrayDisplay::~TrayDisplay() {
- aura::Env::GetInstance()->display_manager()->RemoveObserver(this);
- ash::Shell::GetInstance()->output_configurator()->RemoveObserver(this);
+ Shell::GetScreen()->RemoveObserver(this);
+ Shell::GetInstance()->output_configurator()->RemoveObserver(this);
}
views::View* TrayDisplay::CreateDefaultView(user::LoginStatus status) {
« no previous file with comments | « ash/system/chromeos/tray_display.h ('k') | ash/test/ash_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698