| Index: chrome/browser/chromeos/login/webui_login_view.cc
|
| diff --git a/chrome/browser/chromeos/login/webui_login_view.cc b/chrome/browser/chromeos/login/webui_login_view.cc
|
| index de289efb78467aee0d58e84841a10a93b34f1ff2..78ba39b3f4b5b87ad0b85f6c3277afed587cb20d 100644
|
| --- a/chrome/browser/chromeos/login/webui_login_view.cc
|
| +++ b/chrome/browser/chromeos/login/webui_login_view.cc
|
| @@ -15,7 +15,6 @@
|
| #include "chrome/browser/chromeos/cros/cros_library.h"
|
| #include "chrome/browser/chromeos/login/proxy_settings_dialog.h"
|
| #include "chrome/browser/chromeos/login/webui_login_display.h"
|
| -#include "chrome/browser/chromeos/status/status_area_view.h"
|
| #include "chrome/browser/profiles/profile_manager.h"
|
| #include "chrome/browser/ui/views/ash/chrome_shell_delegate.h"
|
| #include "chrome/browser/ui/views/dom_view.h"
|
| @@ -108,18 +107,12 @@ void RightAlignedView::ChildPreferredSizeChanged(View* child) {
|
|
|
| namespace chromeos {
|
|
|
| -// static
|
| -const int WebUILoginView::kStatusAreaCornerPadding = 5;
|
| -
|
| // WebUILoginView public: ------------------------------------------------------
|
|
|
| WebUILoginView::WebUILoginView()
|
| - : status_area_(NULL),
|
| - webui_login_(NULL),
|
| + : webui_login_(NULL),
|
| login_window_(NULL),
|
| - status_window_(NULL),
|
| host_window_frozen_(false),
|
| - status_area_visibility_on_init_(true),
|
| login_page_is_loaded_(false),
|
| should_emit_login_prompt_visible_(true) {
|
|
|
| @@ -160,10 +153,6 @@ WebUILoginView::~WebUILoginView() {
|
| ash::SystemTray* tray = ash::Shell::GetInstance()->tray();
|
| if (tray)
|
| tray->SetNextFocusableView(NULL);
|
| -
|
| - if (status_window_)
|
| - status_window_->CloseNow();
|
| - status_window_ = NULL;
|
| }
|
|
|
| void WebUILoginView::Init(views::Widget* login_window) {
|
| @@ -227,11 +216,6 @@ void WebUILoginView::OpenProxySettings() {
|
| dialog->Show();
|
| }
|
|
|
| -void WebUILoginView::SetStatusAreaEnabled(bool enable) {
|
| - if (status_area_)
|
| - status_area_->MakeButtonsActive(enable);
|
| -}
|
| -
|
| void WebUILoginView::SetStatusAreaVisible(bool visible) {
|
| ash::SystemTray* tray = ash::Shell::GetInstance()->tray();
|
| if (tray) {
|
| @@ -240,10 +224,6 @@ void WebUILoginView::SetStatusAreaVisible(bool visible) {
|
| else
|
| tray->GetWidget()->Hide();
|
| }
|
| - if (status_area_)
|
| - status_area_->SetVisible(visible);
|
| - else
|
| - status_area_visibility_on_init_ = visible;
|
| }
|
|
|
| // WebUILoginView protected: ---------------------------------------------------
|
| @@ -268,30 +248,6 @@ void WebUILoginView::AboutToRequestFocusFromTabTraversal(bool reverse) {
|
| GetWidget()->Activate();
|
| }
|
|
|
| -// Overridden from StatusAreaButton::Delegate:
|
| -
|
| -bool WebUILoginView::ShouldExecuteStatusAreaCommand(
|
| - const views::View* button_view, int command_id) const {
|
| - if (command_id == StatusAreaButton::Delegate::SHOW_NETWORK_OPTIONS)
|
| - return true;
|
| - return false;
|
| -}
|
| -
|
| -void WebUILoginView::ExecuteStatusAreaCommand(
|
| - const views::View* button_view, int command_id) {
|
| - if (command_id == StatusAreaButton::Delegate::SHOW_NETWORK_OPTIONS)
|
| - OpenProxySettings();
|
| -}
|
| -
|
| -StatusAreaButton::TextStyle WebUILoginView::GetStatusAreaTextStyle() const {
|
| - return StatusAreaButton::GRAY_PLAIN_LIGHT;
|
| -}
|
| -
|
| -void WebUILoginView::ButtonVisibilityChanged(views::View* button_view) {
|
| - if (status_area_)
|
| - status_area_->UpdateButtonVisibility();
|
| -}
|
| -
|
| void WebUILoginView::OnRenderHostCreated(RenderViewHost* host) {
|
| new SnifferObserver(host, GetWebUI());
|
| }
|
| @@ -307,11 +263,6 @@ void WebUILoginView::OnTabMainFrameRender() {
|
| VLOG(1) << "WebUI login main frame rendered.";
|
| tab_watcher_.reset();
|
|
|
| - StatusAreaViewChromeos::SetScreenMode(GetScreenMode());
|
| - // In aura there's a global status area shown already.
|
| - status_area_ = ChromeShellDelegate::instance()->GetStatusArea();
|
| - status_area_->SetVisible(status_area_visibility_on_init_);
|
| -
|
| if (should_emit_login_prompt_visible_) {
|
| chromeos::DBusThreadManager::Get()->GetSessionManagerClient()->
|
| EmitLoginPromptVisible();
|
| @@ -323,50 +274,6 @@ void WebUILoginView::OnTabMainFrameRender() {
|
| oobe_ui->OnLoginPromptVisible();
|
| }
|
|
|
| -void WebUILoginView::InitStatusArea() {
|
| - DCHECK(status_area_ == NULL);
|
| - DCHECK(status_window_ == NULL);
|
| - StatusAreaViewChromeos* status_area_chromeos = new StatusAreaViewChromeos();
|
| - status_area_chromeos->Init(this);
|
| - status_area_ = status_area_chromeos;
|
| - status_area_->SetVisible(status_area_visibility_on_init_);
|
| -
|
| - // Width of |status_window| is meant to be large enough.
|
| - // The current value of status_area_->GetPreferredSize().width()
|
| - // will be too small when button status is changed.
|
| - // (e.g. when CapsLock indicator appears)
|
| - gfx::Size widget_size(width()/2,
|
| - status_area_->GetPreferredSize().height());
|
| - const int widget_x = base::i18n::IsRTL() ?
|
| - kStatusAreaCornerPadding :
|
| - width() - widget_size.width() - kStatusAreaCornerPadding;
|
| - gfx::Rect widget_bounds(widget_x, kStatusAreaCornerPadding,
|
| - widget_size.width(), widget_size.height());
|
| - // TODO(nkostylev|oshima): Make status area in the same window as
|
| - // |webui_login_| once RenderWidgetHostViewViews and compositor are
|
| - // ready. This will also avoid having to override the status area
|
| - // widget type for the lock screen.
|
| - views::Widget::InitParams widget_params(GetStatusAreaWidgetType());
|
| - widget_params.bounds = widget_bounds;
|
| - widget_params.transparent = true;
|
| - widget_params.parent_widget = login_window_;
|
| - status_window_ = new views::Widget;
|
| - status_window_->Init(widget_params);
|
| -
|
| - views::View* contents_view = new RightAlignedView;
|
| - contents_view->AddChildView(status_area_);
|
| - status_window_->SetContentsView(contents_view);
|
| - status_window_->Show();
|
| -}
|
| -
|
| -StatusAreaViewChromeos::ScreenMode WebUILoginView::GetScreenMode() {
|
| - return StatusAreaViewChromeos::LOGIN_MODE_WEBUI;
|
| -}
|
| -
|
| -views::Widget::InitParams::Type WebUILoginView::GetStatusAreaWidgetType() {
|
| - return views::Widget::InitParams::TYPE_WINDOW_FRAMELESS;
|
| -}
|
| -
|
| void WebUILoginView::Observe(int type,
|
| const content::NotificationSource& source,
|
| const content::NotificationDetails& details) {
|
| @@ -413,17 +320,6 @@ bool WebUILoginView::IsPopupOrPanel(const WebContents* source) const {
|
| }
|
|
|
| bool WebUILoginView::TakeFocus(bool reverse) {
|
| - if (status_area_ && status_area_->visible()) {
|
| - // Forward the focus to the status area.
|
| - base::Callback<void(bool)> return_focus_cb =
|
| - base::Bind(&WebUILoginView::ReturnFocus, base::Unretained(this));
|
| - status_area_->TakeFocus(reverse, return_focus_cb);
|
| - status_area_->GetWidget()->Activate();
|
| -
|
| - ash::SystemTray* tray = ash::Shell::GetInstance()->tray();
|
| - if (tray)
|
| - tray->SetNextFocusableView(this);
|
| - }
|
| return true;
|
| }
|
|
|
|
|