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/chromeos/login/helper.h" | 5 #include "chrome/browser/chromeos/login/helper.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/grit/generated_resources.h" | 9 #include "chrome/grit/generated_resources.h" |
10 #include "chromeos/chromeos_switches.h" | 10 #include "chromeos/chromeos_switches.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 | 41 |
42 namespace login { | 42 namespace login { |
43 | 43 |
44 bool LoginScrollIntoViewEnabled() { | 44 bool LoginScrollIntoViewEnabled() { |
45 #if defined(USE_ATHENA) | 45 #if defined(USE_ATHENA) |
46 // TODO(nkostylev): temporary always enable overscroll mode for Athena, | 46 // TODO(nkostylev): temporary always enable overscroll mode for Athena, |
47 // later we will need special API in Blink to specify which element need to | 47 // later we will need special API in Blink to specify which element need to |
48 // be centered when virtual keyboard shown, crbug.com/411879 | 48 // be centered when virtual keyboard shown, crbug.com/411879 |
49 return false; | 49 return false; |
50 #else | 50 #else |
51 return !CommandLine::ForCurrentProcess()->HasSwitch( | 51 return !base::CommandLine::ForCurrentProcess()->HasSwitch( |
52 chromeos::switches::kDisableLoginScrollIntoView); | 52 chromeos::switches::kDisableLoginScrollIntoView); |
53 #endif | 53 #endif |
54 } | 54 } |
55 | 55 |
56 NetworkStateHelper::NetworkStateHelper() {} | 56 NetworkStateHelper::NetworkStateHelper() {} |
57 NetworkStateHelper::~NetworkStateHelper() {} | 57 NetworkStateHelper::~NetworkStateHelper() {} |
58 | 58 |
59 base::string16 NetworkStateHelper::GetCurrentNetworkName() const { | 59 base::string16 NetworkStateHelper::GetCurrentNetworkName() const { |
60 NetworkStateHandler* nsh = NetworkHandler::Get()->network_state_handler(); | 60 NetworkStateHandler* nsh = NetworkHandler::Get()->network_state_handler(); |
61 const NetworkState* network = | 61 const NetworkState* network = |
(...skipping 23 matching lines...) Expand all Loading... |
85 bool NetworkStateHelper::IsConnecting() const { | 85 bool NetworkStateHelper::IsConnecting() const { |
86 chromeos::NetworkStateHandler* nsh = | 86 chromeos::NetworkStateHandler* nsh = |
87 chromeos::NetworkHandler::Get()->network_state_handler(); | 87 chromeos::NetworkHandler::Get()->network_state_handler(); |
88 return nsh->ConnectingNetworkByType( | 88 return nsh->ConnectingNetworkByType( |
89 chromeos::NetworkTypePattern::Default()) != NULL; | 89 chromeos::NetworkTypePattern::Default()) != NULL; |
90 } | 90 } |
91 | 91 |
92 } // namespace login | 92 } // namespace login |
93 | 93 |
94 } // namespace chromeos | 94 } // namespace chromeos |
OLD | NEW |