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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 // Shows a network connection dialog if none is currently visible. | 47 // Shows a network connection dialog if none is currently visible. |
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 string16 GetDialogButtonLabel(ui::DialogButton button) const OVERRIDE; | 57 virtual base::string16 GetDialogButtonLabel( |
| 58 ui::DialogButton button) const OVERRIDE; |
58 virtual bool IsDialogButtonEnabled(ui::DialogButton button) const OVERRIDE; | 59 virtual bool IsDialogButtonEnabled(ui::DialogButton button) const OVERRIDE; |
59 virtual bool Cancel() OVERRIDE; | 60 virtual bool Cancel() OVERRIDE; |
60 virtual bool Accept() OVERRIDE; | 61 virtual bool Accept() OVERRIDE; |
61 virtual views::View* CreateExtraView() OVERRIDE; | 62 virtual views::View* CreateExtraView() OVERRIDE; |
62 virtual views::View* GetInitiallyFocusedView() OVERRIDE; | 63 virtual views::View* GetInitiallyFocusedView() OVERRIDE; |
63 | 64 |
64 // views::WidgetDelegate methods. | 65 // views::WidgetDelegate methods. |
65 virtual string16 GetWindowTitle() const OVERRIDE; | 66 virtual base::string16 GetWindowTitle() const OVERRIDE; |
66 virtual ui::ModalType GetModalType() const OVERRIDE; | 67 virtual ui::ModalType GetModalType() const OVERRIDE; |
67 | 68 |
68 // views::View overrides. | 69 // views::View overrides. |
69 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 70 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
70 | 71 |
71 // views::ButtonListener overrides. | 72 // views::ButtonListener overrides. |
72 virtual void ButtonPressed( | 73 virtual void ButtonPressed( |
73 views::Button* sender, const ui::Event& event) OVERRIDE; | 74 views::Button* sender, const ui::Event& event) OVERRIDE; |
74 | 75 |
75 void set_delegate(Delegate* delegate) { | 76 void set_delegate(Delegate* delegate) { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 // methods, which are called by NetworkConfigView. | 115 // methods, which are called by NetworkConfigView. |
115 class ChildNetworkConfigView : public views::View { | 116 class ChildNetworkConfigView : public views::View { |
116 public: | 117 public: |
117 // If |service_path| is NULL, a dialog for configuring a new network will | 118 // If |service_path| is NULL, a dialog for configuring a new network will |
118 // be created. | 119 // be created. |
119 ChildNetworkConfigView(NetworkConfigView* parent, | 120 ChildNetworkConfigView(NetworkConfigView* parent, |
120 const std::string& service_path); | 121 const std::string& service_path); |
121 virtual ~ChildNetworkConfigView(); | 122 virtual ~ChildNetworkConfigView(); |
122 | 123 |
123 // Get the title to show for the dialog. | 124 // Get the title to show for the dialog. |
124 virtual string16 GetTitle() const = 0; | 125 virtual base::string16 GetTitle() const = 0; |
125 | 126 |
126 // Returns view that should be focused on dialog activation. | 127 // Returns view that should be focused on dialog activation. |
127 virtual views::View* GetInitiallyFocusedView() = 0; | 128 virtual views::View* GetInitiallyFocusedView() = 0; |
128 | 129 |
129 // Called to determine if "Connect" button should be enabled. | 130 // Called to determine if "Connect" button should be enabled. |
130 virtual bool CanLogin() = 0; | 131 virtual bool CanLogin() = 0; |
131 | 132 |
132 // Called when "Connect" button is clicked. | 133 // Called when "Connect" button is clicked. |
133 // Should return false if dialog should remain open. | 134 // Should return false if dialog should remain open. |
134 virtual bool Login() = 0; | 135 virtual bool Login() = 0; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 bool managed_; | 175 bool managed_; |
175 views::ImageView* image_view_; | 176 views::ImageView* image_view_; |
176 const gfx::ImageSkia* image_; | 177 const gfx::ImageSkia* image_; |
177 | 178 |
178 DISALLOW_COPY_AND_ASSIGN(ControlledSettingIndicatorView); | 179 DISALLOW_COPY_AND_ASSIGN(ControlledSettingIndicatorView); |
179 }; | 180 }; |
180 | 181 |
181 } // namespace chromeos | 182 } // namespace chromeos |
182 | 183 |
183 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_CONFIG_VIEW_H_ | 184 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_CONFIG_VIEW_H_ |
OLD | NEW |