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 #ifndef XWALK_APPLICATION_COMMON_MANIFEST_HANDLERS_TIZEN_SETTING_HANDLER_H_
5 #define XWALK_APPLICATION_COMMON_MANIFEST_HANDLERS_TIZEN_SETTING_HANDLER_H_
11 #include "base/values.h"
12 #include "xwalk/application/common/application_data.h"
13 #include "xwalk/application/common/manifest_handler.h"
16 namespace application {
18 class TizenSettingInfo : public ApplicationData::ManifestData {
21 virtual ~TizenSettingInfo();
23 enum ScreenOrientation {
29 void set_hwkey_enabled(bool enabled) { hwkey_enabled_ = enabled; }
30 bool hwkey_enabled() const { return hwkey_enabled_; }
32 void set_screen_orientation(ScreenOrientation orientation) {
33 screen_orientation_ = orientation;
36 ScreenOrientation screen_orientation() const { return screen_orientation_; }
40 ScreenOrientation screen_orientation_;
43 class TizenSettingHandler : public ManifestHandler {
45 TizenSettingHandler();
46 virtual ~TizenSettingHandler();
48 virtual bool Parse(scoped_refptr<ApplicationData> application,
49 base::string16* error) OVERRIDE;
50 virtual bool Validate(scoped_refptr<const ApplicationData> application,
51 std::string* error) const OVERRIDE;
52 virtual std::vector<std::string> Keys() const OVERRIDE;
55 DISALLOW_COPY_AND_ASSIGN(TizenSettingHandler);
58 } // namespace application
61 #endif // XWALK_APPLICATION_COMMON_MANIFEST_HANDLERS_TIZEN_SETTING_HANDLER_H_