Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / xwalk / application / common / manifest_handlers / warp_handler.h
1 // Copyright (c) 2013 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_WARP_HANDLER_H_
5 #define XWALK_APPLICATION_COMMON_MANIFEST_HANDLERS_WARP_HANDLER_H_
6
7 #include <map>
8 #include <string>
9 #include <vector>
10
11 #include "xwalk/application/common/application_data.h"
12 #include "xwalk/application/common/manifest_handler.h"
13
14 namespace xwalk {
15 namespace application {
16
17 class WARPInfo : public ApplicationData::ManifestData {
18  public:
19   WARPInfo();
20   virtual ~WARPInfo();
21
22   void SetWARP(const base::ListValue* warp) {
23     warp_.reset(warp);
24   }
25   const base::ListValue* GetWARP() const { return warp_.get(); }
26
27  private:
28   scoped_ptr<const base::ListValue> warp_;
29 };
30
31 class WARPHandler : public ManifestHandler {
32  public:
33   WARPHandler();
34   virtual ~WARPHandler();
35
36   bool Parse(scoped_refptr<ApplicationData> application,
37              base::string16* error) override;
38   std::vector<std::string> Keys() const override;
39
40  private:
41   DISALLOW_COPY_AND_ASSIGN(WARPHandler);
42 };
43
44 }  // namespace application
45 }  // namespace xwalk
46
47 #endif  // XWALK_APPLICATION_COMMON_MANIFEST_HANDLERS_WARP_HANDLER_H_