Chromium Code Reviews| Index: chromeos/network/network_connect.h |
| diff --git a/ui/chromeos/network/network_connect.h b/chromeos/network/network_connect.h |
| similarity index 81% |
| rename from ui/chromeos/network/network_connect.h |
| rename to chromeos/network/network_connect.h |
| index 5a65dd78d9de1f45ae0ec90f05464b3e3f01b211..2fa6c1c65d4cf8e55a11b7ac2f1290a8313757e2 100644 |
| --- a/ui/chromeos/network/network_connect.h |
| +++ b/chromeos/network/network_connect.h |
| @@ -2,26 +2,27 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#ifndef UI_CHROMEOS_NETWORK_NETWORK_CONNECT_H |
| -#define UI_CHROMEOS_NETWORK_NETWORK_CONNECT_H |
| +#ifndef CHROMEOS_NETWORK_NETWORK_CONNECT_H_ |
| +#define CHROMEOS_NETWORK_NETWORK_CONNECT_H_ |
| #include <string> |
| #include "base/macros.h" |
| #include "base/strings/string16.h" |
| -#include "ui/chromeos/ui_chromeos_export.h" |
| +#include "chromeos/chromeos_export.h" |
| namespace base { |
| class DictionaryValue; |
| } |
| namespace chromeos { |
| -class NetworkTypePattern; |
| -} |
| -namespace ui { |
| +class NetworkTypePattern; |
| -class UI_CHROMEOS_EXPORT NetworkConnect { |
| +// NetworkConnect is a state machine designed to handle the complex UI flows |
| +// associated with connecting to a network (and related tasks). Any showing |
| +// of UI is handled by the NetworkConnect::Delegate implementation. |
|
James Cook
2016/10/20 00:11:43
Thanks for the added docs.
stevenjb
2016/10/20 00:57:23
Acknowledged.
|
| +class CHROMEOS_EXPORT NetworkConnect { |
| public: |
| class Delegate { |
| public: |
| @@ -43,6 +44,14 @@ class UI_CHROMEOS_EXPORT NetworkConnect { |
| // Shows UI to setup a mobile network. |
| virtual void ShowMobileSetupDialog(const std::string& network_id) = 0; |
| + // Shows an error notification. |error_name| is an error defined in |
| + // NetworkConnectionHandler. |network_id| may be empty. |
| + virtual void ShowNetworkConnectError(const std::string& error_name, |
| + const std::string& network_id); |
| + |
| + // Shows an error notification during mobile activation. |
| + virtual void ShowMobileActivationError(const std::string& network_id); |
| + |
| protected: |
| virtual ~Delegate() {} |
| }; |
| @@ -57,8 +66,6 @@ class UI_CHROMEOS_EXPORT NetworkConnect { |
| // Returns the global NetworkConnect object if initialized or NULL. |
| static NetworkConnect* Get(); |
| - static const char kErrorActivateFailed[]; |
| - |
| virtual ~NetworkConnect(); |
| // Requests a network connection and handles any errors and notifications. |
| @@ -102,15 +109,6 @@ class UI_CHROMEOS_EXPORT NetworkConnect { |
| virtual void CreateConfiguration(base::DictionaryValue* shill_properties, |
| bool shared) = 0; |
| - // Returns the localized string for shill error string |error|. |
| - virtual base::string16 GetShillErrorString( |
| - const std::string& error, |
| - const std::string& service_path) = 0; |
| - |
| - // Shows the settings for the network specified by |service_path|. If empty, |
| - // or no matching network exists, shows the general internet settings page. |
| - virtual void ShowNetworkSettingsForPath(const std::string& service_path) = 0; |
| - |
| protected: |
| NetworkConnect(); |
| @@ -118,6 +116,6 @@ class UI_CHROMEOS_EXPORT NetworkConnect { |
| DISALLOW_COPY_AND_ASSIGN(NetworkConnect); |
| }; |
| -} // ui |
| +} // namespace chromeos |
| -#endif // UI_CHROMEOS_NETWORK_NETWORK_CONNECT_H |
| +#endif // CHROMEOS_NETWORK_NETWORK_CONNECT_H_ |