Chromium Code Reviews| OLD | NEW | 
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_WEBUI_LOGIN_VIEW_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_VIEW_H_ | 
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_VIEW_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_VIEW_H_ | 
| 7 | 7 | 
| 8 #include <map> | 8 #include <map> | 
| 9 #include <string> | 9 #include <string> | 
| 10 | 10 | 
| 11 #include "base/memory/scoped_ptr.h" | |
| 11 #include "chrome/browser/ui/views/unhandled_keyboard_event_handler.h" | 12 #include "chrome/browser/ui/views/unhandled_keyboard_event_handler.h" | 
| 12 #include "content/public/browser/notification_observer.h" | 13 #include "content/public/browser/notification_observer.h" | 
| 13 #include "content/public/browser/notification_registrar.h" | 14 #include "content/public/browser/notification_registrar.h" | 
| 14 #include "content/public/browser/web_contents_delegate.h" | 15 #include "content/public/browser/web_contents_delegate.h" | 
| 15 #include "ui/views/widget/widget.h" | 16 #include "ui/views/widget/widget.h" | 
| 16 #include "ui/views/widget/widget_delegate.h" | 17 #include "ui/views/widget/widget_delegate.h" | 
| 17 | 18 | 
| 18 class GURL; | 19 class GURL; | 
| 19 | 20 | 
| 20 namespace content { | 21 namespace content { | 
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 99 const content::NotificationSource& source, | 100 const content::NotificationSource& source, | 
| 100 const content::NotificationDetails& details) OVERRIDE; | 101 const content::NotificationDetails& details) OVERRIDE; | 
| 101 | 102 | 
| 102 // WebView for rendering a webpage as a webui login. | 103 // WebView for rendering a webpage as a webui login. | 
| 103 views::WebView* webui_login_; | 104 views::WebView* webui_login_; | 
| 104 | 105 | 
| 105 private: | 106 private: | 
| 106 // Map type for the accelerator-to-identifier map. | 107 // Map type for the accelerator-to-identifier map. | 
| 107 typedef std::map<ui::Accelerator, std::string> AccelMap; | 108 typedef std::map<ui::Accelerator, std::string> AccelMap; | 
| 108 | 109 | 
| 110 // A class to load gaia auth extension on construction and unload it on | |
| 111 // destruction. | |
| 112 class ScopedGaiaAuthExtension; | |
| 113 | |
| 109 // Overridden from content::WebContentsDelegate. | 114 // Overridden from content::WebContentsDelegate. | 
| 110 virtual bool HandleContextMenu( | 115 virtual bool HandleContextMenu( | 
| 111 const content::ContextMenuParams& params) OVERRIDE; | 116 const content::ContextMenuParams& params) OVERRIDE; | 
| 112 virtual void HandleKeyboardEvent( | 117 virtual void HandleKeyboardEvent( | 
| 113 content::WebContents* source, | 118 content::WebContents* source, | 
| 114 const content::NativeWebKeyboardEvent& event) OVERRIDE; | 119 const content::NativeWebKeyboardEvent& event) OVERRIDE; | 
| 115 virtual bool IsPopupOrPanel( | 120 virtual bool IsPopupOrPanel( | 
| 116 const content::WebContents* source) const OVERRIDE; | 121 const content::WebContents* source) const OVERRIDE; | 
| 117 virtual bool TakeFocus(content::WebContents* source, bool reverse) OVERRIDE; | 122 virtual bool TakeFocus(content::WebContents* source, bool reverse) OVERRIDE; | 
| 118 virtual void RequestMediaAccessPermission( | 123 virtual void RequestMediaAccessPermission( | 
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 150 // True is login-prompt-visible event has been already handled. | 155 // True is login-prompt-visible event has been already handled. | 
| 151 bool login_prompt_visible_handled_; | 156 bool login_prompt_visible_handled_; | 
| 152 | 157 | 
| 153 // 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 | 
| 154 // displayed? | 159 // displayed? | 
| 155 bool should_emit_login_prompt_visible_; | 160 bool should_emit_login_prompt_visible_; | 
| 156 | 161 | 
| 157 // True to forward keyboard event. | 162 // True to forward keyboard event. | 
| 158 bool forward_keyboard_event_; | 163 bool forward_keyboard_event_; | 
| 159 | 164 | 
| 165 scoped_ptr<ScopedGaiaAuthExtension> gaia_auth_; | |
| 
 
Nikita (slow)
2013/04/19 11:35:57
nit: gaia_auth_ext_
 
 | |
| 166 | |
| 160 DISALLOW_COPY_AND_ASSIGN(WebUILoginView); | 167 DISALLOW_COPY_AND_ASSIGN(WebUILoginView); | 
| 161 }; | 168 }; | 
| 162 | 169 | 
| 163 } // namespace chromeos | 170 } // namespace chromeos | 
| 164 | 171 | 
| 165 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_VIEW_H_ | 172 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_VIEW_H_ | 
| OLD | NEW |