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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 std::string service_path_; | 153 std::string service_path_; |
154 | 154 |
155 private: | 155 private: |
156 DISALLOW_COPY_AND_ASSIGN(ChildNetworkConfigView); | 156 DISALLOW_COPY_AND_ASSIGN(ChildNetworkConfigView); |
157 }; | 157 }; |
158 | 158 |
159 // Shows an icon with tooltip indicating whether a setting is under policy | 159 // Shows an icon with tooltip indicating whether a setting is under policy |
160 // control. | 160 // control. |
161 class ControlledSettingIndicatorView : public views::View { | 161 class ControlledSettingIndicatorView : public views::View { |
162 public: | 162 public: |
| 163 ControlledSettingIndicatorView(); |
163 explicit ControlledSettingIndicatorView(const NetworkPropertyUIData& ui_data); | 164 explicit ControlledSettingIndicatorView(const NetworkPropertyUIData& ui_data); |
164 ~ControlledSettingIndicatorView() override; | 165 ~ControlledSettingIndicatorView() override; |
165 | 166 |
| 167 // Updates the view based on |ui_data|. |
| 168 void Update(const NetworkPropertyUIData& ui_data); |
| 169 |
166 protected: | 170 protected: |
167 // views::View: | 171 // views::View: |
168 gfx::Size GetPreferredSize() const override; | 172 gfx::Size GetPreferredSize() const override; |
| 173 void Layout() override; |
169 | 174 |
170 private: | 175 private: |
| 176 // Initializes the view. |
| 177 void Init(); |
| 178 |
171 bool managed_; | 179 bool managed_; |
172 views::ImageView* image_view_; | 180 views::ImageView* image_view_; |
| 181 const gfx::ImageSkia* image_; |
173 | 182 |
174 DISALLOW_COPY_AND_ASSIGN(ControlledSettingIndicatorView); | 183 DISALLOW_COPY_AND_ASSIGN(ControlledSettingIndicatorView); |
175 }; | 184 }; |
176 | 185 |
177 } // namespace chromeos | 186 } // namespace chromeos |
178 | 187 |
179 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_CONFIG_VIEW_H_ | 188 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_CONFIG_VIEW_H_ |
OLD | NEW |