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

Side by Side Diff: chrome/browser/chromeos/options/network_config_view.h

Issue 2430003002: NetworkConnect::Delegate: service_path -> network_id (Closed)
Patch Set: Rebase, move guid lookup Created 4 years, 2 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 unified diff | Download patch
OLDNEW
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 #ifndef CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_CONFIG_VIEW_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_CONFIG_VIEW_H_
6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_CONFIG_VIEW_H_ 6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_CONFIG_VIEW_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 28 matching lines...) Expand all
39 39
40 // Called when dialog "Cancel" button is pressed. 40 // Called when dialog "Cancel" button is pressed.
41 virtual void OnDialogCancelled() = 0; 41 virtual void OnDialogCancelled() = 0;
42 42
43 protected: 43 protected:
44 virtual ~Delegate() {} 44 virtual ~Delegate() {}
45 }; 45 };
46 46
47 // Shows a network connection dialog if none is currently visible. 47 // Shows a network connection dialog if none is currently visible.
48 static void Show(const std::string& service_path, gfx::NativeWindow parent); 48 static void Show(const std::string& service_path, gfx::NativeWindow parent);
49
50 // Same as above but tahes a network id (GUID) instead.
James Cook 2016/10/19 18:10:15 nit: tahes -> takes
51 static void ShowByNetworkId(const std::string& network_id,
52 gfx::NativeWindow parent);
53
49 // Shows a dialog to configure a new network. |type| must be a valid Shill 54 // Shows a dialog to configure a new network. |type| must be a valid Shill
50 // 'Type' property value. 55 // 'Type' property value.
51 static void ShowForType(const std::string& type, gfx::NativeWindow parent); 56 static void ShowForType(const std::string& type, gfx::NativeWindow parent);
52 57
53 // Returns corresponding native window. 58 // Returns corresponding native window.
54 gfx::NativeWindow GetNativeWindow() const; 59 gfx::NativeWindow GetNativeWindow() const;
55 60
56 // views::DialogDelegate methods. 61 // views::DialogDelegate methods.
57 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override; 62 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override;
58 bool IsDialogButtonEnabled(ui::DialogButton button) const override; 63 bool IsDialogButtonEnabled(ui::DialogButton button) const override;
(...skipping 20 matching lines...) Expand all
79 // views::View overrides: 84 // views::View overrides:
80 void Layout() override; 85 void Layout() override;
81 gfx::Size GetPreferredSize() const override; 86 gfx::Size GetPreferredSize() const override;
82 void ViewHierarchyChanged( 87 void ViewHierarchyChanged(
83 const ViewHierarchyChangedDetails& details) override; 88 const ViewHierarchyChangedDetails& details) override;
84 89
85 private: 90 private:
86 NetworkConfigView(); 91 NetworkConfigView();
87 ~NetworkConfigView() override; 92 ~NetworkConfigView() override;
88 93
94 static void ShowByNetwork(const NetworkState* network,
95 gfx::NativeWindow parent);
96
89 // Login dialog for known networks. Returns true if successfully created. 97 // Login dialog for known networks. Returns true if successfully created.
90 bool InitWithNetworkState(const NetworkState* network); 98 bool InitWithNetworkState(const NetworkState* network);
91 // Login dialog for new/hidden networks. Returns true if successfully created. 99 // Login dialog for new/hidden networks. Returns true if successfully created.
92 bool InitWithType(const std::string& type); 100 bool InitWithType(const std::string& type);
93 101
94 // Creates and shows a dialog containing this view. 102 // Creates and shows a dialog containing this view.
95 void ShowDialog(gfx::NativeWindow parent); 103 void ShowDialog(gfx::NativeWindow parent);
96 104
97 // Resets the underlying view to show advanced options. 105 // Resets the underlying view to show advanced options.
98 void ShowAdvancedView(); 106 void ShowAdvancedView();
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 private: 178 private:
171 bool managed_; 179 bool managed_;
172 views::ImageView* image_view_; 180 views::ImageView* image_view_;
173 181
174 DISALLOW_COPY_AND_ASSIGN(ControlledSettingIndicatorView); 182 DISALLOW_COPY_AND_ASSIGN(ControlledSettingIndicatorView);
175 }; 183 };
176 184
177 } // namespace chromeos 185 } // namespace chromeos
178 186
179 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_CONFIG_VIEW_H_ 187 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_CONFIG_VIEW_H_
OLDNEW
« no previous file with comments | « ash/public/interfaces/system_tray.mojom ('k') | chrome/browser/chromeos/options/network_config_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698