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

Unified Diff: chrome/browser/chromeos/options/network_config_view.h

Issue 21046008: Convert all connect code to use NetworkHandler instead of NetworkLibrary (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add NetworkConfigurationHandler::SetNetworkProfile Created 7 years, 4 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: chrome/browser/chromeos/options/network_config_view.h
diff --git a/chrome/browser/chromeos/options/network_config_view.h b/chrome/browser/chromeos/options/network_config_view.h
index 26b39051279a0e2bd43a7092e397b283b6a75cb2..f51e3e71dabfe68686cb1b538efd4cc299779123 100644
--- a/chrome/browser/chromeos/options/network_config_view.h
+++ b/chrome/browser/chromeos/options/network_config_view.h
@@ -9,7 +9,6 @@
#include "base/compiler_specific.h"
#include "base/strings/string16.h"
-#include "chrome/browser/chromeos/cros/network_library.h"
#include "ui/gfx/native_widget_types.h" // gfx::NativeWindow
#include "ui/views/controls/button/button.h" // views::ButtonListener
#include "ui/views/window/dialog_delegate.h"
@@ -27,6 +26,7 @@ namespace chromeos {
class ChildNetworkConfigView;
class NetworkPropertyUIData;
+class NetworkState;
// A dialog box for showing a password textfield.
class NetworkConfigView : public views::DialogDelegateView,
@@ -45,9 +45,10 @@ class NetworkConfigView : public views::DialogDelegateView,
};
// Shows a network connection dialog if none is currently visible.
- static void Show(Network* network, gfx::NativeWindow parent);
- static void ShowForType(ConnectionType type, gfx::NativeWindow parent);
- static void ShowForPath(const std::string& path, gfx::NativeWindow parent);
+ static void Show(const std::string& service_path, gfx::NativeWindow parent);
+ // Shows a dialog to configure a new network. |type| must be a valid Shill
+ // 'Type' property value.
+ static void ShowForType(const std::string& type, gfx::NativeWindow parent);
// Returns corresponding native window.
gfx::NativeWindow GetNativeWindow() const;
@@ -75,10 +76,6 @@ class NetworkConfigView : public views::DialogDelegateView,
delegate_ = delegate;
}
- static const base::DictionaryValue* FindPolicyForActiveUser(
- const Network* network,
- onc::ONCSource* onc_source);
-
protected:
// views::View overrides:
virtual void Layout() OVERRIDE;
@@ -87,11 +84,13 @@ class NetworkConfigView : public views::DialogDelegateView,
const ViewHierarchyChangedDetails& details) OVERRIDE;
private:
+ NetworkConfigView();
+ virtual ~NetworkConfigView();
+
// Login dialog for known networks.
- explicit NetworkConfigView(Network* network);
+ void InitWithNetworkState(const NetworkState* network);
// Login dialog for new/hidden networks.
- explicit NetworkConfigView(ConnectionType type);
- virtual ~NetworkConfigView();
+ void InitWithType(const std::string& type);
// Creates and shows a dialog containing this view.
void ShowDialog(gfx::NativeWindow parent);
@@ -115,12 +114,11 @@ class NetworkConfigView : public views::DialogDelegateView,
// methods, which are called by NetworkConfigView.
class ChildNetworkConfigView : public views::View {
public:
- ChildNetworkConfigView(NetworkConfigView* parent, Network* network)
- : service_path_(network->service_path()),
- parent_(parent) {}
- explicit ChildNetworkConfigView(NetworkConfigView* parent)
- : parent_(parent) {}
- virtual ~ChildNetworkConfigView() {}
+ // If |service_path| is NULL, a dialog for configuring a new network will
+ // be created.
+ ChildNetworkConfigView(NetworkConfigView* parent,
+ const std::string& service_path);
+ virtual ~ChildNetworkConfigView();
// Get the title to show for the dialog.
virtual string16 GetTitle() const = 0;
@@ -146,8 +144,8 @@ class ChildNetworkConfigView : public views::View {
static const int kInputFieldMinWidth;
protected:
- std::string service_path_;
NetworkConfigView* parent_;
+ std::string service_path_;
private:
DISALLOW_COPY_AND_ASSIGN(ChildNetworkConfigView);

Powered by Google App Engine
This is Rietveld 408576698