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 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" | 5 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/system/tray/system_tray.h" | 8 #include "ash/system/tray/system_tray.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 WebContentsObserver::Observe(web_contents); | 193 WebContentsObserver::Observe(web_contents); |
194 renderer_preferences_util::UpdateFromSystemSettings( | 194 renderer_preferences_util::UpdateFromSystemSettings( |
195 web_contents->GetMutableRendererPrefs(), | 195 web_contents->GetMutableRendererPrefs(), |
196 signin_profile); | 196 signin_profile); |
197 } | 197 } |
198 | 198 |
199 const char* WebUILoginView::GetClassName() const { | 199 const char* WebUILoginView::GetClassName() const { |
200 return kViewClassName; | 200 return kViewClassName; |
201 } | 201 } |
202 | 202 |
| 203 void WebUILoginView::RequestFocus() { |
| 204 webui_login_->RequestFocus(); |
| 205 } |
| 206 |
203 web_modal::WebContentsModalDialogHost* | 207 web_modal::WebContentsModalDialogHost* |
204 WebUILoginView::GetWebContentsModalDialogHost() { | 208 WebUILoginView::GetWebContentsModalDialogHost() { |
205 return this; | 209 return this; |
206 } | 210 } |
207 | 211 |
208 gfx::NativeView WebUILoginView::GetHostView() const { | 212 gfx::NativeView WebUILoginView::GetHostView() const { |
209 return GetWidget()->GetNativeView(); | 213 return GetWidget()->GetNativeView(); |
210 } | 214 } |
211 | 215 |
212 gfx::Point WebUILoginView::GetDialogPosition(const gfx::Size& size) { | 216 gfx::Point WebUILoginView::GetDialogPosition(const gfx::Size& size) { |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 webui_visible_ = true; | 455 webui_visible_ = true; |
452 } | 456 } |
453 | 457 |
454 void WebUILoginView::ReturnFocus(bool reverse) { | 458 void WebUILoginView::ReturnFocus(bool reverse) { |
455 // Return the focus to the web contents. | 459 // Return the focus to the web contents. |
456 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); | 460 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); |
457 GetWidget()->Activate(); | 461 GetWidget()->Activate(); |
458 } | 462 } |
459 | 463 |
460 } // namespace chromeos | 464 } // namespace chromeos |
OLD | NEW |