| 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/common/system/chromeos/network/network_state_list_detailed_view.h" | 5 #include "ash/common/system/chromeos/network/network_state_list_detailed_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/common/ash_constants.h" | 10 #include "ash/common/ash_constants.h" |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 | 256 |
| 257 void SetVisible(bool visible) override { | 257 void SetVisible(bool visible) override { |
| 258 layer()->GetAnimator()->StopAnimating(); // Stop any previous animation. | 258 layer()->GetAnimator()->StopAnimating(); // Stop any previous animation. |
| 259 ui::ScopedLayerAnimationSettings animation(layer()->GetAnimator()); | 259 ui::ScopedLayerAnimationSettings animation(layer()->GetAnimator()); |
| 260 animation.SetTransitionDuration( | 260 animation.SetTransitionDuration( |
| 261 base::TimeDelta::FromMilliseconds(kFadeIconMs)); | 261 base::TimeDelta::FromMilliseconds(kFadeIconMs)); |
| 262 layer()->SetOpacity(visible ? 1.0 : 0.0); | 262 layer()->SetOpacity(visible ? 1.0 : 0.0); |
| 263 } | 263 } |
| 264 | 264 |
| 265 // views::CustomButton | 265 // views::CustomButton |
| 266 void StateChanged() override { | 266 void StateChanged(ButtonState old_state) override { |
| 267 if (state() == STATE_HOVERED || state() == STATE_PRESSED) { | 267 if (state() == STATE_HOVERED || state() == STATE_PRESSED) { |
| 268 set_background(views::Background::CreateSolidBackground( | 268 set_background(views::Background::CreateSolidBackground( |
| 269 kTrayPopupHoverBackgroundColor)); | 269 kTrayPopupHoverBackgroundColor)); |
| 270 } else { | 270 } else { |
| 271 set_background(nullptr); | 271 set_background(nullptr); |
| 272 } | 272 } |
| 273 SchedulePaint(); | 273 SchedulePaint(); |
| 274 } | 274 } |
| 275 | 275 |
| 276 private: | 276 private: |
| (...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1043 UMA_STATUS_AREA_NETWORK_JOIN_OTHER_CLICKED); | 1043 UMA_STATUS_AREA_NETWORK_JOIN_OTHER_CLICKED); |
| 1044 WmShell::Get()->system_tray_controller()->ShowNetworkCreate(shill::kTypeWifi); | 1044 WmShell::Get()->system_tray_controller()->ShowNetworkCreate(shill::kTypeWifi); |
| 1045 } | 1045 } |
| 1046 | 1046 |
| 1047 void NetworkStateListDetailedView::RelayoutScrollList() { | 1047 void NetworkStateListDetailedView::RelayoutScrollList() { |
| 1048 scroller()->Layout(); | 1048 scroller()->Layout(); |
| 1049 } | 1049 } |
| 1050 | 1050 |
| 1051 } // namespace tray | 1051 } // namespace tray |
| 1052 } // namespace ash | 1052 } // namespace ash |
| OLD | NEW |