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

Side by Side Diff: chrome/browser/chromeos/login/background_view.h

Issue 8436002: [cros] Remove Views implementation for login/OOBE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge 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 unified diff | Download patch | Annotate | Revision Log
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_LOGIN_BACKGROUND_VIEW_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_BACKGROUND_VIEW_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_BACKGROUND_VIEW_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_BACKGROUND_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/chromeos/login/login_html_dialog.h" 9 #include "chrome/browser/chromeos/login/login_html_dialog.h"
10 #include "chrome/browser/chromeos/status/status_area_host.h" 10 #include "chrome/browser/chromeos/status/status_area_host.h"
11 #include "chrome/browser/chromeos/login/version_info_updater.h" 11 #include "chrome/browser/chromeos/login/version_info_updater.h"
12 #include "views/view.h" 12 #include "views/view.h"
13 13
14 namespace views { 14 namespace views {
15 class Label; 15 class Label;
16 class TextButton; 16 class TextButton;
17 class Widget; 17 class Widget;
18 class WidgetDelegate; 18 class WidgetDelegate;
19 } 19 }
20 20
21 class DOMView; 21 class DOMView;
22 class GURL; 22 class GURL;
23 class Profile; 23 class Profile;
24 24
25 namespace chromeos { 25 namespace chromeos {
26 26
27 class OobeProgressBar;
28 class ShutdownButton; 27 class ShutdownButton;
29 class StatusAreaView; 28 class StatusAreaView;
30 29
31 // View used to render the background during login. BackgroundView contains 30 // View used to render the background during login. BackgroundView contains
32 // StatusAreaView. 31 // StatusAreaView.
33 class BackgroundView : public views::View, 32 class BackgroundView : public views::View,
34 public StatusAreaHost, 33 public StatusAreaHost,
35 public LoginHtmlDialog::Delegate, 34 public LoginHtmlDialog::Delegate,
36 public VersionInfoUpdater::Delegate { 35 public VersionInfoUpdater::Delegate {
37 public: 36 public:
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 69
71 // Overridden from StatusAreaHost: 70 // Overridden from StatusAreaHost:
72 virtual gfx::NativeWindow GetNativeWindow() const; 71 virtual gfx::NativeWindow GetNativeWindow() const;
73 72
74 // Toggles status area visibility. 73 // Toggles status area visibility.
75 void SetStatusAreaVisible(bool visible); 74 void SetStatusAreaVisible(bool visible);
76 75
77 // Toggles whether status area is enabled. 76 // Toggles whether status area is enabled.
78 void SetStatusAreaEnabled(bool enable); 77 void SetStatusAreaEnabled(bool enable);
79 78
80 // Toggles OOBE progress bar visibility, the bar is hidden by default.
81 void SetOobeProgressBarVisible(bool visible);
82
83 // Gets progress bar visibility.
84 bool IsOobeProgressBarVisible();
85
86 // Sets current step on OOBE progress bar.
87 void SetOobeProgress(LoginStep step);
88
89 // Shows screen saver. 79 // Shows screen saver.
90 void ShowScreenSaver(); 80 void ShowScreenSaver();
91 81
92 // Hides screen saver. 82 // Hides screen saver.
93 void HideScreenSaver(); 83 void HideScreenSaver();
94 84
95 // Tells if screen saver is visible. 85 // Tells if screen saver is visible.
96 bool IsScreenSaverVisible(); 86 bool IsScreenSaverVisible();
97 87
98 // Tells if screen saver is enabled. 88 // Tells if screen saver is enabled.
(...skipping 27 matching lines...) Expand all
126 virtual void OnOSVersionLabelTextUpdated( 116 virtual void OnOSVersionLabelTextUpdated(
127 const std::string& os_version_label_text) OVERRIDE; 117 const std::string& os_version_label_text) OVERRIDE;
128 virtual void OnBootTimesLabelTextUpdated( 118 virtual void OnBootTimesLabelTextUpdated(
129 const std::string& boot_times_label_text) OVERRIDE; 119 const std::string& boot_times_label_text) OVERRIDE;
130 120
131 private: 121 private:
132 // Creates and adds the status_area. 122 // Creates and adds the status_area.
133 void InitStatusArea(); 123 void InitStatusArea();
134 // Creates and adds the labels for version and boot time. 124 // Creates and adds the labels for version and boot time.
135 void InitInfoLabels(); 125 void InitInfoLabels();
136 // Creates and add OOBE progress bar.
137 void InitProgressBar();
138 126
139 // Invokes SetWindowType for the window. This is invoked during startup and 127 // Invokes SetWindowType for the window. This is invoked during startup and
140 // after we've painted. 128 // after we've painted.
141 void UpdateWindowType(); 129 void UpdateWindowType();
142 130
143 // All of these variables could be NULL. 131 // All of these variables could be NULL.
144 StatusAreaView* status_area_; 132 StatusAreaView* status_area_;
145 views::Label* os_version_label_; 133 views::Label* os_version_label_;
146 views::Label* boot_times_label_; 134 views::Label* boot_times_label_;
147 OobeProgressBar* progress_bar_;
148 ShutdownButton* shutdown_button_; 135 ShutdownButton* shutdown_button_;
149 136
150 // True if running official BUILD. 137 // True if running official BUILD.
151 bool is_official_build_; 138 bool is_official_build_;
152 139
153 // DOMView for rendering a webpage as a background. 140 // DOMView for rendering a webpage as a background.
154 DOMView* background_area_; 141 DOMView* background_area_;
155 142
156 // Proxy settings dialog that can be invoked from network menu. 143 // Proxy settings dialog that can be invoked from network menu.
157 scoped_ptr<LoginHtmlDialog> proxy_settings_dialog_; 144 scoped_ptr<LoginHtmlDialog> proxy_settings_dialog_;
158 145
159 // Updates version info. 146 // Updates version info.
160 VersionInfoUpdater version_info_updater_; 147 VersionInfoUpdater version_info_updater_;
161 148
162 DISALLOW_COPY_AND_ASSIGN(BackgroundView); 149 DISALLOW_COPY_AND_ASSIGN(BackgroundView);
163 }; 150 };
164 151
165 } // namespace chromeos 152 } // namespace chromeos
166 153
167 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_BACKGROUND_VIEW_H_ 154 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_BACKGROUND_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698