| 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 |
| 11 #include "ash/common/system/status_area_focus_observer.h" |
| 11 #include "base/macros.h" | 12 #include "base/macros.h" |
| 12 #include "base/observer_list.h" | 13 #include "base/observer_list.h" |
| 13 #include "chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.h" | 14 #include "chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.h" |
| 14 #include "components/web_modal/web_contents_modal_dialog_host.h" | 15 #include "components/web_modal/web_contents_modal_dialog_host.h" |
| 15 #include "content/public/browser/notification_observer.h" | 16 #include "content/public/browser/notification_observer.h" |
| 16 #include "content/public/browser/notification_registrar.h" | 17 #include "content/public/browser/notification_registrar.h" |
| 17 #include "content/public/browser/web_contents_delegate.h" | 18 #include "content/public/browser/web_contents_delegate.h" |
| 18 #include "ui/views/controls/webview/unhandled_keyboard_event_handler.h" | 19 #include "ui/views/controls/webview/unhandled_keyboard_event_handler.h" |
| 19 #include "ui/views/widget/widget.h" | 20 #include "ui/views/widget/widget.h" |
| 20 #include "ui/views/widget/widget_delegate.h" | 21 #include "ui/views/widget/widget_delegate.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 32 } | 33 } |
| 33 | 34 |
| 34 namespace chromeos { | 35 namespace chromeos { |
| 35 | 36 |
| 36 // View used to render a WebUI supporting Widget. This widget is used for the | 37 // View used to render a WebUI supporting Widget. This widget is used for the |
| 37 // WebUI based start up and lock screens. It contains a WebView. | 38 // WebUI based start up and lock screens. It contains a WebView. |
| 38 class WebUILoginView : public views::View, | 39 class WebUILoginView : public views::View, |
| 39 public content::WebContentsDelegate, | 40 public content::WebContentsDelegate, |
| 40 public content::NotificationObserver, | 41 public content::NotificationObserver, |
| 41 public ChromeWebModalDialogManagerDelegate, | 42 public ChromeWebModalDialogManagerDelegate, |
| 42 public web_modal::WebContentsModalDialogHost { | 43 public web_modal::WebContentsModalDialogHost, |
| 44 public ash::StatusAreaFocusObserver { |
| 43 public: | 45 public: |
| 44 // Internal class name. | 46 // Internal class name. |
| 45 static const char kViewClassName[]; | 47 static const char kViewClassName[]; |
| 46 | 48 |
| 47 WebUILoginView(); | 49 WebUILoginView(); |
| 48 ~WebUILoginView() override; | 50 ~WebUILoginView() override; |
| 49 | 51 |
| 50 // Initializes the webui login view. | 52 // Initializes the webui login view. |
| 51 virtual void Init(); | 53 virtual void Init(); |
| 52 | 54 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 void RequestMediaAccessPermission( | 130 void RequestMediaAccessPermission( |
| 129 content::WebContents* web_contents, | 131 content::WebContents* web_contents, |
| 130 const content::MediaStreamRequest& request, | 132 const content::MediaStreamRequest& request, |
| 131 const content::MediaResponseCallback& callback) override; | 133 const content::MediaResponseCallback& callback) override; |
| 132 bool CheckMediaAccessPermission(content::WebContents* web_contents, | 134 bool CheckMediaAccessPermission(content::WebContents* web_contents, |
| 133 const GURL& security_origin, | 135 const GURL& security_origin, |
| 134 content::MediaStreamType type) override; | 136 content::MediaStreamType type) override; |
| 135 bool PreHandleGestureEvent(content::WebContents* source, | 137 bool PreHandleGestureEvent(content::WebContents* source, |
| 136 const blink::WebGestureEvent& event) override; | 138 const blink::WebGestureEvent& event) override; |
| 137 | 139 |
| 140 // Overridden from ash::StatusAreaFocusObserver. |
| 141 void OnWillReturnFocusToWebContents(bool reverse) override; |
| 142 |
| 138 // Performs series of actions when login prompt is considered | 143 // Performs series of actions when login prompt is considered |
| 139 // to be ready and visible. | 144 // to be ready and visible. |
| 140 // 1. Emits LoginPromptVisible signal if needed | 145 // 1. Emits LoginPromptVisible signal if needed |
| 141 // 2. Notifies OOBE/sign classes. | 146 // 2. Notifies OOBE/sign classes. |
| 142 void OnLoginPromptVisible(); | 147 void OnLoginPromptVisible(); |
| 143 | 148 |
| 144 content::NotificationRegistrar registrar_; | 149 content::NotificationRegistrar registrar_; |
| 145 | 150 |
| 146 // Converts keyboard events on the WebContents to accelerators. | 151 // Converts keyboard events on the WebContents to accelerators. |
| 147 views::UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_; | 152 views::UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 163 bool forward_keyboard_event_; | 168 bool forward_keyboard_event_; |
| 164 | 169 |
| 165 base::ObserverList<web_modal::ModalDialogHostObserver> observer_list_; | 170 base::ObserverList<web_modal::ModalDialogHostObserver> observer_list_; |
| 166 | 171 |
| 167 DISALLOW_COPY_AND_ASSIGN(WebUILoginView); | 172 DISALLOW_COPY_AND_ASSIGN(WebUILoginView); |
| 168 }; | 173 }; |
| 169 | 174 |
| 170 } // namespace chromeos | 175 } // namespace chromeos |
| 171 | 176 |
| 172 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_WEBUI_LOGIN_VIEW_H_ | 177 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_WEBUI_LOGIN_VIEW_H_ |
| OLD | NEW |