| 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/callback.h" |    7 #include "base/callback.h" | 
|    8 #include "base/memory/ptr_util.h" |    8 #include "base/memory/ptr_util.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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  347   const base::FilePath& last_used_profile_path = |  347   const base::FilePath& last_used_profile_path = | 
|  348       profile_manager->GetLastUsedProfileDir(profile_manager->user_data_dir()); |  348       profile_manager->GetLastUsedProfileDir(profile_manager->user_data_dir()); | 
|  349   Profile* profile = profile_manager->GetProfileByPath(last_used_profile_path); |  349   Profile* profile = profile_manager->GetProfileByPath(last_used_profile_path); | 
|  350   if (profile) { |  350   if (profile) { | 
|  351     Browser* browser = chrome::FindLastActiveWithProfile(profile); |  351     Browser* browser = chrome::FindLastActiveWithProfile(profile); | 
|  352     if (browser) { |  352     if (browser) { | 
|  353       gfx::NativeView native_view = |  353       gfx::NativeView native_view = | 
|  354           views::Widget::GetWidgetForNativeWindow( |  354           views::Widget::GetWidgetForNativeWindow( | 
|  355               browser->window()->GetNativeWindow())->GetNativeView(); |  355               browser->window()->GetNativeWindow())->GetNativeView(); | 
|  356       bounds = display::Screen::GetScreen() |  356       bounds = display::Screen::GetScreen() | 
|  357                    ->GetDisplayNearestWindow(native_view) |  357                    ->GetDisplayNearestView(native_view) | 
|  358                    .work_area(); |  358                    .work_area(); | 
|  359       bounds.ClampToCenteredSize(gfx::Size(UserManager::kWindowWidth, |  359       bounds.ClampToCenteredSize(gfx::Size(UserManager::kWindowWidth, | 
|  360                                            UserManager::kWindowHeight)); |  360                                            UserManager::kWindowHeight)); | 
|  361     } |  361     } | 
|  362   } |  362   } | 
|  363  |  363  | 
|  364   views::Widget::InitParams params = |  364   views::Widget::InitParams params = | 
|  365       GetDialogWidgetInitParams(this, nullptr, nullptr, bounds); |  365       GetDialogWidgetInitParams(this, nullptr, nullptr, bounds); | 
|  366   (new views::Widget)->Init(params); |  366   (new views::Widget)->Init(params); | 
|  367  |  367  | 
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  448     delegate_->DisplayErrorMessage(); |  448     delegate_->DisplayErrorMessage(); | 
|  449 } |  449 } | 
|  450  |  450  | 
|  451 void UserManagerView::SetSigninProfilePath(const base::FilePath& profile_path) { |  451 void UserManagerView::SetSigninProfilePath(const base::FilePath& profile_path) { | 
|  452   signin_profile_path_ = profile_path; |  452   signin_profile_path_ = profile_path; | 
|  453 } |  453 } | 
|  454  |  454  | 
|  455 base::FilePath UserManagerView::GetSigninProfilePath() { |  455 base::FilePath UserManagerView::GetSigninProfilePath() { | 
|  456   return signin_profile_path_; |  456   return signin_profile_path_; | 
|  457 } |  457 } | 
| OLD | NEW |