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 #include "chrome/browser/chromeos/login/html_page_screen.h" | 5 #include "chrome/browser/chromeos/login/html_page_screen.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/chromeos/login/screen_observer.h" | 9 #include "chrome/browser/chromeos/login/screen_observer.h" |
10 #include "chrome/browser/chromeos/login/wizard_controller.h" | 10 #include "chrome/browser/chromeos/login/wizard_controller.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 Profile* profile = ProfileManager::GetDefaultProfile(); | 58 Profile* profile = ProfileManager::GetDefaultProfile(); |
59 view()->InitWebView(SiteInstance::CreateForURL(profile, url)); | 59 view()->InitWebView(SiteInstance::CreateForURL(profile, url)); |
60 view()->SetWebContentsDelegate(this); | 60 view()->SetWebContentsDelegate(this); |
61 view()->LoadURL(url); | 61 view()->LoadURL(url); |
62 } | 62 } |
63 | 63 |
64 HTMLPageView* HTMLPageScreen::AllocateView() { | 64 HTMLPageView* HTMLPageScreen::AllocateView() { |
65 return new HTMLPageView(ProfileManager::GetDefaultProfile()); | 65 return new HTMLPageView(ProfileManager::GetDefaultProfile()); |
66 } | 66 } |
67 | 67 |
68 void HTMLPageScreen::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { | 68 void HTMLPageScreen::HandleKeyboardEvent(content::WebContents* source, |
| 69 const NativeWebKeyboardEvent& event) { |
69 unhandled_keyboard_handler_.HandleKeyboardEvent(event, | 70 unhandled_keyboard_handler_.HandleKeyboardEvent(event, |
70 view()->GetFocusManager()); | 71 view()->GetFocusManager()); |
71 } | 72 } |
72 | 73 |
73 /////////////////////////////////////////////////////////////////////////////// | 74 /////////////////////////////////////////////////////////////////////////////// |
74 // HTMLPageScreen, WebPageScreen implementation: | 75 // HTMLPageScreen, WebPageScreen implementation: |
75 void HTMLPageScreen::OnNetworkTimeout() { | 76 void HTMLPageScreen::OnNetworkTimeout() { |
76 VLOG(1) << "HTMLPageScreen::OnNetworkTimeout"; | 77 VLOG(1) << "HTMLPageScreen::OnNetworkTimeout"; |
77 // Just show what we have now. We shouldn't exit from the screen on timeout. | 78 // Just show what we have now. We shouldn't exit from the screen on timeout. |
78 StopTimeoutTimer(); | 79 StopTimeoutTimer(); |
79 view()->ShowPageContent(); | 80 view()->ShowPageContent(); |
80 } | 81 } |
81 | 82 |
82 /////////////////////////////////////////////////////////////////////////////// | 83 /////////////////////////////////////////////////////////////////////////////// |
83 // HTMLPageScreen, private: | 84 // HTMLPageScreen, private: |
84 void HTMLPageScreen::CloseScreen(ScreenObserver::ExitCodes code) { | 85 void HTMLPageScreen::CloseScreen(ScreenObserver::ExitCodes code) { |
85 StopTimeoutTimer(); | 86 StopTimeoutTimer(); |
86 delegate()->GetObserver()->OnExit(code); | 87 delegate()->GetObserver()->OnExit(code); |
87 } | 88 } |
88 | 89 |
89 } // namespace chromeos | 90 } // namespace chromeos |
OLD | NEW |