summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/app/generated_resources.grd16
-rw-r--r--chrome/browser/chromeos/dom_ui/labs_handler.cc44
-rw-r--r--chrome/browser/chromeos/dom_ui/labs_handler.h26
-rw-r--r--chrome/browser/chromeos/dom_ui/system_options_handler.cc2
-rw-r--r--chrome/browser/dom_ui/core_options_handler.cc2
-rw-r--r--chrome/browser/dom_ui/options_ui.cc2
-rw-r--r--chrome/browser/resources/options.html35
-rw-r--r--chrome/browser/resources/options/chromeos_labs.html26
-rw-r--r--chrome/browser/resources/options/options_page.js8
-rw-r--r--chrome/chrome_browser.gypi2
10 files changed, 127 insertions, 36 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 3153651..32d576b 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -5444,6 +5444,10 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_OPTIONS_INTERNET_TAB_LABEL" desc="The title of the Internet tab">
Internet
</message>
+ <message name="IDS_OPTIONS_LABS_TAB_LABEL" desc="The title of the LABS tab">
+ Labs
+ </message>
+
</if>
<message name="IDS_OPTIONS_GENERAL_TAB_LABEL" desc="The title of the Basics tab">
Basics
@@ -7697,6 +7701,12 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_OPTIONS_SETTINGS_SECTION_TITLE_IP_CONFIG">
Advanced Options
</message>
+ <message name="IDS_OPTIONS_SETTINGS_SECTION_TITLE_MEDIAPLAYER">
+ Mediaplayer
+ </message>
+ <message name="IDS_OPTIONS_SETTINGS_SECTION_TITLE_ADVANCEDFS">
+ Advanced Filesystem
+ </message>
<message name="IDS_OPTIONS_SETTINGS_TIMEZONE_DESCRIPTION" desc="In the settings tab, the text next to the timezone combobox.">
Timezone:
</message>
@@ -7712,6 +7722,12 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_OPTIONS_SETTINGS_SPEED_FACTOR_DESCRIPTION" desc="In the settings tab, the text next to the slider for the touchpad speed factor.">
Speed Sensitivity:
</message>
+ <message name="IDS_OPTIONS_SETTINGS_MEDIAPLAYER_DESCRIPTION" desc="In the settings tab, the text next to the checkbox to turn on the mediaplayer">
+ Turn on the Mediaplayer
+ </message>
+ <message name="IDS_OPTIONS_SETTINGS_ADVANCEDFS_DESCRIPTION" desc="In the settings tab, the text next to the checkbox for the filesystem.">
+ Advanced Filesystem including USB/SD card support.
+ </message>
<message name="IDS_OPTIONS_SETTINGS_ACCESSIBILITY_DESCRIPTION" desc="In the settings tab, the text next to the checkbox for accessbility.">
Enable Accessibility
</message>
diff --git a/chrome/browser/chromeos/dom_ui/labs_handler.cc b/chrome/browser/chromeos/dom_ui/labs_handler.cc
new file mode 100644
index 0000000..d6ecee0
--- /dev/null
+++ b/chrome/browser/chromeos/dom_ui/labs_handler.cc
@@ -0,0 +1,44 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/chromeos/dom_ui/labs_handler.h"
+
+#include "app/l10n_util.h"
+#include "app/resource_bundle.h"
+#include "base/basictypes.h"
+#include "base/callback.h"
+#include "base/i18n/time_formatting.h"
+#include "base/stl_util-inl.h"
+#include "base/time.h"
+#include "base/utf_string_conversions.h"
+#include "base/values.h"
+#include "chrome/common/notification_service.h"
+#include "grit/browser_resources.h"
+#include "grit/chromium_strings.h"
+#include "grit/generated_resources.h"
+#include "grit/locale_settings.h"
+#include "grit/theme_resources.h"
+
+LabsHandler::LabsHandler() {
+}
+
+LabsHandler::~LabsHandler() {
+}
+
+void LabsHandler::GetLocalizedValues(
+ DictionaryValue* localized_strings) {
+ DCHECK(localized_strings);
+ // Labs page - ChromeOS
+ localized_strings->SetString(L"labsPage",
+ l10n_util::GetString(IDS_OPTIONS_LABS_TAB_LABEL));
+ localized_strings->SetString(L"mediaplayer_title",
+ l10n_util::GetString(IDS_OPTIONS_SETTINGS_SECTION_TITLE_MEDIAPLAYER));
+ localized_strings->SetString(L"mediaplayer",
+ l10n_util::GetString(IDS_OPTIONS_SETTINGS_MEDIAPLAYER_DESCRIPTION));
+
+ localized_strings->SetString(L"advanced_file_title",
+ l10n_util::GetString(IDS_OPTIONS_SETTINGS_SECTION_TITLE_ADVANCEDFS));
+ localized_strings->SetString(L"advanced_filesystem",
+ l10n_util::GetString(IDS_OPTIONS_SETTINGS_ADVANCEDFS_DESCRIPTION));
+}
diff --git a/chrome/browser/chromeos/dom_ui/labs_handler.h b/chrome/browser/chromeos/dom_ui/labs_handler.h
new file mode 100644
index 0000000..5c217bb
--- /dev/null
+++ b/chrome/browser/chromeos/dom_ui/labs_handler.h
@@ -0,0 +1,26 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CHROMEOS_DOM_UI_LABS_HANDLER_H_
+#define CHROME_BROWSER_CHROMEOS_DOM_UI_LABS_HANDLER_H_
+
+#include <string>
+
+#include "chrome/browser/dom_ui/options_ui.h"
+
+// ChromeOS labs options page UI handler.
+class LabsHandler : public OptionsPageUIHandler {
+ public:
+ LabsHandler();
+ virtual ~LabsHandler();
+
+ // OptionsUIHandler implementation.
+ virtual void GetLocalizedValues(DictionaryValue* localized_strings);
+
+ private:
+
+ DISALLOW_COPY_AND_ASSIGN(LabsHandler);
+};
+
+#endif // CHROME_BROWSER_CHROMEOS_DOM_UI_LABS_HANDLER_H_
diff --git a/chrome/browser/chromeos/dom_ui/system_options_handler.cc b/chrome/browser/chromeos/dom_ui/system_options_handler.cc
index 4d16972..fed9222 100644
--- a/chrome/browser/chromeos/dom_ui/system_options_handler.cc
+++ b/chrome/browser/chromeos/dom_ui/system_options_handler.cc
@@ -69,6 +69,8 @@ void SystemOptionsHandler::GetLocalizedValues(
DictionaryValue* localized_strings) {
DCHECK(localized_strings);
// System page - ChromeOS
+ localized_strings->SetString(L"systemPage",
+ l10n_util::GetString(IDS_OPTIONS_SYSTEM_TAB_LABEL));
localized_strings->SetString(L"datetime_title",
l10n_util::GetString(IDS_OPTIONS_SETTINGS_SECTION_TITLE_DATETIME));
localized_strings->SetString(L"timezone",
diff --git a/chrome/browser/dom_ui/core_options_handler.cc b/chrome/browser/dom_ui/core_options_handler.cc
index 5853d4f..948a4fc 100644
--- a/chrome/browser/dom_ui/core_options_handler.cc
+++ b/chrome/browser/dom_ui/core_options_handler.cc
@@ -45,8 +45,6 @@ void CoreOptionsHandler::GetLocalizedValues(
l10n_util::GetString(IDS_PRODUCT_NAME)));
#if defined(OS_CHROMEOS)
- localized_strings->SetString(L"systemPage",
- l10n_util::GetString(IDS_OPTIONS_SYSTEM_TAB_LABEL));
localized_strings->SetString(L"internetPage",
l10n_util::GetString(IDS_OPTIONS_INTERNET_TAB_LABEL));
#endif
diff --git a/chrome/browser/dom_ui/options_ui.cc b/chrome/browser/dom_ui/options_ui.cc
index 19897d8..9f48102 100644
--- a/chrome/browser/dom_ui/options_ui.cc
+++ b/chrome/browser/dom_ui/options_ui.cc
@@ -36,6 +36,7 @@
#include "grit/theme_resources.h"
#if defined(OS_CHROMEOS)
+#include "chrome/browser/chromeos/dom_ui/labs_handler.h"
#include "chrome/browser/chromeos/dom_ui/system_options_handler.h"
#endif
@@ -101,6 +102,7 @@ OptionsUI::OptionsUI(TabContents* contents) : DOMUI(contents) {
AddOptionsPageUIHandler(localized_strings, new CoreOptionsHandler());
#if defined(OS_CHROMEOS)
AddOptionsPageUIHandler(localized_strings, new SystemOptionsHandler());
+ AddOptionsPageUIHandler(localized_strings, new LabsHandler());
#endif
// |localized_strings| ownership is taken over by this constructor.
diff --git a/chrome/browser/resources/options.html b/chrome/browser/resources/options.html
index b58a038..0ea0817 100644
--- a/chrome/browser/resources/options.html
+++ b/chrome/browser/resources/options.html
@@ -22,29 +22,6 @@
<script>
///////////////////////////////////////////////////////////////////////////////
-// DummyOptions Functions:
-// TODO(zelidrag): Remove DummyOptions once we put the second page in.
-
-function DummyOptions(model) {
- OptionsPage.call(this, 'dummy', 'Dummy Options Page', 'dummyPage');
-}
-
-DummyOptions.instance = null;
-
-DummyOptions.getInstance = function() {
- if (DummyOptions.instance)
- return DummyOptions.instance;
- // TODO(zelidrag): hook model in.
- DummyOptions.instance = new DummyOptions(null);
- return DummyOptions.instance;
-}
-
-// Inherit SystemOptions from OptionsPage.
-DummyOptions.prototype = {
- __proto__: OptionsPage.prototype,
-};
-
-///////////////////////////////////////////////////////////////////////////////
// Document Functions:
/**
* Window onload handler, sets up the page.
@@ -52,7 +29,10 @@ DummyOptions.prototype = {
function load() {
localStrings = new LocalStrings();
OptionsPage.register(SystemOptions.getInstance());
- OptionsPage.register(DummyOptions.getInstance());
+ var labsOptions = new OptionsPage('labs',
+ templateData.labsPage,
+ 'labsPage');
+ OptionsPage.register(labsOptions);
Preferences.getInstance().initialize();
OptionsPage.showPageByName(SystemOptions.getInstance().name);
@@ -122,7 +102,7 @@ window.onpopstate = function(e) {
}
.hidden {
- visibility: hidden;
+ display: none;
}
.touch-slider {
@@ -147,10 +127,7 @@ window.onpopstate = function(e) {
<if expr="pp_ifdef('chromeos')">
<include src="options/chromeos_system_options.html">
</if>
- <div class="page hidden" id="dummyPage">
- <!-- TODO(zelidrag): remove this one once we get another page here -->
- Dummy page
- </div>
+ <!-- include file="options/chromeos_labs.html" -->
</div>
</div>
<script>
diff --git a/chrome/browser/resources/options/chromeos_labs.html b/chrome/browser/resources/options/chromeos_labs.html
new file mode 100644
index 0000000..818f126
--- /dev/null
+++ b/chrome/browser/resources/options/chromeos_labs.html
@@ -0,0 +1,26 @@
+<div class="page hidden" id="labsPage">
+ <div class="section">
+ <div class="section-title" i18n-content="mediaplayer_title"></div>
+ <div class="option">
+ <table class="option-control-table">
+ <tr>
+ <td class="option-name"><label><input id="mediaplayer-check"
+ pref="settings.labs.mediaplayer" type="checkbox"><span
+ i18n-content="mediaplayer"></span></label></td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ <div class="section">
+ <div class="section-title" i18n-content="advanced_file_title"></div>
+ <div class="option">
+ <table class="option-control-table">
+ <tr>
+ <td class="option-name"><label><input id="advanced-filesystem-check"
+ pref="settings.labs.advanced_filesystem" type="checkbox"><span
+ i18n-content="advanced_filesystem"></span></label></td>
+ </tr>
+ </table>
+ </div>
+ </div>
+</div>
diff --git a/chrome/browser/resources/options/options_page.js b/chrome/browser/resources/options/options_page.js
index 0962e65..31eb3b9 100644
--- a/chrome/browser/resources/options/options_page.js
+++ b/chrome/browser/resources/options/options_page.js
@@ -73,7 +73,7 @@ OptionsPage.prototype = {
get visible() {
var page = $(this.pageDivName);
return page.ownerDocument.defaultView.getComputedStyle(
- page).visibility == 'visible';
+ page).display == 'block';
},
/**
@@ -87,13 +87,11 @@ OptionsPage.prototype = {
window.history.pushState({pageName: this.name},
this.title,
'/' + this.name);
- this.pageDiv.style.visibility = 'visible';
+ this.pageDiv.style.display = 'block';
this.tab.classList.add('navbar-item-selected');
} else {
- this.pageDiv.style.visibility = 'hidden';
+ this.pageDiv.style.display = 'none';
this.tab.classList.remove('navbar-item-selected');
}
}
};
-
-
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index eb4c09f..ff89c95 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -381,6 +381,8 @@
'browser/chromeos/cros/system_library.h',
'browser/chromeos/customization_document.cc',
'browser/chromeos/customization_document.h',
+ 'browser/chromeos/dom_ui/labs_handler.cc',
+ 'browser/chromeos/dom_ui/labs_handler.h',
'browser/chromeos/dom_ui/system_options_handler.cc',
'browser/chromeos/dom_ui/system_options_handler.h',
'browser/chromeos/drop_shadow_label.cc',