| 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/ui/views/profiles/user_manager_view.h" | 5 #include "chrome/browser/ui/views/profiles/user_manager_view.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 gfx::NativeView parent = instance_->GetWidget()->GetNativeView(); | 228 gfx::NativeView parent = instance_->GetWidget()->GetNativeView(); |
| 229 views::DialogDelegate::CreateDialogWidget(delegate, nullptr, parent); | 229 views::DialogDelegate::CreateDialogWidget(delegate, nullptr, parent); |
| 230 delegate->GetWidget()->Show(); | 230 delegate->GetWidget()->Show(); |
| 231 } | 231 } |
| 232 | 232 |
| 233 // UserManagerView ------------------------------------------------------------- | 233 // UserManagerView ------------------------------------------------------------- |
| 234 | 234 |
| 235 UserManagerView::UserManagerView() | 235 UserManagerView::UserManagerView() |
| 236 : web_view_(NULL), | 236 : web_view_(NULL), |
| 237 user_manager_started_showing_(base::Time()) { | 237 user_manager_started_showing_(base::Time()) { |
| 238 keep_alive_.reset(new ScopedKeepAlive(keep_alive::Origin::USER_MANAGER_VIEW)); | 238 keep_alive_.reset(new ScopedKeepAlive(keep_alive::Origin::USER_MANAGER_VIEW, |
| 239 keep_alive::RestartOption::DISABLED)); |
| 239 } | 240 } |
| 240 | 241 |
| 241 UserManagerView::~UserManagerView() { | 242 UserManagerView::~UserManagerView() { |
| 242 } | 243 } |
| 243 | 244 |
| 244 // static | 245 // static |
| 245 void UserManagerView::OnSystemProfileCreated( | 246 void UserManagerView::OnSystemProfileCreated( |
| 246 scoped_ptr<UserManagerView> instance, | 247 scoped_ptr<UserManagerView> instance, |
| 247 base::AutoReset<bool>* pending, | 248 base::AutoReset<bool>* pending, |
| 248 Profile* system_profile, | 249 Profile* system_profile, |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 // Now that the window is closed, we can allow a new one to be opened. | 376 // Now that the window is closed, we can allow a new one to be opened. |
| 376 // (WindowClosing comes in asynchronously from the call to Close() and we | 377 // (WindowClosing comes in asynchronously from the call to Close() and we |
| 377 // may have already opened a new instance). | 378 // may have already opened a new instance). |
| 378 if (instance_ == this) | 379 if (instance_ == this) |
| 379 instance_ = NULL; | 380 instance_ = NULL; |
| 380 } | 381 } |
| 381 | 382 |
| 382 bool UserManagerView::UseNewStyleForThisDialog() const { | 383 bool UserManagerView::UseNewStyleForThisDialog() const { |
| 383 return false; | 384 return false; |
| 384 } | 385 } |
| OLD | NEW |