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

Side by Side 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 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/options/network_config_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/string16.h" 12 #include "base/string16.h"
13 #include "chrome/browser/chromeos/cros/network_library.h" 13 #include "chrome/browser/chromeos/cros/network_library.h"
14 #include "chrome/browser/chromeos/cros/network_ui_data.h"
14 #include "ui/gfx/native_widget_types.h" // gfx::NativeWindow 15 #include "ui/gfx/native_widget_types.h" // gfx::NativeWindow
15 #include "ui/views/controls/button/button.h" // views::ButtonListener 16 #include "ui/views/controls/button/button.h" // views::ButtonListener
16 #include "ui/views/window/dialog_delegate.h" 17 #include "ui/views/window/dialog_delegate.h"
17 18
18 namespace views { 19 namespace views {
20 class ImageView;
19 class NativeTextButton; 21 class NativeTextButton;
20 class View; 22 class View;
21 } 23 }
22 24
23 namespace chromeos { 25 namespace chromeos {
24 26
25 class ChildNetworkConfigView; 27 class ChildNetworkConfigView;
26 28
27 // A dialog box for showing a password textfield. 29 // A dialog box for showing a password textfield.
28 class NetworkConfigView : public views::DialogDelegateView, 30 class NetworkConfigView : public views::DialogDelegateView,
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 static const int kInputFieldMinWidth; 134 static const int kInputFieldMinWidth;
133 135
134 protected: 136 protected:
135 std::string service_path_; 137 std::string service_path_;
136 NetworkConfigView* parent_; 138 NetworkConfigView* parent_;
137 139
138 private: 140 private:
139 DISALLOW_COPY_AND_ASSIGN(ChildNetworkConfigView); 141 DISALLOW_COPY_AND_ASSIGN(ChildNetworkConfigView);
140 }; 142 };
141 143
144 // Shows an icon with tooltip indicating whether a setting is under policy
145 // control.
146 class ControlledSettingIndicatorView : public views::View {
147 public:
148 ControlledSettingIndicatorView();
149 explicit ControlledSettingIndicatorView(const NetworkPropertyUIData& ui_data);
150 virtual ~ControlledSettingIndicatorView();
151
152 // Updates the view based on |ui_data|.
153 void Update(const NetworkPropertyUIData& ui_data);
154
155 protected:
156 // views::View:
157 virtual gfx::Size GetPreferredSize() OVERRIDE;
158 virtual bool IsVisible() const OVERRIDE;
159 virtual void Layout() OVERRIDE;
160 virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE;
161 virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE;
162
163 private:
164 // Initializes the view.
165 void Init();
166
167 bool managed_;
168 views::ImageView* image_view_;
169 const SkBitmap* gray_image_;
170 const SkBitmap* color_image_;
171
172 DISALLOW_COPY_AND_ASSIGN(ControlledSettingIndicatorView);
173 };
174
142 } // namespace chromeos 175 } // namespace chromeos
143 176
144 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_CONFIG_VIEW_H_ 177 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_CONFIG_VIEW_H_
OLDNEW
« 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