summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/customization_document.h
diff options
context:
space:
mode:
authordenisromanov@chromium.org <denisromanov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-07 16:40:55 +0000
committerdenisromanov@chromium.org <denisromanov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-07 16:40:55 +0000
commitf8cef98edf2ecc34d832cc983e97da78653540c3 (patch)
tree9c61814e0b2ad4eaf60ffcfad5f2afacbd4ae3eb /chrome/browser/chromeos/customization_document.h
parent6ab685b2baa862d299123f5f62c2165e2be692a3 (diff)
downloadchromium_src-f8cef98edf2ecc34d832cc983e97da78653540c3.zip
chromium_src-f8cef98edf2ecc34d832cc983e97da78653540c3.tar.gz
chromium_src-f8cef98edf2ecc34d832cc983e97da78653540c3.tar.bz2
Added implementation of partner services manifest parsing, unit test and sample manifest.
BUG=cros:3176 TEST=Run out/Debug/unit_tests Review URL: http://codereview.chromium.org/2632004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49064 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/customization_document.h')
-rw-r--r--chrome/browser/chromeos/customization_document.h40
1 files changed, 32 insertions, 8 deletions
diff --git a/chrome/browser/chromeos/customization_document.h b/chrome/browser/chromeos/customization_document.h
index ce9d68a..a46d847 100644
--- a/chrome/browser/chromeos/customization_document.h
+++ b/chrome/browser/chromeos/customization_document.h
@@ -5,19 +5,22 @@
#ifndef CHROME_BROWSER_CHROMEOS_CUSTOMIZATION_DOCUMENT_H_
#define CHROME_BROWSER_CHROMEOS_CUSTOMIZATION_DOCUMENT_H_
-#include <list>
#include <map>
#include <string>
+#include <vector>
#include "base/basictypes.h"
#include "base/scoped_ptr.h"
#include "third_party/skia/include/core/SkColor.h"
class DictionaryValue;
+class ListValue;
class FilePath;
namespace chromeos {
+// Base class for OEM customization document classes.
+
class CustomizationDocument {
public:
CustomizationDocument() {}
@@ -38,6 +41,8 @@ class CustomizationDocument {
DISALLOW_COPY_AND_ASSIGN(CustomizationDocument);
};
+// OEM startup customization document class.
+
class StartupCustomizationDocument : public CustomizationDocument {
public:
struct SetupContent {
@@ -85,24 +90,43 @@ class StartupCustomizationDocument : public CustomizationDocument {
DISALLOW_COPY_AND_ASSIGN(StartupCustomizationDocument);
};
+// OEM services customization document class.
+
class ServicesCustomizationDocument : public CustomizationDocument {
public:
+ typedef std::vector<std::string> StringList;
+
ServicesCustomizationDocument() {}
+ const std::string& initial_start_page_url() const {
+ return initial_start_page_url_;
+ }
+ const std::string& app_menu_section_title() const {
+ return app_menu_section_title_;
+ }
+ const std::string& app_menu_support_page_url() const {
+ return app_menu_support_page_url_;
+ }
+ const StringList& web_apps() const { return web_apps_; }
+ const StringList& extensions() const { return extensions_; }
+
protected:
virtual bool ParseFromJsonValue(const DictionaryValue* root);
+ bool ParseStringListFromJsonValue(const ListValue* list_value,
+ StringList* string_list);
+
// Partner's welcome page that is opened right after the OOBE.
- std::string initial_start_page_;
+ std::string initial_start_page_url_;
- // Title for the partner's apps section in apps menu.
- std::string app_menu_section_title_;
+ // Partner's featured apps URLs list.
+ StringList web_apps_;
- // Partner's featured apps URLs.
- std::list<std::string> web_apps_;
+ // Partner's featured extensions URLs list.
+ StringList extensions_;
- // Partner's featured extensions URLs.
- std::list<std::string> extensions_;
+ // Title for the partner's apps section in apps menu.
+ std::string app_menu_section_title_;
// Partner's apps section support page URL.
std::string app_menu_support_page_url_;