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/options2/core_options_handler.h" | 5 #include "chrome/browser/ui/webui/options2/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 13 matching lines...) Expand all Loading... |
24 #include "content/public/browser/web_ui.h" | 24 #include "content/public/browser/web_ui.h" |
25 #include "googleurl/src/gurl.h" | 25 #include "googleurl/src/gurl.h" |
26 #include "grit/chromium_strings.h" | 26 #include "grit/chromium_strings.h" |
27 #include "grit/generated_resources.h" | 27 #include "grit/generated_resources.h" |
28 #include "grit/locale_settings.h" | 28 #include "grit/locale_settings.h" |
29 #include "grit/theme_resources.h" | 29 #include "grit/theme_resources.h" |
30 #include "ui/base/l10n/l10n_util.h" | 30 #include "ui/base/l10n/l10n_util.h" |
31 | 31 |
32 using content::UserMetricsAction; | 32 using content::UserMetricsAction; |
33 | 33 |
34 namespace options2 { | 34 namespace options { |
35 | 35 |
36 CoreOptionsHandler::CoreOptionsHandler() | 36 CoreOptionsHandler::CoreOptionsHandler() |
37 : handlers_host_(NULL) { | 37 : handlers_host_(NULL) { |
38 } | 38 } |
39 | 39 |
40 CoreOptionsHandler::~CoreOptionsHandler() {} | 40 CoreOptionsHandler::~CoreOptionsHandler() {} |
41 | 41 |
42 void CoreOptionsHandler::InitializeHandler() { | 42 void CoreOptionsHandler::InitializeHandler() { |
43 plugin_status_pref_setter_.Init(Profile::FromWebUI(web_ui()), this); | 43 plugin_status_pref_setter_.Init(Profile::FromWebUI(web_ui()), this); |
44 } | 44 } |
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 } | 473 } |
474 | 474 |
475 void CoreOptionsHandler::UpdatePepperFlashSettingsEnabled() { | 475 void CoreOptionsHandler::UpdatePepperFlashSettingsEnabled() { |
476 scoped_ptr<base::Value> enabled( | 476 scoped_ptr<base::Value> enabled( |
477 base::Value::CreateBooleanValue( | 477 base::Value::CreateBooleanValue( |
478 plugin_status_pref_setter_.IsPepperFlashSettingsEnabled())); | 478 plugin_status_pref_setter_.IsPepperFlashSettingsEnabled())); |
479 web_ui()->CallJavascriptFunction( | 479 web_ui()->CallJavascriptFunction( |
480 "OptionsPage.setPepperFlashSettingsEnabled", *enabled); | 480 "OptionsPage.setPepperFlashSettingsEnabled", *enabled); |
481 } | 481 } |
482 | 482 |
483 } // namespace options2 | 483 } // namespace options |
OLD | NEW |