#include "base/stl_util.h"
#include "xwalk/application/common/manifest_handlers/csp_handler.h"
-#include "xwalk/application/common/manifest_handlers/main_document_handler.h"
#if defined(OS_TIZEN)
-#include "xwalk/application/common/manifest_handlers/navigation_handler.h"
+#include "xwalk/application/common/manifest_handlers/tizen_app_control_handler.h"
#include "xwalk/application/common/manifest_handlers/tizen_application_handler.h"
+#include "xwalk/application/common/manifest_handlers/tizen_appwidget_handler.h"
#include "xwalk/application/common/manifest_handlers/tizen_metadata_handler.h"
+#include "xwalk/application/common/manifest_handlers/tizen_navigation_handler.h"
#include "xwalk/application/common/manifest_handlers/tizen_setting_handler.h"
+#include "xwalk/application/common/manifest_handlers/tizen_splash_screen_handler.h"
#endif
#include "xwalk/application/common/manifest_handlers/permissions_handler.h"
#include "xwalk/application/common/manifest_handlers/warp_handler.h"
}
bool ManifestHandler::Validate(scoped_refptr<const ApplicationData> application,
- std::string* error,
- std::vector<InstallWarning>* warnings) const {
+ std::string* error) const {
return true;
}
}
ManifestHandlerRegistry*
-ManifestHandlerRegistry::GetInstance(Manifest::PackageType package_type) {
- if (package_type == Manifest::TYPE_WGT)
+ManifestHandlerRegistry::GetInstance(Manifest::Type type) {
+ if (type == Manifest::TYPE_WIDGET)
return GetInstanceForWGT();
return GetInstanceForXPK();
}
handlers.push_back(new WidgetHandler);
handlers.push_back(new WARPHandler);
#if defined(OS_TIZEN)
- handlers.push_back(new CSPHandler(Manifest::TYPE_WGT));
- handlers.push_back(new NavigationHandler);
+ handlers.push_back(new CSPHandler(Manifest::TYPE_WIDGET));
+ handlers.push_back(new TizenAppControlHandler);
handlers.push_back(new TizenApplicationHandler);
- handlers.push_back(new TizenSettingHandler);
+ handlers.push_back(new TizenAppWidgetHandler);
handlers.push_back(new TizenMetaDataHandler);
+ handlers.push_back(new TizenNavigationHandler);
+ handlers.push_back(new TizenSettingHandler);
+ handlers.push_back(new TizenSplashScreenHandler);
#endif
widget_registry_ = new ManifestHandlerRegistry(handlers);
return widget_registry_;
std::vector<ManifestHandler*> handlers;
// FIXME: Add manifest handlers here like this:
// handlers.push_back(new xxxHandler);
- handlers.push_back(new CSPHandler(Manifest::TYPE_XPK));
- handlers.push_back(new MainDocumentHandler);
+ handlers.push_back(new CSPHandler(Manifest::TYPE_MANIFEST));
handlers.push_back(new PermissionsHandler);
xpk_registry_ = new ManifestHandlerRegistry(handlers);
return xpk_registry_;
iter != handlers_.end(); ++iter) {
ManifestHandler* handler = iter->second;
if (application->GetManifest()->HasPath(iter->first) ||
- handler->AlwaysParseForType(application->GetType())) {
+ handler->AlwaysParseForType(application->manifest_type())) {
handlers_by_order[order_map_[handler]] = handler;
}
}
bool ManifestHandlerRegistry::ValidateAppManifest(
scoped_refptr<const ApplicationData> application,
- std::string* error,
- std::vector<InstallWarning>* warnings) {
+ std::string* error) {
for (ManifestHandlerMap::iterator iter = handlers_.begin();
iter != handlers_.end(); ++iter) {
ManifestHandler* handler = iter->second;
if ((application->GetManifest()->HasPath(iter->first) ||
- handler->AlwaysValidateForType(application->GetType())) &&
- !handler->Validate(application, error, warnings))
+ handler->AlwaysValidateForType(application->manifest_type())) &&
+ !handler->Validate(application, error))
return false;
}
return true;
// static
void ManifestHandlerRegistry::SetInstanceForTesting(
- ManifestHandlerRegistry* registry, Manifest::PackageType package_type) {
- if (package_type == Manifest::TYPE_WGT) {
+ ManifestHandlerRegistry* registry, Manifest::Type type) {
+ if (type == Manifest::TYPE_WIDGET) {
widget_registry_ = registry;
return;
}