Upstream version 8.36.169.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   virtual bool Parse(scoped_refptr<ApplicationData> application,
37                      base::string16* error) OVERRIDE;
38   virtual bool Validate(scoped_refptr<const ApplicationData> application,
39                         std::string* error,
40                         std::vector<InstallWarning>* warnings) const OVERRIDE;
41   virtual std::vector<std::string> Keys() const OVERRIDE;
42
43  private:
44   DISALLOW_COPY_AND_ASSIGN(TizenSplashScreenHandler);
45 };
46
47 }  // namespace application
48 }  // namespace xwalk
49
50 #endif  // XWALK_APPLICATION_COMMON_MANIFEST_HANDLERS_TIZEN_SPLASH_SCREEN_HANDLER_H_