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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 AddChildView(webui_login_); | 147 AddChildView(webui_login_); |
148 | 148 |
149 // We create the WebContents ourselves because the TabContents assumes | 149 // We create the WebContents ourselves because the TabContents assumes |
150 // ownership of it. This should be reworked once we don't need to use the | 150 // ownership of it. This should be reworked once we don't need to use the |
151 // TabContents here. | 151 // TabContents here. |
152 WebContents* web_contents = | 152 WebContents* web_contents = |
153 WebContents::Create(ProfileManager::GetDefaultProfile(), | 153 WebContents::Create(ProfileManager::GetDefaultProfile(), |
154 NULL, | 154 NULL, |
155 MSG_ROUTING_NONE, | 155 MSG_ROUTING_NONE, |
156 NULL); | 156 NULL); |
157 tab_contents_.reset(new TabContents(web_contents)); | 157 tab_contents_.reset(TabContents::Factory::CreateTabContents(web_contents)); |
158 webui_login_->SetWebContents(web_contents); | 158 webui_login_->SetWebContents(web_contents); |
159 | 159 |
160 web_contents->SetDelegate(this); | 160 web_contents->SetDelegate(this); |
161 renderer_preferences_util::UpdateFromSystemSettings( | 161 renderer_preferences_util::UpdateFromSystemSettings( |
162 web_contents->GetMutableRendererPrefs(), | 162 web_contents->GetMutableRendererPrefs(), |
163 ProfileManager::GetDefaultProfile()); | 163 ProfileManager::GetDefaultProfile()); |
164 | 164 |
165 registrar_.Add(this, | 165 registrar_.Add(this, |
166 content::NOTIFICATION_WEB_CONTENTS_RENDER_VIEW_HOST_CREATED, | 166 content::NOTIFICATION_WEB_CONTENTS_RENDER_VIEW_HOST_CREATED, |
167 content::Source<WebContents>(web_contents)); | 167 content::Source<WebContents>(web_contents)); |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 aura::Env::GetInstance()->set_render_white_bg(true); | 372 aura::Env::GetInstance()->set_render_white_bg(true); |
373 } | 373 } |
374 | 374 |
375 void WebUILoginView::ReturnFocus(bool reverse) { | 375 void WebUILoginView::ReturnFocus(bool reverse) { |
376 // Return the focus to the web contents. | 376 // Return the focus to the web contents. |
377 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); | 377 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); |
378 GetWidget()->Activate(); | 378 GetWidget()->Activate(); |
379 } | 379 } |
380 | 380 |
381 } // namespace chromeos | 381 } // namespace chromeos |
OLD | NEW |