| Index: ash/system/status_area_widget.cc
|
| diff --git a/ash/system/status_area_widget.cc b/ash/system/status_area_widget.cc
|
| index 305dab80eaba79c9a10d1c68000cc1576891d3d7..21f225a3add7ce50f86ded97028f3d7f64d92bc0 100644
|
| --- a/ash/system/status_area_widget.cc
|
| +++ b/ash/system/status_area_widget.cc
|
| @@ -11,6 +11,7 @@
|
| #include "ash/shell_delegate.h"
|
| #include "ash/shell_window_ids.h"
|
| #include "ash/system/bluetooth/bluetooth_observer.h"
|
| +#include "ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.h"
|
| #include "ash/system/logout_button/logout_button_tray.h"
|
| #include "ash/system/status_area_widget_delegate.h"
|
| #include "ash/system/tray/system_tray.h"
|
| @@ -32,6 +33,7 @@ StatusAreaWidget::StatusAreaWidget(aura::Window* status_container)
|
| system_tray_(NULL),
|
| web_notification_tray_(NULL),
|
| logout_button_tray_(NULL),
|
| + virtual_keyboard_tray_(NULL),
|
| login_status_(user::LOGGED_IN_NONE) {
|
| views::Widget::InitParams params(
|
| views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
|
| @@ -51,6 +53,7 @@ void StatusAreaWidget::CreateTrayViews() {
|
| AddSystemTray();
|
| AddWebNotificationTray();
|
| AddLogoutButtonTray();
|
| + AddVirtualKeyboardTray();
|
| SystemTrayDelegate* delegate =
|
| ash::Shell::GetInstance()->system_tray_delegate();
|
| DCHECK(delegate);
|
| @@ -61,6 +64,8 @@ void StatusAreaWidget::CreateTrayViews() {
|
| web_notification_tray_->Initialize();
|
| if (logout_button_tray_)
|
| logout_button_tray_->Initialize();
|
| + if (virtual_keyboard_tray_)
|
| + virtual_keyboard_tray_->Initialize();
|
| UpdateAfterLoginStatusChange(delegate->GetUserLoginStatus());
|
| }
|
|
|
| @@ -74,6 +79,8 @@ void StatusAreaWidget::Shutdown() {
|
| web_notification_tray_ = NULL;
|
| delete system_tray_;
|
| system_tray_ = NULL;
|
| + delete virtual_keyboard_tray_;
|
| + virtual_keyboard_tray_ = NULL;
|
| }
|
|
|
| bool StatusAreaWidget::ShouldShowShelf() const {
|
| @@ -119,6 +126,11 @@ void StatusAreaWidget::AddLogoutButtonTray() {
|
| status_area_widget_delegate_->AddTray(logout_button_tray_);
|
| }
|
|
|
| +void StatusAreaWidget::AddVirtualKeyboardTray() {
|
| + virtual_keyboard_tray_ = new VirtualKeyboardTray(this);
|
| + status_area_widget_delegate_->AddTray(virtual_keyboard_tray_);
|
| +}
|
| +
|
| void StatusAreaWidget::SetShelfAlignment(ShelfAlignment alignment) {
|
| status_area_widget_delegate_->set_alignment(alignment);
|
| if (system_tray_)
|
| @@ -127,6 +139,8 @@ void StatusAreaWidget::SetShelfAlignment(ShelfAlignment alignment) {
|
| web_notification_tray_->SetShelfAlignment(alignment);
|
| if (logout_button_tray_)
|
| logout_button_tray_->SetShelfAlignment(alignment);
|
| + if (virtual_keyboard_tray_)
|
| + virtual_keyboard_tray_->SetShelfAlignment(alignment);
|
| status_area_widget_delegate_->UpdateLayout();
|
| }
|
|
|
|
|