Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/system/status_area_widget.h" | 5 #include "ash/system/status_area_widget.h" |
| 6 | 6 |
| 7 #include "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
| 8 #include "ash/shelf/shelf_layout_manager.h" | 8 #include "ash/shelf/shelf_layout_manager.h" |
| 9 #include "ash/shelf/shelf_widget.h" | 9 #include "ash/shelf/shelf_widget.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 66 | 66 |
| 67 SystemTrayDelegate* delegate = | 67 SystemTrayDelegate* delegate = |
| 68 ash::Shell::GetInstance()->system_tray_delegate(); | 68 ash::Shell::GetInstance()->system_tray_delegate(); |
| 69 DCHECK(delegate); | 69 DCHECK(delegate); |
| 70 // Initialize after all trays have been created. | 70 // Initialize after all trays have been created. |
| 71 system_tray_->InitializeTrayItems(delegate); | 71 system_tray_->InitializeTrayItems(delegate); |
| 72 web_notification_tray_->Initialize(); | 72 web_notification_tray_->Initialize(); |
| 73 #if defined(OS_CHROMEOS) | 73 #if defined(OS_CHROMEOS) |
| 74 logout_button_tray_->Initialize(); | 74 logout_button_tray_->Initialize(); |
| 75 virtual_keyboard_tray_->Initialize(); | 75 virtual_keyboard_tray_->Initialize(); |
| 76 // Initial virtual keyboard alignment for crbug.com/604621. | |
| 77 virtual_keyboard_tray_->SetShelfAlignment( | |
| 78 virtual_keyboard_tray_->shelf_alignment()); | |
|
stevenjb
2016/05/04 22:57:33
Should we call SetShelfAlignment(system_tray_->she
Qiang(Joe) Xu
2016/05/04 23:26:45
agree, that is better.
stevenjb
2016/05/05 16:20:49
Sorry, I wasn't clear. I was suggesting:
SetShe
| |
| 76 #endif | 79 #endif |
| 77 overview_button_tray_->Initialize(); | 80 overview_button_tray_->Initialize(); |
| 78 UpdateAfterLoginStatusChange(delegate->GetUserLoginStatus()); | 81 UpdateAfterLoginStatusChange(delegate->GetUserLoginStatus()); |
| 79 } | 82 } |
| 80 | 83 |
| 81 void StatusAreaWidget::Shutdown() { | 84 void StatusAreaWidget::Shutdown() { |
| 82 // Destroy the trays early, causing them to be removed from the view | 85 // Destroy the trays early, causing them to be removed from the view |
| 83 // hierarchy. Do not used scoped pointers since we don't want to destroy them | 86 // hierarchy. Do not used scoped pointers since we don't want to destroy them |
| 84 // in the destructor if Shutdown() is not called (e.g. in tests). | 87 // in the destructor if Shutdown() is not called (e.g. in tests). |
| 85 delete web_notification_tray_; | 88 delete web_notification_tray_; |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 195 web_notification_tray_->UpdateAfterLoginStatusChange(login_status); | 198 web_notification_tray_->UpdateAfterLoginStatusChange(login_status); |
| 196 #if defined(OS_CHROMEOS) | 199 #if defined(OS_CHROMEOS) |
| 197 if (logout_button_tray_) | 200 if (logout_button_tray_) |
| 198 logout_button_tray_->UpdateAfterLoginStatusChange(login_status); | 201 logout_button_tray_->UpdateAfterLoginStatusChange(login_status); |
| 199 #endif | 202 #endif |
| 200 if (overview_button_tray_) | 203 if (overview_button_tray_) |
| 201 overview_button_tray_->UpdateAfterLoginStatusChange(login_status); | 204 overview_button_tray_->UpdateAfterLoginStatusChange(login_status); |
| 202 } | 205 } |
| 203 | 206 |
| 204 } // namespace ash | 207 } // namespace ash |
| OLD | NEW |