| 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/options/core_options_handler.h" | 5 #include "chrome/browser/ui/webui/options/core_options_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/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 | 114 |
| 115 // Common | 115 // Common |
| 116 localized_strings->SetString("ok", | 116 localized_strings->SetString("ok", |
| 117 l10n_util::GetStringUTF16(IDS_OK)); | 117 l10n_util::GetStringUTF16(IDS_OK)); |
| 118 localized_strings->SetString("cancel", | 118 localized_strings->SetString("cancel", |
| 119 l10n_util::GetStringUTF16(IDS_CANCEL)); | 119 l10n_util::GetStringUTF16(IDS_CANCEL)); |
| 120 localized_strings->SetString("learnMore", | 120 localized_strings->SetString("learnMore", |
| 121 l10n_util::GetStringUTF16(IDS_LEARN_MORE)); | 121 l10n_util::GetStringUTF16(IDS_LEARN_MORE)); |
| 122 localized_strings->SetString("close", | 122 localized_strings->SetString("close", |
| 123 l10n_util::GetStringUTF16(IDS_CLOSE)); | 123 l10n_util::GetStringUTF16(IDS_CLOSE)); |
| 124 localized_strings->SetString("done", |
| 125 l10n_util::GetStringUTF16(IDS_DONE)); |
| 124 } | 126 } |
| 125 | 127 |
| 126 void CoreOptionsHandler::Uninitialize() { | 128 void CoreOptionsHandler::Uninitialize() { |
| 127 std::string last_pref; | 129 std::string last_pref; |
| 128 for (PreferenceCallbackMap::const_iterator iter = pref_callback_map_.begin(); | 130 for (PreferenceCallbackMap::const_iterator iter = pref_callback_map_.begin(); |
| 129 iter != pref_callback_map_.end(); | 131 iter != pref_callback_map_.end(); |
| 130 ++iter) { | 132 ++iter) { |
| 131 if (last_pref != iter->first) { | 133 if (last_pref != iter->first) { |
| 132 StopObservingPref(iter->first); | 134 StopObservingPref(iter->first); |
| 133 last_pref = iter->first; | 135 last_pref = iter->first; |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 | 533 |
| 532 void CoreOptionsHandler::UpdatePepperFlashSettingsEnabled() { | 534 void CoreOptionsHandler::UpdatePepperFlashSettingsEnabled() { |
| 533 scoped_ptr<base::Value> enabled( | 535 scoped_ptr<base::Value> enabled( |
| 534 base::Value::CreateBooleanValue( | 536 base::Value::CreateBooleanValue( |
| 535 plugin_status_pref_setter_.IsPepperFlashSettingsEnabled())); | 537 plugin_status_pref_setter_.IsPepperFlashSettingsEnabled())); |
| 536 web_ui()->CallJavascriptFunction( | 538 web_ui()->CallJavascriptFunction( |
| 537 "OptionsPage.setPepperFlashSettingsEnabled", *enabled); | 539 "OptionsPage.setPepperFlashSettingsEnabled", *enabled); |
| 538 } | 540 } |
| 539 | 541 |
| 540 } // namespace options | 542 } // namespace options |
| OLD | NEW |