2 * Copyright (C) 2012 Samsung Electronics
3 * Copyright (C) 2012 Intel Corporation. All rights reserved.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
14 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
15 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
16 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
18 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
24 * THE POSSIBILITY OF SUCH DAMAGE.
27 #ifndef ewk_settings_private_h
28 #define ewk_settings_private_h
30 #include <wtf/PassOwnPtr.h>
33 #include "WKEinaSharedString.h"
42 * \struct Ewk_Settings
43 * @brief Contains the settings data.
47 static PassOwnPtr<Ewk_Settings> create(EwkViewImpl* viewImpl)
49 return adoptPtr(new Ewk_Settings(viewImpl));
52 const WebKit::WebPreferences* preferences() const;
53 WebKit::WebPreferences* preferences();
56 const char* defaultTextEncoding() const { return m_defaultTextEncoding; }
57 void setDefaultTextEncoding(const char*);
58 #if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
59 bool autofillPasswordForm() const { return m_autofillPasswordForm; }
60 void setAutofillPasswordForm(bool);
61 bool formCandidateData() const { return m_formCandidateData; }
62 void setFormCandidateData(bool);
64 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
65 bool textSelectionEnabled() const { return m_textSelectionEnabled; }
66 void setTextSelectionEnabled(bool enable) { m_textSelectionEnabled = enable; }
67 bool autoClearTextSelection() const { return m_autoClearTextSelection; }
68 void setAutoClearTextSelection(bool enable) { m_autoClearTextSelection = enable; }
73 explicit Ewk_Settings(EwkViewImpl* viewImpl)
74 : m_viewImpl(viewImpl)
76 #if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
77 , m_autofillPasswordForm(false)
78 , m_formCandidateData(false)
80 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
81 , m_textSelectionEnabled(true)
82 , m_autoClearTextSelection(true)
89 EwkViewImpl* m_viewImpl;
92 WKEinaSharedString m_defaultTextEncoding;
93 #if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
94 bool m_autofillPasswordForm;
95 bool m_formCandidateData;
97 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
98 bool m_textSelectionEnabled;
99 bool m_autoClearTextSelection;
104 #endif // ewk_settings_private_h