summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ash/ash.gyp2
-rw-r--r--ash/ash_strings.grd6
-rw-r--r--ash/system/status_area_widget.cc3
-rw-r--r--ash/system/tray/system_tray.cc3
-rw-r--r--ash/system/tray/system_tray_delegate.h3
-rw-r--r--ash/system/tray_display.cc163
-rw-r--r--ash/system/tray_display.h56
-rw-r--r--chrome/browser/chromeos/system/ash_system_tray_delegate.cc5
-rw-r--r--ui/base/x/x11_util.cc14
-rw-r--r--ui/base/x/x11_util.h7
-rw-r--r--ui/resources/default_100_percent/ash/status_display.pngbin1327 -> 0 bytes
-rw-r--r--ui/resources/default_100_percent/ash/status_display_hover.pngbin1330 -> 0 bytes
-rw-r--r--ui/resources/default_100_percent/ash/status_display_pressed.pngbin1364 -> 0 bytes
-rw-r--r--ui/resources/default_200_percent/ash/status_display.pngbin1626 -> 0 bytes
-rw-r--r--ui/resources/default_200_percent/ash/status_display_hover.pngbin1640 -> 0 bytes
-rw-r--r--ui/resources/default_200_percent/ash/status_display_pressed.pngbin1666 -> 0 bytes
-rw-r--r--ui/resources/ui_resources.grd3
17 files changed, 3 insertions, 262 deletions
diff --git a/ash/ash.gyp b/ash/ash.gyp
index 8019e27..e4b0877 100644
--- a/ash/ash.gyp
+++ b/ash/ash.gyp
@@ -221,8 +221,6 @@
'system/tray_accessibility.h',
'system/tray_caps_lock.cc',
'system/tray_caps_lock.h',
- 'system/tray_display.cc',
- 'system/tray_display.h',
'system/tray_update.cc',
'system/tray_update.h',
'system/user/login_status.h',
diff --git a/ash/ash_strings.grd b/ash/ash_strings.grd
index c36f02b..c1fd77c 100644
--- a/ash/ash_strings.grd
+++ b/ash/ash_strings.grd
@@ -328,12 +328,6 @@ Press Ctrl+Alt+Z to cancel.
<message name="IDS_ASH_STATUS_TRAY_BLUETOOTH_ADD_DEVICE" desc="The label used in the tray popup to add a bluetooth device.">
Add device...
</message>
- <message name="IDS_ASH_STATUS_TRAY_DISPLAY_MIRRORING" desc="The label used in the tray to show that the current status is mirroring.">
- Mirroring to <ph name="DISPLAY_NAME">$1</ph>
- </message>
- <message name="IDS_ASH_STATUS_TRAY_DISPLAY_EXTENDED" desc="The label used in the tray to show that the current status is extended.">
- Extending screen to <ph name="DISPLAY_NAME">$1</ph>
- </message>
<message name="IDS_ASH_STATUS_TRAY_DRIVE_SYNCING" desc="The label in the tray to indicate onoing file sync operations.">
Syncing <ph name="count">$1<ex>3</ex></ph> file(s)
</message>
diff --git a/ash/system/status_area_widget.cc b/ash/system/status_area_widget.cc
index 5dfd8a8..a3e294c 100644
--- a/ash/system/status_area_widget.cc
+++ b/ash/system/status_area_widget.cc
@@ -116,9 +116,6 @@ class DummySystemTrayDelegate : public SystemTrayDelegate {
virtual void ShowBluetoothSettings() OVERRIDE {
}
- virtual void ShowDisplaySettings() OVERRIDE {
- }
-
virtual void ShowDriveSettings() OVERRIDE {
}
diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc
index f2dd2c6..53c982c 100644
--- a/ash/system/tray/system_tray.cc
+++ b/ash/system/tray/system_tray.cc
@@ -27,7 +27,6 @@
#include "ash/system/tray/tray_constants.h"
#include "ash/system/tray_accessibility.h"
#include "ash/system/tray_caps_lock.h"
-#include "ash/system/tray_display.h"
#include "ash/system/tray_update.h"
#include "ash/system/user/login_status.h"
#include "ash/system/user/tray_user.h"
@@ -101,7 +100,6 @@ void SystemTray::CreateItems() {
internal::TrayLocale* tray_locale = new internal::TrayLocale;
internal::TrayUpdate* tray_update = new internal::TrayUpdate;
internal::TraySettings* tray_settings = new internal::TraySettings();
- internal::TrayDisplay* tray_display = new internal::TrayDisplay;
accessibility_observer_ = tray_accessibility;
audio_observer_ = tray_volume;
@@ -127,7 +125,6 @@ void SystemTray::CreateItems() {
AddTrayItem(tray_drive);
AddTrayItem(tray_ime);
AddTrayItem(tray_locale);
- AddTrayItem(tray_display);
AddTrayItem(tray_volume);
AddTrayItem(tray_brightness);
AddTrayItem(tray_update);
diff --git a/ash/system/tray/system_tray_delegate.h b/ash/system/tray/system_tray_delegate.h
index 23d8fc8..e9ab5f5 100644
--- a/ash/system/tray/system_tray_delegate.h
+++ b/ash/system/tray/system_tray_delegate.h
@@ -136,9 +136,6 @@ class SystemTrayDelegate {
// Shows the settings related to bluetooth.
virtual void ShowBluetoothSettings() = 0;
- // Shows settings related to multiple displays.
- virtual void ShowDisplaySettings() = 0;
-
// Shows settings related to Google Drive.
virtual void ShowDriveSettings() = 0;
diff --git a/ash/system/tray_display.cc b/ash/system/tray_display.cc
deleted file mode 100644
index de26733..0000000
--- a/ash/system/tray_display.cc
+++ /dev/null
@@ -1,163 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/tray_display.h"
-
-#include "ash/display/display_controller.h"
-#include "ash/shell.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/system_tray_delegate.h"
-#include "ash/system/tray/tray_constants.h"
-#include "ash/system/tray/tray_views.h"
-#include "base/utf_string_conversions.h"
-#include "grit/ash_strings.h"
-#include "grit/ui_resources.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"
-#include "ui/gfx/image/image.h"
-#include "ui/views/controls/image_view.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/layout/box_layout.h"
-
-#if defined(USE_X11)
-#include "ui/base/x/x11_util.h"
-#endif
-
-namespace ash {
-namespace internal {
-
-class DisplayView : public ash::internal::ActionableView {
- public:
- explicit DisplayView(user::LoginStatus login_status)
- : login_status_(login_status) {
- SetLayoutManager(new
- views::BoxLayout(views::BoxLayout::kHorizontal,
- ash::kTrayPopupPaddingHorizontal, 0,
- ash::kTrayPopupPaddingBetweenItems));
-
- ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
- views::ImageView* image =
- new ash::internal::FixedSizedImageView(0, ash::kTrayPopupItemHeight);
- image->SetImage(
- bundle.GetImageNamed(IDR_AURA_UBER_TRAY_DISPLAY).ToImageSkia());
- AddChildView(image);
- label_ = new views::Label();
- AddChildView(label_);
- Update();
- }
-
- virtual ~DisplayView() {}
-
- void Update() {
-#if defined(OS_CHROMEOS)
- switch (Shell::GetInstance()->output_configurator()->output_state()) {
- case chromeos::STATE_INVALID:
- case chromeos::STATE_HEADLESS:
- case chromeos::STATE_SINGLE:
- SetVisible(false);
- return;
- case chromeos::STATE_DUAL_MIRROR: {
- // Simply assumes that the primary display appears first and the
- // secondary display appears next in the list.
- std::vector<std::string> display_names;
-#if defined(USE_X11)
- std::vector<XID> output_ids;
- ui::GetOutputDeviceHandles(&output_ids);
- display_names = ui::GetDisplayNames(output_ids);
-#endif
- if (display_names.size() > 1) {
- label_->SetText(l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_MIRRORING,
- UTF8ToUTF16(display_names[1])));
- SetVisible(true);
- } else {
- SetVisible(false);
- }
- return;
- }
- case chromeos::STATE_DUAL_PRIMARY_ONLY:
- case chromeos::STATE_DUAL_SECONDARY_ONLY: {
- aura::DisplayManager* display_manager =
- aura::Env::GetInstance()->display_manager();
- if (display_manager->GetNumDisplays() > 1) {
- label_->SetText(l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_EXTENDED,
- UTF8ToUTF16(display_manager->GetDisplayNameAt(1))));
- SetVisible(true);
- } else {
- SetVisible(false);
- }
- return;
- }
- default:
- NOTREACHED();
- }
-#endif // OS_CHROMEOS
- }
-
- private:
- // Overridden from ActionableView.
- virtual bool PerformAction(const ui::Event& event) OVERRIDE {
- if (login_status_ == ash::user::LOGGED_IN_USER ||
- login_status_ == ash::user::LOGGED_IN_OWNER ||
- login_status_ == ash::user::LOGGED_IN_GUEST) {
- ash::Shell::GetInstance()->tray_delegate()->ShowDisplaySettings();
- }
-
- return true;
- }
-
- user::LoginStatus login_status_;
- views::Label* label_;
-
- DISALLOW_COPY_AND_ASSIGN(DisplayView);
-};
-
-TrayDisplay::TrayDisplay()
- : default_(NULL) {
- aura::Env::GetInstance()->display_manager()->AddObserver(this);
-#if defined(OS_CHROMEOS)
- ash::Shell::GetInstance()->output_configurator()->AddObserver(this);
-#endif
-}
-
-TrayDisplay::~TrayDisplay() {
- aura::Env::GetInstance()->display_manager()->RemoveObserver(this);
-#if defined(OS_CHROMEOS)
- ash::Shell::GetInstance()->output_configurator()->RemoveObserver(this);
-#endif
-}
-
-views::View* TrayDisplay::CreateDefaultView(user::LoginStatus status) {
-#if defined(OS_CHROMEOS)
- default_ = new DisplayView(status);
-#endif
- return default_;
-}
-
-void TrayDisplay::OnDisplayBoundsChanged(const gfx::Display& display) {
- if (default_)
- default_->Update();
-}
-
-void TrayDisplay::OnDisplayAdded(const gfx::Display& new_display) {
- if (default_)
- default_->Update();
-}
-
-void TrayDisplay::OnDisplayRemoved(const gfx::Display& old_display) {
- if (default_)
- default_->Update();
-}
-
-void TrayDisplay::OnDisplayModeChanged() {
- if (default_)
- default_->Update();
-}
-
-
-} // namespace internal
-} // namespace ash
diff --git a/ash/system/tray_display.h b/ash/system/tray_display.h
deleted file mode 100644
index 47137c8..0000000
--- a/ash/system/tray_display.h
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_TRAY_DISPLAY_H_
-#define ASH_SYSTEM_TRAY_DISPLAY_H_
-
-#include "ash/system/tray/system_tray_item.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/aura/display_observer.h"
-
-#if defined(OS_CHROMEOS)
-#include "chromeos/display/output_configurator.h"
-#endif
-
-namespace views {
-class View;
-}
-
-namespace ash {
-
-namespace internal {
-class DisplayView;
-
-class TrayDisplay : public SystemTrayItem,
-#if defined(OS_CHROMEOS)
- public chromeos::OutputConfigurator::Observer,
-#endif
- public aura::DisplayObserver {
- public:
- TrayDisplay();
- virtual ~TrayDisplay();
-
- private:
- // Overridden from SystemTrayItem.
- virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
-
- // Overridden from aura::DisplayObserver
- virtual void OnDisplayBoundsChanged(const gfx::Display& display) OVERRIDE;
- virtual void OnDisplayAdded(const gfx::Display& new_display) OVERRIDE;
- virtual void OnDisplayRemoved(const gfx::Display& old_display) OVERRIDE;
-
-#if defined(OS_CHROMEOS)
- // Overridden from chromeos::OutputConfigurator::Observer
- virtual void OnDisplayModeChanged() OVERRIDE;
-#endif
-
- DisplayView* default_;
-
- DISALLOW_COPY_AND_ASSIGN(TrayDisplay);
-};
-
-} // namespace internal
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_DISPLAY_H_
diff --git a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
index fbce1af..ab8c512 100644
--- a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
+++ b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
@@ -322,11 +322,6 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate,
// TODO(sad): Make this work.
}
- virtual void ShowDisplaySettings() OVERRIDE {
- content::RecordAction(content::UserMetricsAction("ShowDisplayOptions"));
- chrome::ShowSettingsSubPage(GetAppropriateBrowser(), "display");
- }
-
virtual void ShowDriveSettings() OVERRIDE {
// TODO(hshi): Open the drive-specific settings page once we put it in.
// For now just show search result for downoads settings.
diff --git a/ui/base/x/x11_util.cc b/ui/base/x/x11_util.cc
index dc738b5..efe05af 100644
--- a/ui/base/x/x11_util.cc
+++ b/ui/base/x/x11_util.cc
@@ -1167,23 +1167,13 @@ bool GetOutputDeviceData(XID output,
return true;
}
-std::vector<std::string> GetDisplayNames(const std::vector<XID>& output_ids) {
- std::vector<std::string> names;
- for (size_t i = 0; i < output_ids.size(); ++i) {
- std::string display_name;
- if (GetOutputDeviceData(output_ids[i], NULL, NULL, &display_name))
- names.push_back(display_name);
- }
- return names;
-}
-
-std::vector<std::string> GetOutputNames(const std::vector<XID>& output_ids) {
+std::vector<std::string> GetOutputNames(std::vector<XID> output_ids) {
std::vector<std::string> names;
Display* display = GetXDisplay();
Window root_window = DefaultRootWindow(display);
XRRScreenResources* screen_resources =
XRRGetScreenResources(display, root_window);
- for (std::vector<XID>::const_iterator iter = output_ids.begin();
+ for (std::vector<XID>::iterator iter = output_ids.begin();
iter != output_ids.end(); ++iter) {
XRROutputInfo* output =
XRRGetOutputInfo(display, screen_resources, *iter);
diff --git a/ui/base/x/x11_util.h b/ui/base/x/x11_util.h
index 66574b3..869ef7c 100644
--- a/ui/base/x/x11_util.h
+++ b/ui/base/x/x11_util.h
@@ -256,13 +256,8 @@ UI_EXPORT bool GetOutputDeviceData(XID output,
uint32* serial_number,
std::string* human_readable_name);
-// Gets the names of the all displays physically connected to the system.
-UI_EXPORT std::vector<std::string> GetDisplayNames(
- const std::vector<XID>& output_id);
-
// Gets the name of outputs given by |output_id|.
-UI_EXPORT std::vector<std::string> GetOutputNames(
- const std::vector<XID>& output_id);
+UI_EXPORT std::vector<std::string> GetOutputNames(std::vector<XID> output_id);
enum WindowManagerName {
WM_UNKNOWN,
diff --git a/ui/resources/default_100_percent/ash/status_display.png b/ui/resources/default_100_percent/ash/status_display.png
deleted file mode 100644
index a65d03c..0000000
--- a/ui/resources/default_100_percent/ash/status_display.png
+++ /dev/null
Binary files differ
diff --git a/ui/resources/default_100_percent/ash/status_display_hover.png b/ui/resources/default_100_percent/ash/status_display_hover.png
deleted file mode 100644
index bedae8b..0000000
--- a/ui/resources/default_100_percent/ash/status_display_hover.png
+++ /dev/null
Binary files differ
diff --git a/ui/resources/default_100_percent/ash/status_display_pressed.png b/ui/resources/default_100_percent/ash/status_display_pressed.png
deleted file mode 100644
index da789b8..0000000
--- a/ui/resources/default_100_percent/ash/status_display_pressed.png
+++ /dev/null
Binary files differ
diff --git a/ui/resources/default_200_percent/ash/status_display.png b/ui/resources/default_200_percent/ash/status_display.png
deleted file mode 100644
index ca4325145..0000000
--- a/ui/resources/default_200_percent/ash/status_display.png
+++ /dev/null
Binary files differ
diff --git a/ui/resources/default_200_percent/ash/status_display_hover.png b/ui/resources/default_200_percent/ash/status_display_hover.png
deleted file mode 100644
index 01bb79f..0000000
--- a/ui/resources/default_200_percent/ash/status_display_hover.png
+++ /dev/null
Binary files differ
diff --git a/ui/resources/default_200_percent/ash/status_display_pressed.png b/ui/resources/default_200_percent/ash/status_display_pressed.png
deleted file mode 100644
index c00cf8b..0000000
--- a/ui/resources/default_200_percent/ash/status_display_pressed.png
+++ /dev/null
Binary files differ
diff --git a/ui/resources/ui_resources.grd b/ui/resources/ui_resources.grd
index 839b5ea4..33ed398 100644
--- a/ui/resources/ui_resources.grd
+++ b/ui/resources/ui_resources.grd
@@ -126,9 +126,6 @@
<structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_CELLULAR_DISABLED_HOVER" file="ash/status_cellular_disabled_h.png" />
<structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_CELLULAR_ENABLED" file="ash/status_cellular_enabled.png" />
<structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_CELLULAR_ENABLED_HOVER" file="ash/status_cellular_enabled_h.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_DISPLAY" file="ash/status_display.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_DISPLAY_HOVER" file="ash/status_display_hover.png" />
- <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_DISPLAY_PRESSED" file="ash/status_display_pressed.png" />
<structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_DRIVE" file="ash/status_drive.png" />
<structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_DRIVE_CANCEL" file="ash/status_drive_item_cancel.png" />
<structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_DRIVE_CANCEL_HOVER" file="ash/status_drive_item_cancel_hover.png" />