Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: chrome/browser/ui/views/profiles/user_manager_view.cc

Issue 1725883002: Add KeepAliveStateObserver, add the Restart option (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@KeepAlive
Patch Set: Address comments Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/views/panels/panel_view.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 #if !defined(USE_ASH) 238 #if !defined(USE_ASH)
239 keep_alive_.reset(new ScopedKeepAlive(KeepAliveOrigin::USER_MANAGER_VIEW)); 239 keep_alive_.reset(new ScopedKeepAlive(KeepAliveOrigin::USER_MANAGER_VIEW,
240 KeepAliveRestartOption::DISABLED));
240 #endif // !defined(USE_ASH) 241 #endif // !defined(USE_ASH)
241 } 242 }
242 243
243 UserManagerView::~UserManagerView() { 244 UserManagerView::~UserManagerView() {
244 } 245 }
245 246
246 // static 247 // static
247 void UserManagerView::OnSystemProfileCreated( 248 void UserManagerView::OnSystemProfileCreated(
248 scoped_ptr<UserManagerView> instance, 249 scoped_ptr<UserManagerView> instance,
249 base::AutoReset<bool>* pending, 250 base::AutoReset<bool>* pending,
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 // Now that the window is closed, we can allow a new one to be opened. 378 // Now that the window is closed, we can allow a new one to be opened.
378 // (WindowClosing comes in asynchronously from the call to Close() and we 379 // (WindowClosing comes in asynchronously from the call to Close() and we
379 // may have already opened a new instance). 380 // may have already opened a new instance).
380 if (instance_ == this) 381 if (instance_ == this)
381 instance_ = NULL; 382 instance_ = NULL;
382 } 383 }
383 384
384 bool UserManagerView::UseNewStyleForThisDialog() const { 385 bool UserManagerView::UseNewStyleForThisDialog() const {
385 return false; 386 return false;
386 } 387 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/panels/panel_view.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698