| 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/chromeos/tray_display.h" | 5 #include "ash/system/chromeos/tray_display.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/content/display/screen_orientation_controller_chromeos.h" | 9 #include "ash/content/display/screen_orientation_controller_chromeos.h" |
| 10 #include "ash/display/display_controller.h" | 10 #include "ash/display/display_controller.h" |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 bundle.GetImageNamed(IDR_AURA_UBER_TRAY_DISPLAY).ToImageSkia()); | 148 bundle.GetImageNamed(IDR_AURA_UBER_TRAY_DISPLAY).ToImageSkia()); |
| 149 AddChildView(image_); | 149 AddChildView(image_); |
| 150 | 150 |
| 151 label_ = new views::Label(); | 151 label_ = new views::Label(); |
| 152 label_->SetMultiLine(true); | 152 label_->SetMultiLine(true); |
| 153 label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 153 label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
| 154 AddChildView(label_); | 154 AddChildView(label_); |
| 155 Update(); | 155 Update(); |
| 156 } | 156 } |
| 157 | 157 |
| 158 virtual ~DisplayView() {} | 158 ~DisplayView() override {} |
| 159 | 159 |
| 160 void Update() { | 160 void Update() { |
| 161 base::string16 message = GetTrayDisplayMessage(NULL); | 161 base::string16 message = GetTrayDisplayMessage(NULL); |
| 162 if (message.empty() && ShouldShowFirstDisplayInfo()) | 162 if (message.empty() && ShouldShowFirstDisplayInfo()) |
| 163 message = GetDisplayInfoLine(GetDisplayManager()->first_display_id()); | 163 message = GetDisplayInfoLine(GetDisplayManager()->first_display_id()); |
| 164 SetVisible(!message.empty()); | 164 SetVisible(!message.empty()); |
| 165 label_->SetText(message); | 165 label_->SetText(message); |
| 166 SetAccessibleName(message); | 166 SetAccessibleName(message); |
| 167 Layout(); | 167 Layout(); |
| 168 } | 168 } |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 bool TrayDisplay::GetAccessibleStateForTesting(ui::AXViewState* state) { | 443 bool TrayDisplay::GetAccessibleStateForTesting(ui::AXViewState* state) { |
| 444 views::View* view = default_; | 444 views::View* view = default_; |
| 445 if (view) { | 445 if (view) { |
| 446 view->GetAccessibleState(state); | 446 view->GetAccessibleState(state); |
| 447 return true; | 447 return true; |
| 448 } | 448 } |
| 449 return false; | 449 return false; |
| 450 } | 450 } |
| 451 | 451 |
| 452 } // namespace ash | 452 } // namespace ash |
| OLD | NEW |