diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-17 21:55:45 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-17 21:55:45 +0000 |
commit | f92607ac6adf31458746cdba937193e6b21f4214 (patch) | |
tree | 494fd66f717bd86b91fb27b28c50bd039efd1355 | |
parent | 021f64dba3753651861215133adb175c5b6aee17 (diff) | |
download | chromium_src-f92607ac6adf31458746cdba937193e6b21f4214.zip chromium_src-f92607ac6adf31458746cdba937193e6b21f4214.tar.gz chromium_src-f92607ac6adf31458746cdba937193e6b21f4214.tar.bz2 |
Remove obsolete code for secondary display
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/11194032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162544 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | ash/ash.gyp | 2 | ||||
-rw-r--r-- | ash/ash_strings.grd | 6 | ||||
-rw-r--r-- | ash/display/secondary_display_view.cc | 111 | ||||
-rw-r--r-- | ash/display/secondary_display_view.h | 24 | ||||
-rw-r--r-- | ash/resources/ash_resources.grd | 1 | ||||
-rw-r--r-- | ash/shell.cc | 1 |
6 files changed, 0 insertions, 145 deletions
diff --git a/ash/ash.gyp b/ash/ash.gyp index bebcd45..20dfb11 100644 --- a/ash/ash.gyp +++ b/ash/ash.gyp @@ -84,8 +84,6 @@ 'display/output_configurator_animation.h', 'display/screen_position_controller.cc', 'display/screen_position_controller.h', - 'display/secondary_display_view.cc', - 'display/secondary_display_view.h', 'display/shared_display_edge_indicator.cc', 'display/shared_display_edge_indicator.h', 'drag_drop/drag_drop_controller.cc', diff --git a/ash/ash_strings.grd b/ash/ash_strings.grd index 04b433e..b2deec3 100644 --- a/ash/ash_strings.grd +++ b/ash/ash_strings.grd @@ -431,12 +431,6 @@ Press Search or Shift to cancel. <message name="IDS_ASH_STATUS_TRAY_NO_NETWORKS" desc="The message to display in the network info bubble when it is otherwise empty."> No network information available </message> - <message name="IDS_ASH_SECONDARY_MONITOR" desc="The message shown on the secondary monitors."> - This screen intentionally left blank - </message> - <message name="IDS_ASH_SECONDARY_MONITOR_SHORTCUT" desc="The shortcut text on the secondary monitors."> - Ctrl + - </message> <message name="IDS_ASH_STATUS_TRAY_PREVIOUS_MENU" desc="The accessible text for header entries for detailed versions of status tray items."> Previous menu </message> diff --git a/ash/display/secondary_display_view.cc b/ash/display/secondary_display_view.cc deleted file mode 100644 index a79237b..0000000 --- a/ash/display/secondary_display_view.cc +++ /dev/null @@ -1,111 +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/display/secondary_display_view.h" - -#include "grit/ash_resources.h" -#include "grit/ash_strings.h" -#include "third_party/skia/include/core/SkColor.h" -#include "ui/aura/window.h" -#include "ui/base/l10n/l10n_util.h" -#include "ui/base/resource/resource_bundle.h" -#include "ui/views/background.h" -#include "ui/views/controls/image_view.h" -#include "ui/views/controls/label.h" -#include "ui/views/view.h" -#include "ui/views/widget/widget.h" -#include "ui/views/widget/widget_delegate.h" - -namespace ash { -namespace { - -// Colors for the background, the message text and the shortcut text. -const SkColor kBackgroundColor = SkColorSetRGB(0x33, 0x33, 0x33); -const SkColor kTextColor = SkColorSetRGB(127, 127, 127); - -// A view to be displayed on secondary display. -class SecondaryDisplayView : public views::WidgetDelegateView { - public: - SecondaryDisplayView() { - Init(); - } - virtual ~SecondaryDisplayView() { - } - - void Init() { - ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); - - set_background(views::Background::CreateSolidBackground(kBackgroundColor)); - message_ = new views::Label( - l10n_util::GetStringUTF16(IDS_ASH_SECONDARY_MONITOR)); - message_->SetAutoColorReadabilityEnabled(false); - message_->SetFont(rb.GetFont(ui::ResourceBundle::LargeFont)); - message_->SetHorizontalAlignment(views::Label::ALIGN_CENTER); - message_->SetEnabledColor(kTextColor); - AddChildView(message_); - - shortcut_text_ = new views::Label( - l10n_util::GetStringUTF16(IDS_ASH_SECONDARY_MONITOR_SHORTCUT)); - shortcut_text_->SetAutoColorReadabilityEnabled(false); - shortcut_text_->SetFont(rb.GetFont(ui::ResourceBundle::MediumFont)); - shortcut_text_->SetHorizontalAlignment(views::Label::ALIGN_CENTER); - shortcut_text_->SetEnabledColor(kTextColor); - AddChildView(shortcut_text_); - - shortcut_image_ = new views::ImageView(); - shortcut_image_->SetImage(rb.GetImageSkiaNamed(IDR_AURA_SWITCH_MONITOR)); - AddChildView(shortcut_image_); - } - - virtual void Layout() { - const int kMessagePositionTopMargin = 40; - const int kShortcutPositionBottomMargin = 40; - const int kShortcutMargin = 4; // margin between text and image. - gfx::Rect b = bounds(); - - int msg_height = message_->GetHeightForWidth(b.width()); - message_->SetBounds( - 0, kMessagePositionTopMargin, bounds().width(), msg_height); - - // TODO(oshima): Figure out what to do for RTL. - // Align the shortcut text & image to the center. - gfx::Size text_size = shortcut_text_->GetPreferredSize(); - gfx::Size image_size = shortcut_image_->GetPreferredSize(); - int height = std::max(text_size.height(), image_size.height()); - int y = b.height() - kShortcutPositionBottomMargin - height; - int x = (b.width() - - (text_size.width() + kShortcutMargin + image_size.width())) / 2; - shortcut_text_->SetBounds(x, y + (height - text_size.height()) / 2, - text_size.width(), text_size.height()); - shortcut_image_->SetBounds( - x + text_size.width() + kShortcutMargin, - y + (height - image_size.height()) / 2, - image_size.width(), image_size.height()); - } - - private: - views::Label* message_; - views::Label* shortcut_text_; - views::ImageView* shortcut_image_; - - DISALLOW_COPY_AND_ASSIGN(SecondaryDisplayView); -}; - -} // namespace - -views::Widget* CreateSecondaryDisplayWidget(aura::Window* parent) { - views::Widget* desktop_widget = new views::Widget; - views::Widget::InitParams params( - views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); - SecondaryDisplayView* view = new SecondaryDisplayView(); - params.delegate = view; - params.parent = parent; - desktop_widget->Init(params); - desktop_widget->SetContentsView(view); - desktop_widget->Show(); - desktop_widget->GetNativeView()->SetName("SecondaryDisplay"); - return desktop_widget; -} - -} // namespace ash diff --git a/ash/display/secondary_display_view.h b/ash/display/secondary_display_view.h deleted file mode 100644 index c9cff10..0000000 --- a/ash/display/secondary_display_view.h +++ /dev/null @@ -1,24 +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_DISPLAY_SECONDARY_DISPLAY_VIEW_H_ -#define ASH_DISPLAY_SECONDARY_DISPLAY_VIEW_H_ - -namespace aura { -class Window; -} - -namespace views { -class Widget; -} - -namespace ash { - -// Creates the widget that hosts the static message displayed on the -// secondary display. -views::Widget* CreateSecondaryDisplayWidget(aura::Window* parent); - -} // namespace ash - -#endif // ASH_DISPLAY_SECONDARY_DISPLAY_VIEW_H_ diff --git a/ash/resources/ash_resources.grd b/ash/resources/ash_resources.grd index 58a9d5f..805fbeb 100644 --- a/ash/resources/ash_resources.grd +++ b/ash/resources/ash_resources.grd @@ -98,7 +98,6 @@ <structure type="chrome_scaled_image" name="IDR_AURA_SHADOW_SMALL_TOP" file="common/small_shadow_top.png" /> <structure type="chrome_scaled_image" name="IDR_AURA_SHADOW_SMALL_TOP_LEFT" file="common/small_shadow_top_left.png" /> <structure type="chrome_scaled_image" name="IDR_AURA_SHADOW_SMALL_TOP_RIGHT" file="common/small_shadow_top_right.png" /> - <structure type="chrome_scaled_image" name="IDR_AURA_SWITCH_MONITOR" file="common/switch_monitor.png" /> <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_ACCESSIBILITY" file="common/status_accessibility_mode.png" /> <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_ACCESSIBILITY_DARK" file="common/status_accessibility_dark.png" /> <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_BLUETOOTH" file="common/status_bluetooth.png" /> diff --git a/ash/shell.cc b/ash/shell.cc index 9a93d18..90036a9 100644 --- a/ash/shell.cc +++ b/ash/shell.cc @@ -17,7 +17,6 @@ #include "ash/display/mouse_cursor_event_filter.h" #include "ash/display/multi_display_manager.h" #include "ash/display/screen_position_controller.h" -#include "ash/display/secondary_display_view.h" #include "ash/drag_drop/drag_drop_controller.h" #include "ash/focus_cycler.h" #include "ash/high_contrast/high_contrast_controller.h" |