Index: chrome/browser/chromeos/options/network_config_view.h |
diff --git a/chrome/browser/chromeos/options/network_config_view.h b/chrome/browser/chromeos/options/network_config_view.h |
index 3d988fda1ba0f2297af088384a9d577bbb94bf26..8f12f637445e36320feea0f3545af38ddce0c2f9 100644 |
--- a/chrome/browser/chromeos/options/network_config_view.h |
+++ b/chrome/browser/chromeos/options/network_config_view.h |
@@ -11,11 +11,13 @@ |
#include "base/compiler_specific.h" |
#include "base/string16.h" |
#include "chrome/browser/chromeos/cros/network_library.h" |
+#include "chrome/browser/chromeos/cros/network_ui_data.h" |
#include "ui/gfx/native_widget_types.h" // gfx::NativeWindow |
#include "ui/views/controls/button/button.h" // views::ButtonListener |
#include "ui/views/window/dialog_delegate.h" |
namespace views { |
+class ImageView; |
class NativeTextButton; |
class View; |
} |
@@ -139,6 +141,37 @@ class ChildNetworkConfigView : public views::View { |
DISALLOW_COPY_AND_ASSIGN(ChildNetworkConfigView); |
}; |
+// Shows an icon with tooltip indicating whether a setting is under policy |
+// control. |
+class ControlledSettingIndicatorView : public views::View { |
+ public: |
+ ControlledSettingIndicatorView(); |
+ explicit ControlledSettingIndicatorView(const NetworkPropertyUIData& ui_data); |
+ virtual ~ControlledSettingIndicatorView(); |
+ |
+ // Updates the view based on |ui_data|. |
+ void Update(const NetworkPropertyUIData& ui_data); |
+ |
+ protected: |
+ // views::View: |
+ virtual gfx::Size GetPreferredSize() OVERRIDE; |
+ virtual bool IsVisible() const OVERRIDE; |
+ virtual void Layout() OVERRIDE; |
+ virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE; |
+ virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE; |
+ |
+ private: |
+ // Initializes the view. |
+ void Init(); |
+ |
+ bool managed_; |
+ views::ImageView* image_view_; |
+ const SkBitmap* gray_image_; |
+ const SkBitmap* color_image_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ControlledSettingIndicatorView); |
+}; |
+ |
} // namespace chromeos |
#endif // CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_CONFIG_VIEW_H_ |