Added a message that suggest to configure a proxy for a network.

BUG=chromium:122422
TEST=Manual testing on an Alex device.


Review URL: http://codereview.chromium.org/10166004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133917 0039d316-1c4b-4281-b951-d872f2087c98
parent aa1442bc
...@@ -12602,6 +12602,9 @@ Some features may be unavailable. Please check that the profile exists and you ...@@ -12602,6 +12602,9 @@ Some features may be unavailable. Please check that the profile exists and you
<message name="IDS_NETWORK_SELECTION_SELECT" desc="Label for network selection dropdown"> <message name="IDS_NETWORK_SELECTION_SELECT" desc="Label for network selection dropdown">
Select a network: Select a network:
</message> </message>
<message name="IDS_ANOTHER_NETWORK_SELECTION_SELECT" desc="Label for network selection dropdown on the network error screen.">
Or select another network:
</message>
<message name="IDS_LANGUAGE_SELECTION_SELECT" desc="Label for language selection dropdown"> <message name="IDS_LANGUAGE_SELECTION_SELECT" desc="Label for language selection dropdown">
Select your language: Select your language:
</message> </message>
...@@ -15348,11 +15351,17 @@ Battery full ...@@ -15348,11 +15351,17 @@ Battery full
To use the network <ph name="NETWORK_ID">$1<ex>Adelaide Airport Wireless</ex></ph>, first complete your connection to the Internet below. To use the network <ph name="NETWORK_ID">$1<ex>Adelaide Airport Wireless</ex></ph>, first complete your connection to the Internet below.
</message> </message>
<message name="IDS_LOGIN_MAYBE_CAPTIVE_PORTAL_TITLE" desc="An offline message title shown when we suggest that user may be behind the captive portal."> <message name="IDS_LOGIN_MAYBE_CAPTIVE_PORTAL_TITLE" desc="An offline message title shown when we suggest that user may be behind the captive portal.">
Tips for accessing this network Network not available
</message> </message>
<message name="IDS_LOGIN_MAYBE_CAPTIVE_PORTAL" desc="An offline message shown when we suggest that user may be behind the captive portal. Translation note: enter as Guest - could also be said enter as Guest user. Word user may be added to the translation if needed."> <message name="IDS_LOGIN_MAYBE_CAPTIVE_PORTAL" desc="An offline message shown when we suggest that user may be behind the captive portal. Translation note: enter as Guest - could also be said enter as Guest user. Word user may be added to the translation if needed.">
To use <ph name="NETWORK_ID">$1<ex>&gt;b&lt;Public Wifi&gt;/b&lt;</ex></ph> you may first need to <ph name="LINK_START">$2<ex>&gt;a&lt;</ex></ph>visit the network's sign-in page<ph name="LINK_END">$3<ex>&gt;/a&lt;</ex></ph>, which will open automatically in a few seconds. If it didn't happen, network can't be used for the Internet connection. To use <ph name="NETWORK_ID">$1<ex>&gt;b&lt;Public Wifi&gt;/b&lt;</ex></ph> you may first need to <ph name="LINK_START">$2<ex>&gt;a&lt;</ex></ph>visit the network's sign-in page<ph name="LINK_END">$3<ex>&gt;/a&lt;</ex></ph>, which will open automatically in a few seconds. If it didn't happen, network can't be used for the Internet connection.
</message> </message>
<message name="IDS_LOGIN_MAYBE_CAPTIVE_PORTAL_PROXY" desc="An offline mssage shown when we suggest that user should configure the proxy.">
If you use a proxy server, check your proxy settings or
contact your network administrator to make sure the proxy
server is working. If you don't believe you should be using a
proxy server, adjust your <ph name="LINK_START">$1<ex>&gt;a&lt;</ex></ph>proxy settings<ph name="LINK_END">$2<ex>&gt;/a&lt;</ex></ph>.
</message>
<message name="IDS_LOGIN_MAYBE_CAPTIVE_PORTAL_NETWORK_SELECT" desc="An offline message shown when we suggest that user may select other network."> <message name="IDS_LOGIN_MAYBE_CAPTIVE_PORTAL_NETWORK_SELECT" desc="An offline message shown when we suggest that user may select other network.">
You may also select another network. You may also select another network.
</message> </message>
......
...@@ -109,6 +109,7 @@ hr.bottom { ...@@ -109,6 +109,7 @@ hr.bottom {
#header span, #header span,
#user-image-screen-curtain p, #user-image-screen-curtain p,
.label, .label,
.flexible-label,
.menu-control { .menu-control {
cursor: default; cursor: default;
} }
...@@ -235,13 +236,21 @@ html[dir=rtl] .step.left { ...@@ -235,13 +236,21 @@ html[dir=rtl] .step.left {
width: 250px; width: 250px;
} }
.label { .label,
.flexible-label {
display: block; display: block;
margin: 5px 5px 5px 0; margin: 5px 5px 5px 0;
padding: 5px 5px 5px 0; padding: 5px 5px 5px 0;
}
.label {
width: 170px; width: 170px;
} }
.flexible-label {
max-width: 250px;
}
#connect { #connect {
box-sizing: border-box; box-sizing: border-box;
padding: 60px 0 0 145px; padding: 60px 0 0 145px;
......
...@@ -17,6 +17,10 @@ ...@@ -17,6 +17,10 @@
display: block; display: block;
} }
#captive-portal-proxy-message-text {
margin-top: 20px;
}
#captive-portal-network-select-text { #captive-portal-network-select-text {
margin-top: 20px; margin-top: 20px;
} }
...@@ -33,6 +37,10 @@ ...@@ -33,6 +37,10 @@
display: block; display: block;
} }
.show-captive-portal .dont-show-with-captive-portal {
display: none;
}
#error-guest-signin, #error-guest-signin,
#error-offline-login { #error-offline-login {
-webkit-margin-start: 60px; -webkit-margin-start: 60px;
......
...@@ -10,16 +10,17 @@ ...@@ -10,16 +10,17 @@
class="show-with-offline-message"></span> class="show-with-offline-message"></span>
<div id="captive-portal-message-text" <div id="captive-portal-message-text"
class="show-with-captive-portal"></div> class="show-with-captive-portal"></div>
<div id="captive-portal-proxy-message-text"
class="show-with-captive-portal"></div>
<div id="proxy-message-text" <div id="proxy-message-text"
class="show-with-proxy-error"></div> class="show-with-proxy-error"></div>
<div id="captive-portal-network-select-text"
class="show-with-captive-portal">
<span i18n-content="captivePortalNetworkSelect"></span>
</div>
</div> </div>
<div id="offline-network-control" class="control-with-label"> <div id="offline-network-control" class="control-with-label">
<label for="offline-networks-list-dropdown" i18n-content="selectNetwork" <label for="offline-networks-list-dropdown" i18n-content="selectNetwork"
class="label menu-control"></label> class="flexible-label dont-show-with-captive-portal"></label>
<label for="offline-networks-list-dropdown"
i18n-content="selectAnotherNetwork"
class="flexible-label show-with-captive-portal"></label>
<div class="menu-area"> <div class="menu-area">
<div id="offline-networks-list" class="menu-control"> <div id="offline-networks-list" class="menu-control">
</div> </div>
......
...@@ -34,6 +34,8 @@ cr.define('login', function() { ...@@ -34,6 +34,8 @@ cr.define('login', function() {
// Link which starts guest session for captive portal fixing. // Link which starts guest session for captive portal fixing.
/** @const */ var FIX_CAPTIVE_PORTAL_ID = 'captive-portal-fix-link'; /** @const */ var FIX_CAPTIVE_PORTAL_ID = 'captive-portal-fix-link';
/** @const */ var FIX_PROXY_SETTINGS_ID = 'proxy-settings-fix-link';
// Id of the element which holds current network name. // Id of the element which holds current network name.
/** @const */ var CURRENT_NETWORK_NAME_ID = 'captive-portal-network-name'; /** @const */ var CURRENT_NETWORK_NAME_ID = 'captive-portal-network-name';
...@@ -83,6 +85,15 @@ cr.define('login', function() { ...@@ -83,6 +85,15 @@ cr.define('login', function() {
chrome.send('showCaptivePortal'); chrome.send('showCaptivePortal');
}; };
$('captive-portal-proxy-message-text').innerHTML =
localStrings.getStringF(
'captivePortalProxyMessage',
'<a id="' + FIX_PROXY_SETTINGS_ID + '" class="signin-link" href="#">',
'</a>');
$(FIX_PROXY_SETTINGS_ID).onclick = function() {
chrome.send('openProxySettings');
};
$('proxy-message-text').innerHTML = localStrings.getStringF( $('proxy-message-text').innerHTML = localStrings.getStringF(
'proxyMessageText', 'proxyMessageText',
'<a id="' + RELOAD_PAGE_ID + '" class="signin-link" href="#">', '<a id="' + RELOAD_PAGE_ID + '" class="signin-link" href="#">',
......
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
...@@ -36,6 +36,8 @@ void NetworkDropdownHandler::GetLocalizedStrings( ...@@ -36,6 +36,8 @@ void NetworkDropdownHandler::GetLocalizedStrings(
base::DictionaryValue* localized_strings) { base::DictionaryValue* localized_strings) {
localized_strings->SetString("selectNetwork", localized_strings->SetString("selectNetwork",
l10n_util::GetStringUTF16(IDS_NETWORK_SELECTION_SELECT)); l10n_util::GetStringUTF16(IDS_NETWORK_SELECTION_SELECT));
localized_strings->SetString("selectAnotherNetwork",
l10n_util::GetStringUTF16(IDS_ANOTHER_NETWORK_SELECTION_SELECT));
} }
void NetworkDropdownHandler::Initialize() { void NetworkDropdownHandler::Initialize() {
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "chrome/browser/chromeos/input_method/xkeyboard.h" #include "chrome/browser/chromeos/input_method/xkeyboard.h"
#include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h"
#include "chrome/browser/chromeos/login/authenticator.h" #include "chrome/browser/chromeos/login/authenticator.h"
#include "chrome/browser/chromeos/login/base_login_display_host.h"
#include "chrome/browser/chromeos/login/captive_portal_window_proxy.h" #include "chrome/browser/chromeos/login/captive_portal_window_proxy.h"
#include "chrome/browser/chromeos/login/screen_locker.h" #include "chrome/browser/chromeos/login/screen_locker.h"
#include "chrome/browser/chromeos/login/user.h" #include "chrome/browser/chromeos/login/user.h"
...@@ -331,6 +332,8 @@ void SigninScreenHandler::GetLocalizedStrings( ...@@ -331,6 +332,8 @@ void SigninScreenHandler::GetLocalizedStrings(
l10n_util::GetStringUTF16(IDS_LOGIN_MAYBE_CAPTIVE_PORTAL_TITLE)); l10n_util::GetStringUTF16(IDS_LOGIN_MAYBE_CAPTIVE_PORTAL_TITLE));
localized_strings->SetString("captivePortalMessage", localized_strings->SetString("captivePortalMessage",
l10n_util::GetStringUTF16(IDS_LOGIN_MAYBE_CAPTIVE_PORTAL)); l10n_util::GetStringUTF16(IDS_LOGIN_MAYBE_CAPTIVE_PORTAL));
localized_strings->SetString("captivePortalProxyMessage",
l10n_util::GetStringUTF16(IDS_LOGIN_MAYBE_CAPTIVE_PORTAL_PROXY));
localized_strings->SetString("captivePortalNetworkSelect", localized_strings->SetString("captivePortalNetworkSelect",
l10n_util::GetStringUTF16(IDS_LOGIN_MAYBE_CAPTIVE_PORTAL_NETWORK_SELECT)); l10n_util::GetStringUTF16(IDS_LOGIN_MAYBE_CAPTIVE_PORTAL_NETWORK_SELECT));
localized_strings->SetString("proxyMessageText", localized_strings->SetString("proxyMessageText",
...@@ -476,6 +479,9 @@ void SigninScreenHandler::RegisterMessages() { ...@@ -476,6 +479,9 @@ void SigninScreenHandler::RegisterMessages() {
web_ui()->RegisterMessageCallback("networkErrorShown", web_ui()->RegisterMessageCallback("networkErrorShown",
base::Bind(&SigninScreenHandler::HandleNetworkErrorShown, base::Bind(&SigninScreenHandler::HandleNetworkErrorShown,
base::Unretained(this))); base::Unretained(this)));
web_ui()->RegisterMessageCallback("openProxySettings",
base::Bind(&SigninScreenHandler::HandleOpenProxySettings,
base::Unretained(this)));
} }
void SigninScreenHandler::HandleGetUsers(const base::ListValue* args) { void SigninScreenHandler::HandleGetUsers(const base::ListValue* args) {
...@@ -970,6 +976,10 @@ void SigninScreenHandler::HandleCreateAccount(const base::ListValue* args) { ...@@ -970,6 +976,10 @@ void SigninScreenHandler::HandleCreateAccount(const base::ListValue* args) {
delegate_->CreateAccount(); delegate_->CreateAccount();
} }
void SigninScreenHandler::HandleOpenProxySettings(const base::ListValue* args) {
BaseLoginDisplayHost::default_host()->OpenProxySettings();
}
void SigninScreenHandler::StartClearingDnsCache() { void SigninScreenHandler::StartClearingDnsCache() {
if (dns_clear_task_running_ || !g_browser_process->io_thread()) if (dns_clear_task_running_ || !g_browser_process->io_thread())
return; return;
......
...@@ -201,6 +201,7 @@ class SigninScreenHandler : public BaseScreenHandler, ...@@ -201,6 +201,7 @@ class SigninScreenHandler : public BaseScreenHandler,
void HandleSignOutUser(const base::ListValue* args); void HandleSignOutUser(const base::ListValue* args);
void HandleUserImagesLoaded(const base::ListValue* args); void HandleUserImagesLoaded(const base::ListValue* args);
void HandleNetworkErrorShown(const base::ListValue* args); void HandleNetworkErrorShown(const base::ListValue* args);
void HandleOpenProxySettings(const base::ListValue* args);
// Sends user list to account picker. // Sends user list to account picker.
void SendUserList(bool animated); void SendUserList(bool animated);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment