Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/vpn_list_view.h" | 5 #include "ash/common/system/chromeos/network/vpn_list_view.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 277 } | 277 } |
| 278 if (UseMd()) { | 278 if (UseMd()) { |
| 279 DCHECK(tri_view()); | 279 DCHECK(tri_view()); |
| 280 tri_view()->AddView(TriView::Container::END, disconnect_button_); | 280 tri_view()->AddView(TriView::Container::END, disconnect_button_); |
| 281 tri_view()->SetContainerVisible(TriView::Container::END, true); | 281 tri_view()->SetContainerVisible(TriView::Container::END, true); |
| 282 } else { | 282 } else { |
| 283 AddChildView(disconnect_button_); | 283 AddChildView(disconnect_button_); |
| 284 } | 284 } |
| 285 | 285 |
| 286 SetBorder( | 286 SetBorder( |
| 287 views::CreateEmptyBorder(0, kTrayPopupPaddingHorizontal, 0, | 287 views::CreateEmptyBorder(0, UseMd() ? 0 : kTrayPopupPaddingHorizontal, |
|
bruthig
2016/11/23 20:15:47
Do the horizontal insets need to be updated for ro
yiyix
2016/11/24 21:38:16
I updated the code path such that all border chang
bruthig
2016/11/24 22:36:29
Acknowledged.
| |
| 288 UseMd() ? kTrayPopupButtonEndMargin : 3)); | 288 0, UseMd() ? kTrayPopupButtonEndMargin : 3)); |
| 289 } else { | 289 } else { |
| 290 SetBorder(views::CreateEmptyBorder(0, kTrayPopupPaddingHorizontal, 0, 0)); | 290 SetBorder(views::CreateEmptyBorder(0, kTrayPopupPaddingHorizontal, 0, 0)); |
| 291 } | 291 } |
| 292 | 292 |
| 293 if (!UseMd()) { | 293 if (!UseMd()) { |
| 294 // The icon and the disconnect button are always set to their preferred | 294 // The icon and the disconnect button are always set to their preferred |
| 295 // size. All remaining space is used for the network name. | 295 // size. All remaining space is used for the network name. |
| 296 views::BoxLayout* layout = new views::BoxLayout( | 296 views::BoxLayout* layout = new views::BoxLayout( |
| 297 views::BoxLayout::kHorizontal, 0, 3, kTrayPopupPaddingBetweenItems); | 297 views::BoxLayout::kHorizontal, 0, 3, kTrayPopupPaddingBetweenItems); |
| 298 SetLayoutManager(layout); | 298 SetLayoutManager(layout); |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 491 } | 491 } |
| 492 } | 492 } |
| 493 | 493 |
| 494 // Add providers without any configured networks, in the order that the | 494 // Add providers without any configured networks, in the order that the |
| 495 // providers were returned by the extensions system. | 495 // providers were returned by the extensions system. |
| 496 for (const VPNProvider& provider : providers) | 496 for (const VPNProvider& provider : providers) |
| 497 AddProviderAndNetworks(provider.key, provider.name, networks); | 497 AddProviderAndNetworks(provider.key, provider.name, networks); |
| 498 } | 498 } |
| 499 | 499 |
| 500 } // namespace ash | 500 } // namespace ash |
| OLD | NEW |