OLD | NEW |
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/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 #include "content/public/browser/render_view_host.h" | 37 #include "content/public/browser/render_view_host.h" |
38 #include "content/public/browser/web_contents.h" | 38 #include "content/public/browser/web_contents.h" |
39 #include "google_apis/gaia/gaia_auth_util.h" | 39 #include "google_apis/gaia/gaia_auth_util.h" |
40 #include "google_apis/gaia/gaia_switches.h" | 40 #include "google_apis/gaia/gaia_switches.h" |
41 #include "google_apis/gaia/gaia_urls.h" | 41 #include "google_apis/gaia/gaia_urls.h" |
42 #include "grit/generated_resources.h" | 42 #include "grit/generated_resources.h" |
43 #include "ui/base/l10n/l10n_util.h" | 43 #include "ui/base/l10n/l10n_util.h" |
44 | 44 |
45 #if defined(USE_AURA) | 45 #if defined(USE_AURA) |
46 #include "ash/shell.h" | 46 #include "ash/shell.h" |
47 #include "ash/wm/session_state_controller.h" | 47 #include "ash/wm/power_button_controller.h" |
48 #endif | 48 #endif |
49 | 49 |
50 using content::BrowserThread; | 50 using content::BrowserThread; |
51 using content::RenderViewHost; | 51 using content::RenderViewHost; |
52 | 52 |
53 namespace { | 53 namespace { |
54 | 54 |
55 const char kDefaultDomain[] = "@gmail.com"; | 55 const char kDefaultDomain[] = "@gmail.com"; |
56 | 56 |
57 // Account picker screen id. | 57 // Account picker screen id. |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 | 619 |
620 // Load auth extension. Parameters are: force reload, do not load extension in | 620 // Load auth extension. Parameters are: force reload, do not load extension in |
621 // background, use offline version. | 621 // background, use offline version. |
622 LoadAuthExtension(true, false, true); | 622 LoadAuthExtension(true, false, true); |
623 ShowScreen(kGaiaSigninScreen, NULL); | 623 ShowScreen(kGaiaSigninScreen, NULL); |
624 } | 624 } |
625 | 625 |
626 void SigninScreenHandler::HandleShutdownSystem(const base::ListValue* args) { | 626 void SigninScreenHandler::HandleShutdownSystem(const base::ListValue* args) { |
627 #if defined(USE_AURA) | 627 #if defined(USE_AURA) |
628 // Display the shutdown animation before actually requesting shutdown. | 628 // Display the shutdown animation before actually requesting shutdown. |
629 ash::Shell::GetInstance()->session_state_controller()->RequestShutdown(); | 629 ash::Shell::GetInstance()->power_button_controller()->RequestShutdown(); |
630 #else | 630 #else |
631 DBusThreadManager::Get()->GetPowerManagerClient()->RequestShutdown(); | 631 DBusThreadManager::Get()->GetPowerManagerClient()->RequestShutdown(); |
632 #endif | 632 #endif |
633 } | 633 } |
634 | 634 |
635 void SigninScreenHandler::HandleUserDeselected(const base::ListValue* args) { | 635 void SigninScreenHandler::HandleUserDeselected(const base::ListValue* args) { |
636 if (delegate_) | 636 if (delegate_) |
637 delegate_->OnUserDeselected(); | 637 delegate_->OnUserDeselected(); |
638 } | 638 } |
639 | 639 |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
993 ConnectionType last_network_type) { | 993 ConnectionType last_network_type) { |
994 base::FundamentalValue state_value(state); | 994 base::FundamentalValue state_value(state); |
995 base::StringValue network_value(network_name); | 995 base::StringValue network_value(network_name); |
996 base::StringValue reason_value(reason); | 996 base::StringValue reason_value(reason); |
997 base::FundamentalValue last_network_value(last_network_type); | 997 base::FundamentalValue last_network_value(last_network_type); |
998 web_ui()->CallJavascriptFunction(callback, | 998 web_ui()->CallJavascriptFunction(callback, |
999 state_value, network_value, reason_value, last_network_value); | 999 state_value, network_value, reason_value, last_network_value); |
1000 } | 1000 } |
1001 | 1001 |
1002 } // namespace chromeos | 1002 } // namespace chromeos |
OLD | NEW |