| OLD | NEW |
| (Empty) |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "ui/app_list/views/signin_view.h" | |
| 6 | |
| 7 #include "content/public/browser/web_contents.h" | |
| 8 #include "ui/app_list/signin_delegate.h" | |
| 9 #include "ui/views/controls/webview/webview.h" | |
| 10 #include "ui/views/layout/fill_layout.h" | |
| 11 | |
| 12 namespace app_list { | |
| 13 | |
| 14 SigninView::SigninView(SigninDelegate* delegate) | |
| 15 : web_view_(new views::WebView(NULL)), delegate_(delegate) { | |
| 16 SetLayoutManager(new views::FillLayout()); | |
| 17 AddChildView(web_view_); | |
| 18 } | |
| 19 | |
| 20 SigninView::~SigninView() { | |
| 21 web_view_->SetWebContents(NULL); | |
| 22 } | |
| 23 | |
| 24 void SigninView::BeginSignin() { | |
| 25 if (!delegate_) | |
| 26 return; | |
| 27 | |
| 28 web_contents_.reset(delegate_->PrepareForSignin()); | |
| 29 web_view_->SetWebContents(web_contents_.get()); | |
| 30 } | |
| 31 | |
| 32 } // namespace app_list | |
| OLD | NEW |