Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(584)

Side by Side Diff: ash/common/system/chromeos/network/network_state_list_detailed_view.cc

Issue 2709903004: Consolidate some more ash tray constants. (Closed)
Patch Set: rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_NETWORK_INFO)); 225 bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_NETWORK_INFO));
226 SetPaintToLayer(); 226 SetPaintToLayer();
227 layer()->SetFillsBoundsOpaquely(false); 227 layer()->SetFillsBoundsOpaquely(false);
228 layer()->SetOpacity(1.0); 228 layer()->SetOpacity(1.0);
229 } 229 }
230 230
231 ~InfoIcon() override {} 231 ~InfoIcon() override {}
232 232
233 // views::View 233 // views::View
234 gfx::Size GetPreferredSize() const override { 234 gfx::Size GetPreferredSize() const override {
235 int size = GetTrayConstant(TRAY_POPUP_ITEM_MIN_HEIGHT); 235 int size = kTrayPopupItemMinHeight;
236 return gfx::Size(size, size); 236 return gfx::Size(size, size);
tdanderson 2017/02/28 17:08:18 nit: |size| not needed, just use constant itself a
Evan Stade 2017/03/01 04:28:54 Done.
237 } 237 }
238 238
239 void SetVisible(bool visible) override { 239 void SetVisible(bool visible) override {
240 layer()->GetAnimator()->StopAnimating(); // Stop any previous animation. 240 layer()->GetAnimator()->StopAnimating(); // Stop any previous animation.
241 ui::ScopedLayerAnimationSettings animation(layer()->GetAnimator()); 241 ui::ScopedLayerAnimationSettings animation(layer()->GetAnimator());
242 animation.SetTransitionDuration( 242 animation.SetTransitionDuration(
243 base::TimeDelta::FromMilliseconds(kFadeIconMs)); 243 base::TimeDelta::FromMilliseconds(kFadeIconMs));
244 layer()->SetOpacity(visible ? 1.0 : 0.0); 244 layer()->SetOpacity(visible ? 1.0 : 0.0);
245 } 245 }
246 246
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 UMA_STATUS_AREA_NETWORK_JOIN_OTHER_CLICKED); 752 UMA_STATUS_AREA_NETWORK_JOIN_OTHER_CLICKED);
753 WmShell::Get()->system_tray_controller()->ShowNetworkCreate(shill::kTypeWifi); 753 WmShell::Get()->system_tray_controller()->ShowNetworkCreate(shill::kTypeWifi);
754 } 754 }
755 755
756 void NetworkStateListDetailedView::RelayoutScrollList() { 756 void NetworkStateListDetailedView::RelayoutScrollList() {
757 scroller()->Layout(); 757 scroller()->Layout();
758 } 758 }
759 759
760 } // namespace tray 760 } // namespace tray
761 } // namespace ash 761 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698