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" |
11 #include "chrome/browser/browser_process.h" | 11 #include "chrome/browser/browser_process.h" |
12 #include "chrome/browser/lifetime/application_lifetime.h" | 12 #include "chrome/browser/lifetime/scoped_keep_alive.h" |
13 #include "chrome/browser/profiles/profile_avatar_icon_util.h" | 13 #include "chrome/browser/profiles/profile_avatar_icon_util.h" |
14 #include "chrome/browser/profiles/profile_manager.h" | 14 #include "chrome/browser/profiles/profile_manager.h" |
15 #include "chrome/browser/profiles/profile_metrics.h" | 15 #include "chrome/browser/profiles/profile_metrics.h" |
16 #include "chrome/browser/profiles/profile_window.h" | 16 #include "chrome/browser/profiles/profile_window.h" |
17 #include "chrome/browser/profiles/profiles_state.h" | 17 #include "chrome/browser/profiles/profiles_state.h" |
18 #include "chrome/browser/signin/signin_promo.h" | 18 #include "chrome/browser/signin/signin_promo.h" |
19 #include "chrome/browser/ui/browser.h" | 19 #include "chrome/browser/ui/browser.h" |
20 #include "chrome/browser/ui/browser_dialogs.h" | 20 #include "chrome/browser/ui/browser_dialogs.h" |
21 #include "chrome/browser/ui/browser_finder.h" | 21 #include "chrome/browser/ui/browser_finder.h" |
22 #include "chrome/browser/ui/browser_window.h" | 22 #include "chrome/browser/ui/browser_window.h" |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
227 new ReauthDelegate(new views::WebView(browser_context), email); | 227 new ReauthDelegate(new views::WebView(browser_context), email); |
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 keep_alive_(new AutoKeepAlive(NULL)), | 237 keep_alive_(AutoKeepAlive(nullptr)), |
dgn
2016/02/22 18:01:20
not sure about this one. AFAIK it is not used on C
| |
238 user_manager_started_showing_(base::Time()) { | 238 user_manager_started_showing_(base::Time()) {} |
239 } | |
240 | 239 |
241 UserManagerView::~UserManagerView() { | 240 UserManagerView::~UserManagerView() { |
242 } | 241 } |
243 | 242 |
244 // static | 243 // static |
245 void UserManagerView::OnSystemProfileCreated( | 244 void UserManagerView::OnSystemProfileCreated( |
246 scoped_ptr<UserManagerView> instance, | 245 scoped_ptr<UserManagerView> instance, |
247 base::AutoReset<bool>* pending, | 246 base::AutoReset<bool>* pending, |
248 Profile* system_profile, | 247 Profile* system_profile, |
249 const std::string& url) { | 248 const std::string& url) { |
(...skipping 125 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. | 374 // 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 | 375 // (WindowClosing comes in asynchronously from the call to Close() and we |
377 // may have already opened a new instance). | 376 // may have already opened a new instance). |
378 if (instance_ == this) | 377 if (instance_ == this) |
379 instance_ = NULL; | 378 instance_ = NULL; |
380 } | 379 } |
381 | 380 |
382 bool UserManagerView::UseNewStyleForThisDialog() const { | 381 bool UserManagerView::UseNewStyleForThisDialog() const { |
383 return false; | 382 return false; |
384 } | 383 } |
OLD | NEW |