OLD | NEW |
---|---|
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 26 matching lines...) Expand all Loading... | |
37 | 37 |
38 // View used to render a WebUI supporting Widget. This widget is used for the | 38 // View used to render a WebUI supporting Widget. This widget is used for the |
39 // WebUI based start up and lock screens. It contains a WebView. | 39 // WebUI based start up and lock screens. It contains a WebView. |
40 class WebUILoginView : public views::View, | 40 class WebUILoginView : public views::View, |
41 public content::WebContentsDelegate, | 41 public content::WebContentsDelegate, |
42 public content::WebContentsObserver, | 42 public content::WebContentsObserver, |
43 public content::NotificationObserver, | 43 public content::NotificationObserver, |
44 public ChromeWebModalDialogManagerDelegate, | 44 public ChromeWebModalDialogManagerDelegate, |
45 public web_modal::WebContentsModalDialogHost { | 45 public web_modal::WebContentsModalDialogHost { |
46 public: | 46 public: |
47 typedef content::WebContentsObserver FrameObserver; | |
ygorshenin1
2014/06/18 13:11:35
nit: add an empty line after line #47.
Roman Sorokin (ftl)
2014/06/19 11:57:37
Done.
| |
47 // Internal class name. | 48 // Internal class name. |
48 static const char kViewClassName[]; | 49 static const char kViewClassName[]; |
49 | 50 |
50 WebUILoginView(); | 51 WebUILoginView(); |
51 virtual ~WebUILoginView(); | 52 virtual ~WebUILoginView(); |
52 | 53 |
53 // Initializes the webui login view. | 54 // Initializes the webui login view. |
54 virtual void Init(); | 55 virtual void Init(); |
55 | 56 |
56 // Overridden from views::View: | 57 // Overridden from views::View: |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
98 | 99 |
99 void set_is_hidden(bool hidden) { is_hidden_ = hidden; } | 100 void set_is_hidden(bool hidden) { is_hidden_ = hidden; } |
100 | 101 |
101 bool webui_visible() const { return webui_visible_; } | 102 bool webui_visible() const { return webui_visible_; } |
102 | 103 |
103 // Let suppress emission of this signal. | 104 // Let suppress emission of this signal. |
104 void set_should_emit_login_prompt_visible(bool emit) { | 105 void set_should_emit_login_prompt_visible(bool emit) { |
105 should_emit_login_prompt_visible_ = emit; | 106 should_emit_login_prompt_visible_ = emit; |
106 } | 107 } |
107 | 108 |
109 void AddFrameObserver(FrameObserver* frame_observer); | |
110 void RemoveFrameObserver(FrameObserver* frame_observer); | |
111 | |
108 protected: | 112 protected: |
109 // Overridden from views::View: | 113 // Overridden from views::View: |
110 virtual void Layout() OVERRIDE; | 114 virtual void Layout() OVERRIDE; |
111 virtual void OnLocaleChanged() OVERRIDE; | 115 virtual void OnLocaleChanged() OVERRIDE; |
112 virtual void ChildPreferredSizeChanged(View* child) OVERRIDE; | 116 virtual void ChildPreferredSizeChanged(View* child) OVERRIDE; |
113 virtual void AboutToRequestFocusFromTabTraversal(bool reverse) OVERRIDE; | 117 virtual void AboutToRequestFocusFromTabTraversal(bool reverse) OVERRIDE; |
114 | 118 |
115 // Overridden from content::NotificationObserver. | 119 // Overridden from content::NotificationObserver. |
116 virtual void Observe(int type, | 120 virtual void Observe(int type, |
117 const content::NotificationSource& source, | 121 const content::NotificationSource& source, |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
178 // Should we emit the login-prompt-visible signal when the login page is | 182 // Should we emit the login-prompt-visible signal when the login page is |
179 // displayed? | 183 // displayed? |
180 bool should_emit_login_prompt_visible_; | 184 bool should_emit_login_prompt_visible_; |
181 | 185 |
182 // True to forward keyboard event. | 186 // True to forward keyboard event. |
183 bool forward_keyboard_event_; | 187 bool forward_keyboard_event_; |
184 | 188 |
185 scoped_ptr<ScopedGaiaAuthExtension> auth_extension_; | 189 scoped_ptr<ScopedGaiaAuthExtension> auth_extension_; |
186 | 190 |
187 ObserverList<web_modal::ModalDialogHostObserver> observer_list_; | 191 ObserverList<web_modal::ModalDialogHostObserver> observer_list_; |
192 ObserverList<FrameObserver> frame_observer_list_; | |
188 | 193 |
189 DISALLOW_COPY_AND_ASSIGN(WebUILoginView); | 194 DISALLOW_COPY_AND_ASSIGN(WebUILoginView); |
190 }; | 195 }; |
191 | 196 |
192 } // namespace chromeos | 197 } // namespace chromeos |
193 | 198 |
194 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_WEBUI_LOGIN_VIEW_H_ | 199 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_WEBUI_LOGIN_VIEW_H_ |
OLD | NEW |