diff options
-rw-r--r-- | chrome/browser/chrome_content_browser_client.cc | 2 | ||||
-rw-r--r-- | chrome/browser/defaults.cc | 6 | ||||
-rw-r--r-- | chrome/browser/defaults.h | 3 | ||||
-rw-r--r-- | content/common/view_messages.h | 1 | ||||
-rw-r--r-- | webkit/glue/webpreferences.cc | 2 | ||||
-rw-r--r-- | webkit/glue/webpreferences.h | 1 |
6 files changed, 15 insertions, 0 deletions
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index 3c36f12..b0ad9d5 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc @@ -23,6 +23,7 @@ #include "chrome/browser/content_settings/cookie_settings.h" #include "chrome/browser/content_settings/host_content_settings_map.h" #include "chrome/browser/content_settings/tab_specific_content_settings.h" +#include "chrome/browser/defaults.h" #include "chrome/browser/download/download_util.h" #include "chrome/browser/extensions/api/webrequest/webrequest_api.h" #include "chrome/browser/extensions/extension_host.h" @@ -1281,6 +1282,7 @@ void ChromeContentBrowserClient::OverrideWebkitPrefs( prefs->GetBoolean(prefs::kWebKitAllowDisplayingInsecureContent); web_prefs->allow_running_insecure_content = prefs->GetBoolean(prefs::kWebKitAllowRunningInsecureContent); + web_prefs->password_echo_enabled = browser_defaults::kPasswordEchoEnabled; // The user stylesheet watcher may not exist in a testing profile. if (profile->GetUserStyleSheetWatcher()) { diff --git a/chrome/browser/defaults.cc b/chrome/browser/defaults.cc index 2c342e7..ea25a7e 100644 --- a/chrome/browser/defaults.cc +++ b/chrome/browser/defaults.cc @@ -95,6 +95,12 @@ const ui::ResourceBundle::FontStyle kAssociatedNetworkFontStyle = const int kInfoBarBorderPaddingVertical = 5; +#if defined(OS_ANDROID) +const bool kPasswordEchoEnabled = true; +#else +const bool kPasswordEchoEnabled = false; +#endif + bool bookmarks_enabled = true; bool enable_help_app = true; diff --git a/chrome/browser/defaults.h b/chrome/browser/defaults.h index ffa5b42..c4fe2e6 100644 --- a/chrome/browser/defaults.h +++ b/chrome/browser/defaults.h @@ -86,6 +86,9 @@ extern const ui::ResourceBundle::FontStyle kAssociatedNetworkFontStyle; // Preferred infobar border padding in pixels. extern const int kInfoBarBorderPaddingVertical; +// Last character display for passwords. +extern const bool kPasswordEchoEnabled; + //============================================================================= // Runtime "const" - set only once after parsing command line option and should // never be modified after that. diff --git a/content/common/view_messages.h b/content/common/view_messages.h index 8c0d36c..529539a 100644 --- a/content/common/view_messages.h +++ b/content/common/view_messages.h @@ -206,6 +206,7 @@ IPC_STRUCT_TRAITS_BEGIN(WebPreferences) IPC_STRUCT_TRAITS_MEMBER(enable_scroll_animator) IPC_STRUCT_TRAITS_MEMBER(visual_word_movement_enabled) IPC_STRUCT_TRAITS_MEMBER(per_tile_painting_enabled) + IPC_STRUCT_TRAITS_MEMBER(password_echo_enabled) IPC_STRUCT_TRAITS_END() IPC_STRUCT_TRAITS_BEGIN(WebMenuItem) diff --git a/webkit/glue/webpreferences.cc b/webkit/glue/webpreferences.cc index 41463788..cdf6292 100644 --- a/webkit/glue/webpreferences.cc +++ b/webkit/glue/webpreferences.cc @@ -97,6 +97,7 @@ WebPreferences::WebPreferences() fullscreen_enabled(false), allow_displaying_insecure_content(true), allow_running_insecure_content(false), + password_echo_enabled(false), should_print_backgrounds(false), enable_scroll_animator(false), hixie76_websocket_protocol_enabled(false), @@ -338,6 +339,7 @@ void WebPreferences::Apply(WebView* web_view) const { settings->setFullScreenEnabled(fullscreen_enabled); settings->setAllowDisplayOfInsecureContent(allow_displaying_insecure_content); settings->setAllowRunningOfInsecureContent(allow_running_insecure_content); + settings->setPasswordEchoEnabled(password_echo_enabled); settings->setShouldPrintBackgrounds(should_print_backgrounds); settings->setEnableScrollAnimator(enable_scroll_animator); settings->setHixie76WebSocketProtocolEnabled( diff --git a/webkit/glue/webpreferences.h b/webkit/glue/webpreferences.h index e6b69da..158dd50 100644 --- a/webkit/glue/webpreferences.h +++ b/webkit/glue/webpreferences.h @@ -111,6 +111,7 @@ struct WEBKIT_GLUE_EXPORT WebPreferences { bool fullscreen_enabled; bool allow_displaying_insecure_content; bool allow_running_insecure_content; + bool password_echo_enabled; bool should_print_backgrounds; bool enable_scroll_animator; bool hixie76_websocket_protocol_enabled; |