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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 static void Show(const std::string& service_path, gfx::NativeWindow parent); | 48 static void Show(const std::string& service_path, gfx::NativeWindow parent); |
49 // Shows a dialog to configure a new network. |type| must be a valid Shill | 49 // Shows a dialog to configure a new network. |type| must be a valid Shill |
50 // 'Type' property value. | 50 // 'Type' property value. |
51 static void ShowForType(const std::string& type, gfx::NativeWindow parent); | 51 static void ShowForType(const std::string& type, gfx::NativeWindow parent); |
52 | 52 |
53 // Returns corresponding native window. | 53 // Returns corresponding native window. |
54 gfx::NativeWindow GetNativeWindow() const; | 54 gfx::NativeWindow GetNativeWindow() const; |
55 | 55 |
56 // views::DialogDelegate methods. | 56 // views::DialogDelegate methods. |
57 virtual base::string16 GetDialogButtonLabel( | 57 virtual base::string16 GetDialogButtonLabel( |
58 ui::DialogButton button) const OVERRIDE; | 58 ui::DialogButton button) const override; |
59 virtual bool IsDialogButtonEnabled(ui::DialogButton button) const OVERRIDE; | 59 virtual bool IsDialogButtonEnabled(ui::DialogButton button) const override; |
60 virtual bool Cancel() OVERRIDE; | 60 virtual bool Cancel() override; |
61 virtual bool Accept() OVERRIDE; | 61 virtual bool Accept() override; |
62 virtual views::View* CreateExtraView() OVERRIDE; | 62 virtual views::View* CreateExtraView() override; |
63 virtual views::View* GetInitiallyFocusedView() OVERRIDE; | 63 virtual views::View* GetInitiallyFocusedView() override; |
64 | 64 |
65 // views::WidgetDelegate methods. | 65 // views::WidgetDelegate methods. |
66 virtual base::string16 GetWindowTitle() const OVERRIDE; | 66 virtual base::string16 GetWindowTitle() const override; |
67 virtual ui::ModalType GetModalType() const OVERRIDE; | 67 virtual ui::ModalType GetModalType() const override; |
68 | 68 |
69 // views::View overrides. | 69 // views::View overrides. |
70 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; | 70 virtual void GetAccessibleState(ui::AXViewState* state) override; |
71 | 71 |
72 // views::ButtonListener overrides. | 72 // views::ButtonListener overrides. |
73 virtual void ButtonPressed( | 73 virtual void ButtonPressed( |
74 views::Button* sender, const ui::Event& event) OVERRIDE; | 74 views::Button* sender, const ui::Event& event) override; |
75 | 75 |
76 void set_delegate(Delegate* delegate) { | 76 void set_delegate(Delegate* delegate) { |
77 delegate_ = delegate; | 77 delegate_ = delegate; |
78 } | 78 } |
79 | 79 |
80 protected: | 80 protected: |
81 // views::View overrides: | 81 // views::View overrides: |
82 virtual void Layout() OVERRIDE; | 82 virtual void Layout() override; |
83 virtual gfx::Size GetPreferredSize() const OVERRIDE; | 83 virtual gfx::Size GetPreferredSize() const override; |
84 virtual void ViewHierarchyChanged( | 84 virtual void ViewHierarchyChanged( |
85 const ViewHierarchyChangedDetails& details) OVERRIDE; | 85 const ViewHierarchyChangedDetails& details) override; |
86 | 86 |
87 private: | 87 private: |
88 NetworkConfigView(); | 88 NetworkConfigView(); |
89 virtual ~NetworkConfigView(); | 89 virtual ~NetworkConfigView(); |
90 | 90 |
91 // Login dialog for known networks. Returns true if successfully created. | 91 // Login dialog for known networks. Returns true if successfully created. |
92 bool InitWithNetworkState(const NetworkState* network); | 92 bool InitWithNetworkState(const NetworkState* network); |
93 // Login dialog for new/hidden networks. Returns true if successfully created. | 93 // Login dialog for new/hidden networks. Returns true if successfully created. |
94 bool InitWithType(const std::string& type); | 94 bool InitWithType(const std::string& type); |
95 | 95 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 public: | 164 public: |
165 ControlledSettingIndicatorView(); | 165 ControlledSettingIndicatorView(); |
166 explicit ControlledSettingIndicatorView(const NetworkPropertyUIData& ui_data); | 166 explicit ControlledSettingIndicatorView(const NetworkPropertyUIData& ui_data); |
167 virtual ~ControlledSettingIndicatorView(); | 167 virtual ~ControlledSettingIndicatorView(); |
168 | 168 |
169 // Updates the view based on |ui_data|. | 169 // Updates the view based on |ui_data|. |
170 void Update(const NetworkPropertyUIData& ui_data); | 170 void Update(const NetworkPropertyUIData& ui_data); |
171 | 171 |
172 protected: | 172 protected: |
173 // views::View: | 173 // views::View: |
174 virtual gfx::Size GetPreferredSize() const OVERRIDE; | 174 virtual gfx::Size GetPreferredSize() const override; |
175 virtual void Layout() OVERRIDE; | 175 virtual void Layout() override; |
176 | 176 |
177 private: | 177 private: |
178 // Initializes the view. | 178 // Initializes the view. |
179 void Init(); | 179 void Init(); |
180 | 180 |
181 bool managed_; | 181 bool managed_; |
182 views::ImageView* image_view_; | 182 views::ImageView* image_view_; |
183 const gfx::ImageSkia* image_; | 183 const gfx::ImageSkia* image_; |
184 | 184 |
185 DISALLOW_COPY_AND_ASSIGN(ControlledSettingIndicatorView); | 185 DISALLOW_COPY_AND_ASSIGN(ControlledSettingIndicatorView); |
186 }; | 186 }; |
187 | 187 |
188 } // namespace chromeos | 188 } // namespace chromeos |
189 | 189 |
190 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_CONFIG_VIEW_H_ | 190 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_CONFIG_VIEW_H_ |
OLD | NEW |