| 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 16 matching lines...) Expand all  Loading... | 
|   27  |   27  | 
|   28 namespace views { |   28 namespace views { | 
|   29 class View; |   29 class View; | 
|   30 class WebView; |   30 class WebView; | 
|   31 class Widget; |   31 class Widget; | 
|   32 } |   32 } | 
|   33  |   33  | 
|   34 namespace chromeos { |   34 namespace chromeos { | 
|   35  |   35  | 
|   36 class OobeUI; |   36 class OobeUI; | 
|   37 class WebViewHandle; |  | 
|   38  |   37  | 
|   39 // 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 | 
|   40 // WebUI based start up and lock screens. It contains a WebView. |   39 // WebUI based start up and lock screens. It contains a WebView. | 
|   41 class WebUILoginView : public views::View, |   40 class WebUILoginView : public views::View, | 
|   42                        public content::WebContentsDelegate, |   41                        public content::WebContentsDelegate, | 
|   43                        public content::NotificationObserver, |   42                        public content::NotificationObserver, | 
|   44                        public ChromeWebModalDialogManagerDelegate, |   43                        public ChromeWebModalDialogManagerDelegate, | 
|   45                        public web_modal::WebContentsModalDialogHost { |   44                        public web_modal::WebContentsModalDialogHost { | 
|   46  public: |   45  public: | 
|   47   struct WebViewSettings { |   46   struct WebViewSettings { | 
|   48     // URL of the WebView to preload and reuse across WebUILoginView instances. |   47     // If true, this will check for and consume a preloaded views::WebView | 
|   49     GURL preloaded_url; |   48     // instance. | 
 |   49     bool check_for_preload; | 
|   50  |   50  | 
|   51     // Title of the web contents. This will be shown in the task manager. If |   51     // Title of the web contents. This will be shown in the task manager. If | 
|   52     // empty, the default webview title will be used. |   52     // empty, the default webview title will be used. | 
|   53     base::string16 web_view_title; |   53     base::string16 web_view_title; | 
|   54   }; |   54   }; | 
|   55  |   55  | 
|   56   // Internal class name. |   56   // Internal class name. | 
|   57   static const char kViewClassName[]; |   57   static const char kViewClassName[]; | 
|   58  |   58  | 
|   59   explicit WebUILoginView(const WebViewSettings& settings); |   59   explicit WebUILoginView(const WebViewSettings& settings); | 
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  157   // 1. Emits LoginPromptVisible signal if needed |  157   // 1. Emits LoginPromptVisible signal if needed | 
|  158   // 2. Notifies OOBE/sign classes. |  158   // 2. Notifies OOBE/sign classes. | 
|  159   void OnLoginPromptVisible(); |  159   void OnLoginPromptVisible(); | 
|  160  |  160  | 
|  161   content::NotificationRegistrar registrar_; |  161   content::NotificationRegistrar registrar_; | 
|  162  |  162  | 
|  163   // WebView configuration options. |  163   // WebView configuration options. | 
|  164   const WebViewSettings settings_; |  164   const WebViewSettings settings_; | 
|  165  |  165  | 
|  166   // WebView for rendering a webpage as a webui login. |  166   // WebView for rendering a webpage as a webui login. | 
|  167   scoped_refptr<WebViewHandle> webui_login_; |  167   std::unique_ptr<views::WebView> webui_login_; | 
|  168  |  168  | 
|  169   // True if the current webview instance (ie, GetWebUI()) has been reused. |  169   // True if the current webview instance (ie, GetWebUI()) has been reused. | 
|  170   bool is_reusing_webview_ = false; |  170   bool is_reusing_webview_ = false; | 
|  171  |  171  | 
|  172   // Converts keyboard events on the WebContents to accelerators. |  172   // Converts keyboard events on the WebContents to accelerators. | 
|  173   views::UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_; |  173   views::UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_; | 
|  174  |  174  | 
|  175   // Maps installed accelerators to OOBE webui accelerator identifiers. |  175   // Maps installed accelerators to OOBE webui accelerator identifiers. | 
|  176   AccelMap accel_map_; |  176   AccelMap accel_map_; | 
|  177  |  177  | 
| (...skipping 22 matching lines...) Expand all  Loading... | 
|  200   std::unique_ptr<CycleFocusTraversable> cycle_focus_traversable_; |  200   std::unique_ptr<CycleFocusTraversable> cycle_focus_traversable_; | 
|  201  |  201  | 
|  202   base::ObserverList<web_modal::ModalDialogHostObserver> observer_list_; |  202   base::ObserverList<web_modal::ModalDialogHostObserver> observer_list_; | 
|  203  |  203  | 
|  204   DISALLOW_COPY_AND_ASSIGN(WebUILoginView); |  204   DISALLOW_COPY_AND_ASSIGN(WebUILoginView); | 
|  205 }; |  205 }; | 
|  206  |  206  | 
|  207 }  // namespace chromeos |  207 }  // namespace chromeos | 
|  208  |  208  | 
|  209 #endif  // CHROME_BROWSER_CHROMEOS_LOGIN_UI_WEBUI_LOGIN_VIEW_H_ |  209 #endif  // CHROME_BROWSER_CHROMEOS_LOGIN_UI_WEBUI_LOGIN_VIEW_H_ | 
| OLD | NEW |