OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/common/system/chromeos/session/logout_button_tray.h" | 5 #include "ash/common/system/chromeos/session/logout_button_tray.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "ash/common/shelf/wm_shelf_util.h" | 10 #include "ash/common/shelf/wm_shelf_util.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "ui/gfx/paint_vector_icon.h" | 27 #include "ui/gfx/paint_vector_icon.h" |
28 #include "ui/views/bubble/tray_bubble_view.h" | 28 #include "ui/views/bubble/tray_bubble_view.h" |
29 #include "ui/views/controls/button/label_button.h" | 29 #include "ui/views/controls/button/label_button.h" |
30 #include "ui/views/controls/button/label_button_border.h" | 30 #include "ui/views/controls/button/label_button_border.h" |
31 #include "ui/views/controls/button/md_text_button.h" | 31 #include "ui/views/controls/button/md_text_button.h" |
32 #include "ui/views/painter.h" | 32 #include "ui/views/painter.h" |
33 | 33 |
34 namespace ash { | 34 namespace ash { |
35 | 35 |
36 LogoutButtonTray::LogoutButtonTray(WmShelf* wm_shelf) | 36 LogoutButtonTray::LogoutButtonTray(WmShelf* wm_shelf) |
37 : TrayBackgroundView(wm_shelf), | 37 : TrayBackgroundView(wm_shelf, false), |
38 button_(nullptr), | 38 button_(nullptr), |
39 login_status_(LoginStatus::NOT_LOGGED_IN), | 39 login_status_(LoginStatus::NOT_LOGGED_IN), |
40 show_logout_button_in_tray_(false) { | 40 show_logout_button_in_tray_(false) { |
41 views::MdTextButton* button = | 41 views::MdTextButton* button = |
42 views::MdTextButton::Create(this, base::string16()); | 42 views::MdTextButton::Create(this, base::string16()); |
43 button->SetProminent(true); | 43 button->SetProminent(true); |
44 button->SetBgColorOverride(gfx::kGoogleRed700); | 44 button->SetBgColorOverride(gfx::kGoogleRed700); |
45 // Base font size + 2 = 14. | 45 // Base font size + 2 = 14. |
46 // TODO(estade): should this 2 be shared with other tray views? See | 46 // TODO(estade): should this 2 be shared with other tray views? See |
47 // crbug.com/623987 | 47 // crbug.com/623987 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 button_->SetText(base::string16()); | 123 button_->SetText(base::string16()); |
124 button_->SetAccessibleName(title); | 124 button_->SetAccessibleName(title); |
125 button_->SetImage(views::LabelButton::STATE_NORMAL, | 125 button_->SetImage(views::LabelButton::STATE_NORMAL, |
126 gfx::CreateVectorIcon(kShelfLogoutIcon, kTrayIconColor)); | 126 gfx::CreateVectorIcon(kShelfLogoutIcon, kTrayIconColor)); |
127 button_->SetMinSize(gfx::Size(kTrayItemSize, kTrayItemSize)); | 127 button_->SetMinSize(gfx::Size(kTrayItemSize, kTrayItemSize)); |
128 } | 128 } |
129 UpdateVisibility(); | 129 UpdateVisibility(); |
130 } | 130 } |
131 | 131 |
132 } // namespace ash | 132 } // namespace ash |
OLD | NEW |