1 // Copyright (c) 2014 Intel Corporation. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 #ifndef XWALK_APPLICATION_COMMON_MANIFEST_HANDLERS_WIDGET_HANDLER_H_
5 #define XWALK_APPLICATION_COMMON_MANIFEST_HANDLERS_WIDGET_HANDLER_H_
11 #include "base/values.h"
12 #include "xwalk/application/common/application_data.h"
13 #include "xwalk/application/common/manifest_handler.h"
16 namespace application {
18 class WidgetInfo : public ApplicationData::ManifestData {
21 virtual ~WidgetInfo();
22 void SetString(const std::string& key, const std::string& value);
23 void Set(const std::string& key, base::Value* value);
25 base::DictionaryValue* GetWidgetInfo() {
30 scoped_ptr<base::DictionaryValue> value_;
33 class WidgetHandler : public ManifestHandler {
36 virtual ~WidgetHandler();
38 virtual bool Parse(scoped_refptr<ApplicationData> application,
39 base::string16* error) OVERRIDE;
40 virtual bool AlwaysParseForType(Manifest::Type type) const OVERRIDE;
41 virtual std::vector<std::string> Keys() const OVERRIDE;
44 DISALLOW_COPY_AND_ASSIGN(WidgetHandler);
47 } // namespace application
50 #endif // XWALK_APPLICATION_COMMON_MANIFEST_HANDLERS_WIDGET_HANDLER_H_