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 8438064: Separate StatusAreaView from StatusAreaViewChromeos (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 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"
11 #include "chrome/browser/chromeos/login/version_info_updater.h" 10 #include "chrome/browser/chromeos/login/version_info_updater.h"
11 #include "chrome/browser/chromeos/status/status_area_button.h"
12 #include "chrome/browser/chromeos/status/status_area_view_chromeos.h"
12 #include "views/view.h" 13 #include "views/view.h"
13 14
14 namespace views { 15 namespace views {
15 class Label; 16 class Label;
16 class TextButton; 17 class TextButton;
17 class Widget; 18 class Widget;
18 class WidgetDelegate; 19 class WidgetDelegate;
19 } 20 }
20 21
21 class DOMView; 22 class DOMView;
22 class GURL; 23 class GURL;
23 class Profile; 24 class Profile;
24 25
25 namespace chromeos { 26 namespace chromeos {
26 27
27 class OobeProgressBar; 28 class OobeProgressBar;
28 class ShutdownButton; 29 class ShutdownButton;
29 class StatusAreaView;
30 30
31 // View used to render the background during login. BackgroundView contains 31 // View used to render the background during login. BackgroundView contains
32 // StatusAreaView. 32 // StatusAreaView.
33 class BackgroundView : public views::View, 33 class BackgroundView : public views::View,
34 public StatusAreaHost, 34 public StatusAreaButton::Delegate,
35 public LoginHtmlDialog::Delegate, 35 public LoginHtmlDialog::Delegate,
36 public VersionInfoUpdater::Delegate { 36 public VersionInfoUpdater::Delegate {
37 public: 37 public:
38 enum LoginStep { 38 enum LoginStep {
39 SELECT_NETWORK, 39 SELECT_NETWORK,
40 EULA, 40 EULA,
41 SIGNIN, 41 SIGNIN,
42 REGISTRATION, 42 REGISTRATION,
43 PICTURE, 43 PICTURE,
44 44
(...skipping 16 matching lines...) Expand all
61 // widget. The BackgroundView is set in |view|. If background_url is non 61 // widget. The BackgroundView is set in |view|. If background_url is non
62 // empty, the content page of the url is displayed as a background. 62 // empty, the content page of the url is displayed as a background.
63 static views::Widget* CreateWindowContainingView( 63 static views::Widget* CreateWindowContainingView(
64 const gfx::Rect& bounds, 64 const gfx::Rect& bounds,
65 const GURL& background_url, 65 const GURL& background_url,
66 BackgroundView** view); 66 BackgroundView** view);
67 67
68 // Create a modal popup view. 68 // Create a modal popup view.
69 void CreateModalPopup(views::WidgetDelegate* view); 69 void CreateModalPopup(views::WidgetDelegate* view);
70 70
71 // Overridden from StatusAreaHost: 71 // Gets the native window from the view widget.
72 virtual gfx::NativeWindow GetNativeWindow() const; 72 gfx::NativeWindow GetNativeWindow() const;
73 73
74 // Toggles status area visibility. 74 // Toggles status area visibility.
75 void SetStatusAreaVisible(bool visible); 75 void SetStatusAreaVisible(bool visible);
76 76
77 // Toggles whether status area is enabled. 77 // Toggles whether status area is enabled.
78 void SetStatusAreaEnabled(bool enable); 78 void SetStatusAreaEnabled(bool enable);
79 79
80 // Toggles OOBE progress bar visibility, the bar is hidden by default. 80 // Toggles OOBE progress bar visibility, the bar is hidden by default.
81 void SetOobeProgressBarVisible(bool visible); 81 void SetOobeProgressBarVisible(bool visible);
82 82
(...skipping 19 matching lines...) Expand all
102 void SetDefaultUse24HourClock(bool use_24hour_clock); 102 void SetDefaultUse24HourClock(bool use_24hour_clock);
103 103
104 // Overridden from views::View: 104 // Overridden from views::View:
105 virtual void Layout() OVERRIDE; 105 virtual void Layout() OVERRIDE;
106 106
107 protected: 107 protected:
108 // Overridden from views::View: 108 // Overridden from views::View:
109 virtual void ChildPreferredSizeChanged(View* child) OVERRIDE; 109 virtual void ChildPreferredSizeChanged(View* child) OVERRIDE;
110 virtual void OnLocaleChanged() OVERRIDE; 110 virtual void OnLocaleChanged() OVERRIDE;
111 111
112 // Overridden from StatusAreaHost: 112 // Overridden from StatusAreaButton::Delegate:
113 virtual Profile* GetProfile() const OVERRIDE; 113 virtual bool ShouldExecuteStatusAreaCommand(
114 virtual void ExecuteBrowserCommand(int id) const OVERRIDE {} 114 const views::View* button_view, int command_id) const OVERRIDE;
115 virtual bool ShouldOpenButtonOptions( 115 virtual void ExecuteStatusAreaCommand(
116 const views::View* button_view) const OVERRIDE; 116 const views::View* button_view, int command_id) OVERRIDE;
117 virtual void OpenButtonOptions(const views::View* button_view) OVERRIDE; 117 virtual gfx::Font GetStatusAreaFont(const gfx::Font& font) const OVERRIDE;
118 virtual ScreenMode GetScreenMode() const OVERRIDE; 118 virtual StatusAreaButton::TextStyle GetStatusAreaTextStyle() const OVERRIDE;
119 virtual TextStyle GetTextStyle() const OVERRIDE;
120 virtual void ButtonVisibilityChanged(views::View* button_view) OVERRIDE; 119 virtual void ButtonVisibilityChanged(views::View* button_view) OVERRIDE;
121 120
122 // Overridden from LoginHtmlDialog::Delegate: 121 // Overridden from LoginHtmlDialog::Delegate:
123 virtual void OnDialogClosed() OVERRIDE {} 122 virtual void OnDialogClosed() OVERRIDE {}
124 123
125 // Overridden from VersionInfoUpdater::Delegate: 124 // Overridden from VersionInfoUpdater::Delegate:
126 virtual void OnOSVersionLabelTextUpdated( 125 virtual void OnOSVersionLabelTextUpdated(
127 const std::string& os_version_label_text) OVERRIDE; 126 const std::string& os_version_label_text) OVERRIDE;
128 virtual void OnBootTimesLabelTextUpdated( 127 virtual void OnBootTimesLabelTextUpdated(
129 const std::string& boot_times_label_text) OVERRIDE; 128 const std::string& boot_times_label_text) OVERRIDE;
130 129
130 void set_screen_mode(StatusAreaViewChromeos::ScreenMode mode) {
131 screen_mode_ = mode;
132 }
133
131 private: 134 private:
132 // Creates and adds the status_area. 135 // Creates and adds the status_area.
133 void InitStatusArea(); 136 void InitStatusArea();
134 // Creates and adds the labels for version and boot time. 137 // Creates and adds the labels for version and boot time.
135 void InitInfoLabels(); 138 void InitInfoLabels();
136 // Creates and add OOBE progress bar. 139 // Creates and add OOBE progress bar.
137 void InitProgressBar(); 140 void InitProgressBar();
138 141
139 // Invokes SetWindowType for the window. This is invoked during startup and 142 // Invokes SetWindowType for the window. This is invoked during startup and
140 // after we've painted. 143 // after we've painted.
141 void UpdateWindowType(); 144 void UpdateWindowType();
142 145
143 // All of these variables could be NULL. 146 // All of these variables could be NULL.
144 StatusAreaView* status_area_; 147 StatusAreaViewChromeos* status_area_;
148 StatusAreaViewChromeos::ScreenMode screen_mode_;
145 views::Label* os_version_label_; 149 views::Label* os_version_label_;
146 views::Label* boot_times_label_; 150 views::Label* boot_times_label_;
147 OobeProgressBar* progress_bar_; 151 OobeProgressBar* progress_bar_;
148 ShutdownButton* shutdown_button_; 152 ShutdownButton* shutdown_button_;
149 153
150 // True if running official BUILD. 154 // True if running official BUILD.
151 bool is_official_build_; 155 bool is_official_build_;
152 156
153 // DOMView for rendering a webpage as a background. 157 // DOMView for rendering a webpage as a background.
154 DOMView* background_area_; 158 DOMView* background_area_;
155 159
156 // Proxy settings dialog that can be invoked from network menu. 160 // Proxy settings dialog that can be invoked from network menu.
157 scoped_ptr<LoginHtmlDialog> proxy_settings_dialog_; 161 scoped_ptr<LoginHtmlDialog> proxy_settings_dialog_;
158 162
159 // Updates version info. 163 // Updates version info.
160 VersionInfoUpdater version_info_updater_; 164 VersionInfoUpdater version_info_updater_;
161 165
162 DISALLOW_COPY_AND_ASSIGN(BackgroundView); 166 DISALLOW_COPY_AND_ASSIGN(BackgroundView);
163 }; 167 };
164 168
165 } // namespace chromeos 169 } // namespace chromeos
166 170
167 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_BACKGROUND_VIEW_H_ 171 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_BACKGROUND_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/frame/browser_view.cc ('k') | chrome/browser/chromeos/login/background_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698