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/webui_login_view.h" | 5 #include "chrome/browser/chromeos/login/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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 webui_login_ = new views::WebView(ProfileManager::GetDefaultProfile()); | 143 webui_login_ = new views::WebView(ProfileManager::GetDefaultProfile()); |
144 AddChildView(webui_login_); | 144 AddChildView(webui_login_); |
145 | 145 |
146 // We create the WebContents ourselves because the TabContents assumes | 146 // We create the WebContents ourselves because the TabContents assumes |
147 // ownership of it. This should be reworked once we don't need to use the | 147 // ownership of it. This should be reworked once we don't need to use the |
148 // TabContents here. | 148 // TabContents here. |
149 WebContents* web_contents = | 149 WebContents* web_contents = |
150 WebContents::Create(ProfileManager::GetDefaultProfile(), | 150 WebContents::Create(ProfileManager::GetDefaultProfile(), |
151 NULL, | 151 NULL, |
152 MSG_ROUTING_NONE, | 152 MSG_ROUTING_NONE, |
153 NULL, | |
154 NULL); | 153 NULL); |
155 tab_contents_.reset(new TabContents(web_contents)); | 154 tab_contents_.reset(new TabContents(web_contents)); |
156 webui_login_->SetWebContents(web_contents); | 155 webui_login_->SetWebContents(web_contents); |
157 | 156 |
158 web_contents->SetDelegate(this); | 157 web_contents->SetDelegate(this); |
159 renderer_preferences_util::UpdateFromSystemSettings( | 158 renderer_preferences_util::UpdateFromSystemSettings( |
160 web_contents->GetMutableRendererPrefs(), | 159 web_contents->GetMutableRendererPrefs(), |
161 ProfileManager::GetDefaultProfile()); | 160 ProfileManager::GetDefaultProfile()); |
162 | 161 |
163 registrar_.Add(this, | 162 registrar_.Add(this, |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 aura::Env::GetInstance()->set_render_white_bg(true); | 357 aura::Env::GetInstance()->set_render_white_bg(true); |
359 } | 358 } |
360 | 359 |
361 void WebUILoginView::ReturnFocus(bool reverse) { | 360 void WebUILoginView::ReturnFocus(bool reverse) { |
362 // Return the focus to the web contents. | 361 // Return the focus to the web contents. |
363 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); | 362 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); |
364 GetWidget()->Activate(); | 363 GetWidget()->Activate(); |
365 } | 364 } |
366 | 365 |
367 } // namespace chromeos | 366 } // namespace chromeos |
OLD | NEW |