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

Unified Diff: ash/common/system/chromeos/network/vpn_list_view.h

Issue 2732813002: chromeos: Move files in //ash/common to //ash, part 1 (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 side-by-side diff with in-line comments
Download patch
Index: ash/common/system/chromeos/network/vpn_list_view.h
diff --git a/ash/common/system/chromeos/network/vpn_list_view.h b/ash/common/system/chromeos/network/vpn_list_view.h
deleted file mode 100644
index 6b9c3a8220344dea7b2e41684e33d72c35deacdb..0000000000000000000000000000000000000000
--- a/ash/common/system/chromeos/network/vpn_list_view.h
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_VPN_LIST_VIEW_H_
-#define ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_VPN_LIST_VIEW_H_
-
-#include <map>
-#include <string>
-
-#include "ash/common/system/chromeos/network/network_list_view_base.h"
-#include "ash/common/system/chromeos/network/vpn_list.h"
-#include "ash/common/system/tray/view_click_listener.h"
-#include "base/macros.h"
-#include "chromeos/network/network_state_handler.h"
-
-namespace chromeos {
-class NetworkState;
-}
-
-namespace ash {
-class NetworkListDelegate;
-}
-
-namespace views {
-class View;
-}
-
-namespace ash {
-
-// A list of VPN providers and networks that shows VPN providers and networks in
-// a hierarchical layout, allowing the user to see at a glance which provider a
-// network belongs to. The only exception is the currently connected or
-// connecting network, which is detached from its provider and moved to the top.
-// If there is a connected network, a disconnect button is shown next to its
-// name.
-//
-// Disconnected networks are arranged in shill's priority order within each
-// provider and the providers are arranged in the order of their highest
-// priority network. Clicking on a disconnected network triggers a connection
-// attempt. Clicking on the currently connected or connecting network shows its
-// configuration dialog. Clicking on a provider shows the provider's "add
-// network" dialog.
-class VPNListView : public NetworkListViewBase,
- public VpnList::Observer,
- public ViewClickListener {
- public:
- explicit VPNListView(NetworkListDelegate* delegate);
- ~VPNListView() override;
-
- // NetworkListViewBase:
- void Update() override;
- bool IsNetworkEntry(views::View* view, std::string* guid) const override;
-
- // VpnList::Observer:
- void OnVPNProvidersChanged() override;
-
- // ViewClickListener:
- void OnViewClicked(views::View* sender) override;
-
- private:
- // Adds a network to the list.
- void AddNetwork(const chromeos::NetworkState* network);
-
- // Adds the VPN provider identified by |vpn_provider| to the list, along with
- // any networks that belong to this provider.
- void AddProviderAndNetworks(
- const VPNProvider& vpn_provider,
- const chromeos::NetworkStateHandler::NetworkStateList& networks);
-
- // Adds all available VPN providers and networks to the list.
- void AddProvidersAndNetworks(
- const chromeos::NetworkStateHandler::NetworkStateList& networks);
-
- NetworkListDelegate* const delegate_;
-
- // A mapping from each VPN provider's list entry to the provider.
- std::map<const views::View* const, VPNProvider> provider_view_map_;
-
- // A mapping from each network's list entry to the network's guid.
- std::map<const views::View* const, std::string> network_view_guid_map_;
-
- // Whether the list is currently empty (i.e., the next entry added will become
- // the topmost entry).
- bool list_empty_ = true;
-
- DISALLOW_COPY_AND_ASSIGN(VPNListView);
-};
-
-} // namespace ash
-
-#endif // ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_VPN_LIST_VIEW_H_
« no previous file with comments | « ash/common/system/chromeos/network/vpn_list_unittest.cc ('k') | ash/common/system/chromeos/network/vpn_list_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698