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

Side by Side Diff: chrome/browser/chromeos/login/ui/webui_login_view.h

Issue 2429033003: cros: Cleanup lock screen and OOBE C++ backing code. (Closed)
Patch Set: Initial patch Created 4 years, 2 months 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_UI_WEBUI_LOGIN_VIEW_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_UI_WEBUI_LOGIN_VIEW_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UI_WEBUI_LOGIN_VIEW_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UI_WEBUI_LOGIN_VIEW_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 void OnLocaleChanged() override; 105 void OnLocaleChanged() override;
106 void ChildPreferredSizeChanged(View* child) override; 106 void ChildPreferredSizeChanged(View* child) override;
107 void AboutToRequestFocusFromTabTraversal(bool reverse) override; 107 void AboutToRequestFocusFromTabTraversal(bool reverse) override;
108 108
109 // Overridden from content::NotificationObserver. 109 // Overridden from content::NotificationObserver.
110 void Observe(int type, 110 void Observe(int type,
111 const content::NotificationSource& source, 111 const content::NotificationSource& source,
112 const content::NotificationDetails& details) override; 112 const content::NotificationDetails& details) override;
113 113
114 // WebView for rendering a webpage as a webui login. 114 // WebView for rendering a webpage as a webui login.
115 views::WebView* webui_login_; 115 views::WebView* webui_login_ = nullptr;
116 116
117 private: 117 private:
118 // Map type for the accelerator-to-identifier map. 118 // Map type for the accelerator-to-identifier map.
119 typedef std::map<ui::Accelerator, std::string> AccelMap; 119 typedef std::map<ui::Accelerator, std::string> AccelMap;
120 120
121 // Overridden from content::WebContentsDelegate. 121 // Overridden from content::WebContentsDelegate.
122 bool HandleContextMenu(const content::ContextMenuParams& params) override; 122 bool HandleContextMenu(const content::ContextMenuParams& params) override;
123 void HandleKeyboardEvent( 123 void HandleKeyboardEvent(
124 content::WebContents* source, 124 content::WebContents* source,
125 const content::NativeWebKeyboardEvent& event) override; 125 const content::NativeWebKeyboardEvent& event) override;
(...skipping 17 matching lines...) Expand all
143 143
144 content::NotificationRegistrar registrar_; 144 content::NotificationRegistrar registrar_;
145 145
146 // Converts keyboard events on the WebContents to accelerators. 146 // Converts keyboard events on the WebContents to accelerators.
147 views::UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_; 147 views::UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_;
148 148
149 // Maps installed accelerators to OOBE webui accelerator identifiers. 149 // Maps installed accelerators to OOBE webui accelerator identifiers.
150 AccelMap accel_map_; 150 AccelMap accel_map_;
151 151
152 // True when WebUI is being initialized hidden. 152 // True when WebUI is being initialized hidden.
153 bool is_hidden_; 153 bool is_hidden_ = false;
154 154
155 // True when the WebUI has finished initializing and is visible. 155 // True when the WebUI has finished initializing and is visible.
156 bool webui_visible_; 156 bool webui_visible_ = false;
157 157
158 // Should we emit the login-prompt-visible signal when the login page is 158 // Should we emit the login-prompt-visible signal when the login page is
159 // displayed? 159 // displayed?
160 bool should_emit_login_prompt_visible_; 160 bool should_emit_login_prompt_visible_ = true;
161 161
162 // True to forward keyboard event. 162 // True to forward keyboard event.
163 bool forward_keyboard_event_; 163 bool forward_keyboard_event_ = true;
164 164
165 // A FocusTraversable for StatusAreaWidget that uses 165 // A FocusTraversable for StatusAreaWidget that uses
166 // |status_area_widget_host_| as placeholder in WebUiLoginView's focus chain. 166 // |status_area_widget_host_| as placeholder in WebUiLoginView's focus chain.
167 class StatusAreaFocusTraversable; 167 class StatusAreaFocusTraversable;
168 std::unique_ptr<StatusAreaFocusTraversable> status_area_focus_traversable_; 168 std::unique_ptr<StatusAreaFocusTraversable> status_area_focus_traversable_;
169 views::View* status_area_widget_host_ = nullptr; 169 views::View* status_area_widget_host_ = nullptr;
170 170
171 // A FocusTraversable for WebUILoginView that loops back at the end of its 171 // A FocusTraversable for WebUILoginView that loops back at the end of its
172 // focus chain. 172 // focus chain.
173 class CycleFocusTraversable; 173 class CycleFocusTraversable;
174 std::unique_ptr<CycleFocusTraversable> cycle_focus_traversable_; 174 std::unique_ptr<CycleFocusTraversable> cycle_focus_traversable_;
175 175
176 base::ObserverList<web_modal::ModalDialogHostObserver> observer_list_; 176 base::ObserverList<web_modal::ModalDialogHostObserver> observer_list_;
177 177
178 DISALLOW_COPY_AND_ASSIGN(WebUILoginView); 178 DISALLOW_COPY_AND_ASSIGN(WebUILoginView);
179 }; 179 };
180 180
181 } // namespace chromeos 181 } // namespace chromeos
182 182
183 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_WEBUI_LOGIN_VIEW_H_ 183 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_WEBUI_LOGIN_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698