#ifndef Settings_h
#define Settings_h
#include "SettingsMacros.h"
#include "core/editing/EditingBehaviorTypes.h"
#include "core/frame/SettingsDelegate.h"
#include "platform/Timer.h"
#include "platform/fonts/GenericFontFamilySettings.h"
#include "platform/geometry/IntSize.h"
#include "platform/weborigin/KURL.h"
#include "wtf/HashSet.h"
#include "wtf/RefCounted.h"
namespace WebCore {
enum EditableLinkBehavior {
EditableLinkDefaultBehavior,
EditableLinkAlwaysLive,
EditableLinkOnlyLiveWithShiftKey,
EditableLinkLiveWhenNotFocused,
EditableLinkNeverLive
};
class Settings {
WTF_MAKE_NONCOPYABLE(Settings); WTF_MAKE_FAST_ALLOCATED;
public:
static PassOwnPtr<Settings> create();
GenericFontFamilySettings& genericFontFamilySettings() { return m_genericFontFamilySettings; }
void notifyGenericFontFamilyChange() { invalidate(SettingsDelegate::FontFamilyChange); }
void setTextAutosizingEnabled(bool);
bool textAutosizingEnabled() const { return m_textAutosizingEnabled; }
void setTextAutosizingWindowSizeOverride(const IntSize&);
const IntSize& textAutosizingWindowSizeOverride() const { return m_textAutosizingWindowSizeOverride; }
SETTINGS_GETTERS_AND_SETTERS
static void setMockScrollbarsEnabled(bool flag);
static bool mockScrollbarsEnabled();
void setOpenGLMultisamplingEnabled(bool flag);
bool openGLMultisamplingEnabled() { return m_openGLMultisamplingEnabled; }
void setDelegate(SettingsDelegate*);
private:
Settings();
void invalidate(SettingsDelegate::ChangeType);
SettingsDelegate* m_delegate;
GenericFontFamilySettings m_genericFontFamilySettings;
bool m_openGLMultisamplingEnabled : 1;
IntSize m_textAutosizingWindowSizeOverride;
bool m_textAutosizingEnabled : 1;
SETTINGS_MEMBER_VARIABLES
};
}
#endif