1 // Copyright (c) 2014 Samsung Electronics Co., Ltd 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.
5 #ifndef XWALK_APPLICATION_COMMON_MANIFEST_HANDLERS_TIZEN_APP_CONTROL_HANDLER_H_
6 #define XWALK_APPLICATION_COMMON_MANIFEST_HANDLERS_TIZEN_APP_CONTROL_HANDLER_H_
11 #include "base/macros.h"
12 #include "xwalk/application/common/application_data.h"
13 #include "xwalk/application/common/manifest_handler.h"
16 namespace application {
18 class AppControlInfo {
20 AppControlInfo(const std::string& src, const std::string& operation,
21 const std::string& uri, const std::string& mime)
23 operation_(operation),
26 const std::string& src() const {
29 const std::string& operation() const {
32 const std::string& uri() const {
35 const std::string& mime() const {
41 std::string operation_;
46 struct AppControlInfoList : public ApplicationData::ManifestData {
47 std::vector<AppControlInfo> controls;
50 class TizenAppControlHandler : public ManifestHandler {
52 TizenAppControlHandler();
53 virtual ~TizenAppControlHandler();
54 bool Parse(scoped_refptr<ApplicationData> application,
55 base::string16* error) override;
56 bool Validate(scoped_refptr<const ApplicationData> application,
57 std::string* error) const override;
58 std::vector<std::string> Keys() const override;
61 DISALLOW_COPY_AND_ASSIGN(TizenAppControlHandler);
64 } // namespace application
67 #endif // XWALK_APPLICATION_COMMON_MANIFEST_HANDLERS_TIZEN_APP_CONTROL_HANDLER_H_