OLD | NEW |
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 virtual void ButtonPressed( | 73 virtual void ButtonPressed( |
74 views::Button* sender, const ui::Event& event) OVERRIDE; | 74 views::Button* sender, const ui::Event& event) OVERRIDE; |
75 | 75 |
76 void set_delegate(Delegate* delegate) { | 76 void set_delegate(Delegate* delegate) { |
77 delegate_ = delegate; | 77 delegate_ = delegate; |
78 } | 78 } |
79 | 79 |
80 protected: | 80 protected: |
81 // views::View overrides: | 81 // views::View overrides: |
82 virtual void Layout() OVERRIDE; | 82 virtual void Layout() OVERRIDE; |
83 virtual gfx::Size GetPreferredSize() OVERRIDE; | 83 virtual gfx::Size GetPreferredSize() const OVERRIDE; |
84 virtual void ViewHierarchyChanged( | 84 virtual void ViewHierarchyChanged( |
85 const ViewHierarchyChangedDetails& details) OVERRIDE; | 85 const ViewHierarchyChangedDetails& details) OVERRIDE; |
86 | 86 |
87 private: | 87 private: |
88 NetworkConfigView(); | 88 NetworkConfigView(); |
89 virtual ~NetworkConfigView(); | 89 virtual ~NetworkConfigView(); |
90 | 90 |
91 // Login dialog for known networks. Returns true if successfully created. | 91 // Login dialog for known networks. Returns true if successfully created. |
92 bool InitWithNetworkState(const NetworkState* network); | 92 bool InitWithNetworkState(const NetworkState* network); |
93 // Login dialog for new/hidden networks. Returns true if successfully created. | 93 // Login dialog for new/hidden networks. Returns true if successfully created. |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 public: | 164 public: |
165 ControlledSettingIndicatorView(); | 165 ControlledSettingIndicatorView(); |
166 explicit ControlledSettingIndicatorView(const NetworkPropertyUIData& ui_data); | 166 explicit ControlledSettingIndicatorView(const NetworkPropertyUIData& ui_data); |
167 virtual ~ControlledSettingIndicatorView(); | 167 virtual ~ControlledSettingIndicatorView(); |
168 | 168 |
169 // Updates the view based on |ui_data|. | 169 // Updates the view based on |ui_data|. |
170 void Update(const NetworkPropertyUIData& ui_data); | 170 void Update(const NetworkPropertyUIData& ui_data); |
171 | 171 |
172 protected: | 172 protected: |
173 // views::View: | 173 // views::View: |
174 virtual gfx::Size GetPreferredSize() OVERRIDE; | 174 virtual gfx::Size GetPreferredSize() const OVERRIDE; |
175 virtual void Layout() OVERRIDE; | 175 virtual void Layout() OVERRIDE; |
176 | 176 |
177 private: | 177 private: |
178 // Initializes the view. | 178 // Initializes the view. |
179 void Init(); | 179 void Init(); |
180 | 180 |
181 bool managed_; | 181 bool managed_; |
182 views::ImageView* image_view_; | 182 views::ImageView* image_view_; |
183 const gfx::ImageSkia* image_; | 183 const gfx::ImageSkia* image_; |
184 | 184 |
185 DISALLOW_COPY_AND_ASSIGN(ControlledSettingIndicatorView); | 185 DISALLOW_COPY_AND_ASSIGN(ControlledSettingIndicatorView); |
186 }; | 186 }; |
187 | 187 |
188 } // namespace chromeos | 188 } // namespace chromeos |
189 | 189 |
190 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_CONFIG_VIEW_H_ | 190 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_CONFIG_VIEW_H_ |
OLD | NEW |