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

Unified Diff: chrome/browser/chromeos/options/network_config_view.h

Issue 8726008: Disable network "Connect" dialog UI in case of policy-managed networks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/options/network_config_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « no previous file | chrome/browser/chromeos/options/network_config_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698