| 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(); | |
| 164 explicit ControlledSettingIndicatorView(const NetworkPropertyUIData& ui_data); | 163 explicit ControlledSettingIndicatorView(const NetworkPropertyUIData& ui_data); |
| 165 ~ControlledSettingIndicatorView() override; | 164 ~ControlledSettingIndicatorView() override; |
| 166 | 165 |
| 167 // Updates the view based on |ui_data|. | |
| 168 void Update(const NetworkPropertyUIData& ui_data); | |
| 169 | |
| 170 protected: | 166 protected: |
| 171 // views::View: | 167 // views::View: |
| 172 gfx::Size GetPreferredSize() const override; | 168 gfx::Size GetPreferredSize() const override; |
| 173 void Layout() override; | |
| 174 | 169 |
| 175 private: | 170 private: |
| 176 // Initializes the view. | |
| 177 void Init(); | |
| 178 | |
| 179 bool managed_; | 171 bool managed_; |
| 180 views::ImageView* image_view_; | 172 views::ImageView* image_view_; |
| 181 const gfx::ImageSkia* image_; | |
| 182 | 173 |
| 183 DISALLOW_COPY_AND_ASSIGN(ControlledSettingIndicatorView); | 174 DISALLOW_COPY_AND_ASSIGN(ControlledSettingIndicatorView); |
| 184 }; | 175 }; |
| 185 | 176 |
| 186 } // namespace chromeos | 177 } // namespace chromeos |
| 187 | 178 |
| 188 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_CONFIG_VIEW_H_ | 179 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_CONFIG_VIEW_H_ |
| OLD | NEW |