Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / xwalk / application / common / manifest_handlers / tizen_splash_screen_handler.h
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
5 #ifndef XWALK_APPLICATION_COMMON_MANIFEST_HANDLERS_TIZEN_SPLASH_SCREEN_HANDLER_H_
6 #define XWALK_APPLICATION_COMMON_MANIFEST_HANDLERS_TIZEN_SPLASH_SCREEN_HANDLER_H_
7
8 #include <map>
9 #include <string>
10 #include <vector>
11
12 #include "base/values.h"
13 #include "xwalk/application/common/application_data.h"
14 #include "xwalk/application/common/manifest_handler.h"
15
16 namespace xwalk {
17 namespace application {
18
19 class TizenSplashScreenInfo : public ApplicationData::ManifestData {
20  public:
21   TizenSplashScreenInfo();
22   virtual ~TizenSplashScreenInfo();
23
24   void set_src(const std::string &src) { src_ = src; }
25   const std::string& src() const { return src_; }
26
27  private:
28   std::string src_;
29 };
30
31 class TizenSplashScreenHandler : public ManifestHandler {
32  public:
33   TizenSplashScreenHandler();
34   virtual ~TizenSplashScreenHandler();
35
36   bool Parse(scoped_refptr<ApplicationData> application,
37              base::string16* error) override;
38   bool Validate(scoped_refptr<const ApplicationData> application,
39                 std::string* error) const override;
40   std::vector<std::string> Keys() const override;
41
42  private:
43   DISALLOW_COPY_AND_ASSIGN(TizenSplashScreenHandler);
44 };
45
46 }  // namespace application
47 }  // namespace xwalk
48
49 #endif  // XWALK_APPLICATION_COMMON_MANIFEST_HANDLERS_TIZEN_SPLASH_SCREEN_HANDLER_H_