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

Side by Side Diff: chrome/browser/chromeos/login/network_selection_view.h

Issue 3166028: Replace network combobox with network dropdown button (Closed)
Patch Set: Removed trailing spaces Created 10 years, 3 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_LOGIN_NETWORK_SELECTION_VIEW_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_NETWORK_SELECTION_VIEW_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_NETWORK_SELECTION_VIEW_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_NETWORK_SELECTION_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "views/controls/button/menu_button.h" 10 #include "views/controls/button/menu_button.h"
11 #include "views/view.h" 11 #include "views/view.h"
12 #include "views/widget/widget_gtk.h" 12 #include "views/widget/widget_gtk.h"
13 #include "views/window/window_delegate.h" 13 #include "views/window/window_delegate.h"
14 14
15 namespace views { 15 namespace views {
16 class Combobox; 16 class Combobox;
17 class Label; 17 class Label;
18 class NativeButton; 18 class NativeButton;
19 class SmoothedThrobber; 19 class SmoothedThrobber;
20 } // namespace views 20 } // namespace views
21 21
22 namespace chromeos { 22 namespace chromeos {
23 23
24 class NetworkDropdownButton;
24 class NetworkScreenDelegate; 25 class NetworkScreenDelegate;
25 class ScreenObserver; 26 class ScreenObserver;
26 27
27 // View for the network selection/initial welcome screen. 28 // View for the network selection/initial welcome screen.
28 class NetworkSelectionView : public views::View { 29 class NetworkSelectionView : public views::View {
29 public: 30 public:
30 explicit NetworkSelectionView(NetworkScreenDelegate* delegate); 31 explicit NetworkSelectionView(NetworkScreenDelegate* delegate);
31 virtual ~NetworkSelectionView(); 32 virtual ~NetworkSelectionView();
32 33
33 // Initialize view layout. 34 // Initialize view layout.
34 void Init(); 35 void Init();
35 36
36 // Update strings from the resources. Executed on language change. 37 // Update strings from the resources. Executed on language change.
37 void UpdateLocalizedStrings(); 38 void UpdateLocalizedStrings();
38 39
39 // views::View: implementation: 40 // views::View: implementation:
40 virtual gfx::Size GetPreferredSize(); 41 virtual gfx::Size GetPreferredSize();
41 virtual void Layout(); 42 virtual void Layout();
42 43
43 // Gets/Sets the selected item in the network combobox.
44 int GetSelectedNetworkItem() const;
45 void SetSelectedNetworkItem(int index);
46
47 gfx::NativeWindow GetNativeWindow(); 44 gfx::NativeWindow GetNativeWindow();
48 45
49 // Inform the network combobox that its model changed.
50 void NetworkModelChanged();
51
52 // Shows network connecting status or network selection otherwise. 46 // Shows network connecting status or network selection otherwise.
53 void ShowConnectingStatus(bool connecting, const string16& network_id); 47 void ShowConnectingStatus(bool connecting, const string16& network_id);
54 48
55 // Sets whether continue control is enabled. 49 // Sets whether continue control is enabled.
56 void EnableContinue(bool enabled); 50 void EnableContinue(bool enabled);
57 51
58 protected: 52 protected:
59 // Overridden from views::View. 53 // Overridden from views::View.
60 virtual void ChildPreferredSizeChanged(View* child); 54 virtual void ChildPreferredSizeChanged(View* child);
61 virtual void OnLocaleChanged(); 55 virtual void OnLocaleChanged();
62 56
63 private: 57 private:
64 // Delete and recreate native controls that 58 // Delete and recreate native controls that
65 // fail to update preferred size after string update. 59 // fail to update preferred size after string update.
66 void RecreateNativeControls(); 60 void RecreateNativeControls();
67 61
68 // Updates text on label with currently connecting network. 62 // Updates text on label with currently connecting network.
69 void UpdateConnectingNetworkLabel(); 63 void UpdateConnectingNetworkLabel();
70 64
71 // Dialog controls. 65 // Dialog controls.
72 views::Combobox* network_combobox_;
73 views::MenuButton* languages_menubutton_; 66 views::MenuButton* languages_menubutton_;
74 views::Label* welcome_label_; 67 views::Label* welcome_label_;
75 views::Label* select_language_label_; 68 views::Label* select_language_label_;
76 views::Label* select_network_label_; 69 views::Label* select_network_label_;
77 views::Label* connecting_network_label_; 70 views::Label* connecting_network_label_;
78 views::NativeButton* continue_button_; 71 views::NativeButton* continue_button_;
79 views::SmoothedThrobber* throbber_; 72 views::SmoothedThrobber* throbber_;
80 73
81 // Tab index of continue button. 74 // Tab index of continue button.
82 int continue_button_order_index_; 75 int continue_button_order_index_;
83 76
77 NetworkDropdownButton* network_dropdown_;
78
84 // NetworkScreen delegate. 79 // NetworkScreen delegate.
85 NetworkScreenDelegate* delegate_; 80 NetworkScreenDelegate* delegate_;
86 81
87 // Id of the network that is in process of connecting. 82 // Id of the network that is in process of connecting.
88 string16 network_id_; 83 string16 network_id_;
89 84
90 DISALLOW_COPY_AND_ASSIGN(NetworkSelectionView); 85 DISALLOW_COPY_AND_ASSIGN(NetworkSelectionView);
91 }; 86 };
92 87
93 } // namespace chromeos 88 } // namespace chromeos
94 89
95 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_NETWORK_SELECTION_VIEW_H_ 90 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_NETWORK_SELECTION_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/network_screen_delegate.h ('k') | chrome/browser/chromeos/login/network_selection_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698