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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc

Issue 11091023: ash : Decouple power button controller and session state controller. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 2 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/webui/chromeos/login/signin_screen_handler.h" 5 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/cancelable_callback.h" 10 #include "base/cancelable_callback.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "content/public/browser/render_view_host.h" 44 #include "content/public/browser/render_view_host.h"
45 #include "content/public/browser/web_contents.h" 45 #include "content/public/browser/web_contents.h"
46 #include "google_apis/gaia/gaia_auth_util.h" 46 #include "google_apis/gaia/gaia_auth_util.h"
47 #include "google_apis/gaia/gaia_switches.h" 47 #include "google_apis/gaia/gaia_switches.h"
48 #include "google_apis/gaia/gaia_urls.h" 48 #include "google_apis/gaia/gaia_urls.h"
49 #include "grit/generated_resources.h" 49 #include "grit/generated_resources.h"
50 #include "ui/base/l10n/l10n_util.h" 50 #include "ui/base/l10n/l10n_util.h"
51 51
52 #if defined(USE_AURA) 52 #if defined(USE_AURA)
53 #include "ash/shell.h" 53 #include "ash/shell.h"
54 #include "ash/wm/power_button_controller.h" 54 #include "ash/wm/session_state_controller.h"
55 #endif 55 #endif
56 56
57 using content::BrowserThread; 57 using content::BrowserThread;
58 using content::RenderViewHost; 58 using content::RenderViewHost;
59 59
60 namespace { 60 namespace {
61 61
62 const char kDefaultDomain[] = "@gmail.com"; 62 const char kDefaultDomain[] = "@gmail.com";
63 63
64 // Account picker screen id. 64 // Account picker screen id.
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 851
852 // Load auth extension. Parameters are: force reload, do not load extension in 852 // Load auth extension. Parameters are: force reload, do not load extension in
853 // background, use offline version. 853 // background, use offline version.
854 LoadAuthExtension(true, false, true); 854 LoadAuthExtension(true, false, true);
855 ShowScreen(kGaiaSigninScreen, NULL); 855 ShowScreen(kGaiaSigninScreen, NULL);
856 } 856 }
857 857
858 void SigninScreenHandler::HandleShutdownSystem(const base::ListValue* args) { 858 void SigninScreenHandler::HandleShutdownSystem(const base::ListValue* args) {
859 #if defined(USE_AURA) 859 #if defined(USE_AURA)
860 // Display the shutdown animation before actually requesting shutdown. 860 // Display the shutdown animation before actually requesting shutdown.
861 ash::Shell::GetInstance()->power_button_controller()->RequestShutdown(); 861 ash::Shell::GetInstance()->session_state_controller()->RequestShutdown();
862 #else 862 #else
863 DBusThreadManager::Get()->GetPowerManagerClient()->RequestShutdown(); 863 DBusThreadManager::Get()->GetPowerManagerClient()->RequestShutdown();
864 #endif 864 #endif
865 } 865 }
866 866
867 void SigninScreenHandler::HandleUserDeselected(const base::ListValue* args) { 867 void SigninScreenHandler::HandleUserDeselected(const base::ListValue* args) {
868 if (delegate_) 868 if (delegate_)
869 delegate_->OnUserDeselected(); 869 delegate_->OnUserDeselected();
870 } 870 }
871 871
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
1207 } 1207 }
1208 for (UserList::const_iterator it = users.begin(); it != users.end(); ++it) { 1208 for (UserList::const_iterator it = users.begin(); it != users.end(); ++it) {
1209 if (!cros_settings->FindEmailInList(kAccountsPrefUsers, (*it)->email())) { 1209 if (!cros_settings->FindEmailInList(kAccountsPrefUsers, (*it)->email())) {
1210 return false; 1210 return false;
1211 } 1211 }
1212 } 1212 }
1213 return true; 1213 return true;
1214 } 1214 }
1215 1215
1216 } // namespace chromeos 1216 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698