| 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 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 SetupConnectingItemMd(container, info.label, info.image); | 500 SetupConnectingItemMd(container, info.label, info.image); |
| 501 else | 501 else |
| 502 container->AddIconAndLabel(info.image, info.label, info.highlight); | 502 container->AddIconAndLabel(info.image, info.label, info.highlight); |
| 503 container->set_tooltip(info.tooltip); | 503 container->set_tooltip(info.tooltip); |
| 504 views::View* controlled_icon = CreateControlledByExtensionView(info); | 504 views::View* controlled_icon = CreateControlledByExtensionView(info); |
| 505 if (controlled_icon) | 505 if (controlled_icon) |
| 506 container->AddChildView(controlled_icon); | 506 container->AddChildView(controlled_icon); |
| 507 return container; | 507 return container; |
| 508 } | 508 } |
| 509 | 509 |
| 510 bool NetworkStateListDetailedView::IsViewHovered(views::View* view) { | |
| 511 return static_cast<HoverHighlightView*>(view)->hover(); | |
| 512 } | |
| 513 | |
| 514 NetworkTypePattern NetworkStateListDetailedView::GetNetworkTypePattern() const { | 510 NetworkTypePattern NetworkStateListDetailedView::GetNetworkTypePattern() const { |
| 515 return list_type_ == LIST_TYPE_VPN ? NetworkTypePattern::VPN() | 511 return list_type_ == LIST_TYPE_VPN ? NetworkTypePattern::VPN() |
| 516 : NetworkTypePattern::NonVirtual(); | 512 : NetworkTypePattern::NonVirtual(); |
| 517 } | 513 } |
| 518 | 514 |
| 519 void NetworkStateListDetailedView::UpdateViewForNetwork( | 515 void NetworkStateListDetailedView::UpdateViewForNetwork( |
| 520 views::View* view, | 516 views::View* view, |
| 521 const NetworkInfo& info) { | 517 const NetworkInfo& info) { |
| 522 HoverHighlightView* container = static_cast<HoverHighlightView*>(view); | 518 HoverHighlightView* container = static_cast<HoverHighlightView*>(view); |
| 523 DCHECK(!container->has_children()); | 519 DCHECK(!container->has_children()); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 552 UMA_STATUS_AREA_NETWORK_JOIN_OTHER_CLICKED); | 548 UMA_STATUS_AREA_NETWORK_JOIN_OTHER_CLICKED); |
| 553 Shell::Get()->system_tray_controller()->ShowNetworkCreate(shill::kTypeWifi); | 549 Shell::Get()->system_tray_controller()->ShowNetworkCreate(shill::kTypeWifi); |
| 554 } | 550 } |
| 555 | 551 |
| 556 void NetworkStateListDetailedView::RelayoutScrollList() { | 552 void NetworkStateListDetailedView::RelayoutScrollList() { |
| 557 scroller()->Layout(); | 553 scroller()->Layout(); |
| 558 } | 554 } |
| 559 | 555 |
| 560 } // namespace tray | 556 } // namespace tray |
| 561 } // namespace ash | 557 } // namespace ash |
| OLD | NEW |