blob: 78d9e06bee7ffc1cc882eb1fbd1eb8626c03d605 [file] [log] [blame]
hausmann@webkit.org9999bb82008-03-10 11:52:27 +00001/*
hausmann@webkit.orgf6964472008-09-29 12:47:08 +00002 Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
hausmann@webkit.org9999bb82008-03-10 11:52:27 +00003
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
18*/
19
darin@apple.com6bfe1122016-10-21 18:32:04 +000020#pragma once
hausmann@webkit.org9999bb82008-03-10 11:52:27 +000021
abarth@webkit.org84fe60e2012-01-07 08:46:38 +000022#include "DOMWindowProperty.h"
ap@webkit.orgbf13f522008-12-09 17:58:10 +000023#include "NavigatorBase.h"
abarth@webkit.org4fcde892012-11-12 05:30:54 +000024#include "ScriptWrappable.h"
abarth@webkit.org692424b2012-02-27 06:33:45 +000025#include "Supplementable.h"
hausmann@webkit.org9999bb82008-03-10 11:52:27 +000026
27namespace WebCore {
28
cfleizach@apple.comaed49292010-07-30 21:13:51 +000029class DOMMimeTypeArray;
30class DOMPluginArray;
hausmann@webkit.org9999bb82008-03-10 11:52:27 +000031
darin@apple.com6bfe1122016-10-21 18:32:04 +000032class Navigator final : public NavigatorBase, public ScriptWrappable, public DOMWindowProperty, public Supplementable<Navigator> {
cfleizach@apple.comaed49292010-07-30 21:13:51 +000033public:
darin@apple.com6bfe1122016-10-21 18:32:04 +000034 static Ref<Navigator> create(Frame& frame) { return adoptRef(*new Navigator(frame)); }
cfleizach@apple.comaed49292010-07-30 21:13:51 +000035 virtual ~Navigator();
hausmann@webkit.org9999bb82008-03-10 11:52:27 +000036
cfleizach@apple.comaed49292010-07-30 21:13:51 +000037 String appVersion() const;
darin@apple.com6bfe1122016-10-21 18:32:04 +000038 DOMPluginArray& plugins();
39 DOMMimeTypeArray& mimeTypes();
cfleizach@apple.comaed49292010-07-30 21:13:51 +000040 bool cookieEnabled() const;
41 bool javaEnabled() const;
darin@apple.com6bfe1122016-10-21 18:32:04 +000042 String userAgent() const final;
ap@webkit.orgbf13f522008-12-09 17:58:10 +000043
dbates@webkit.org4da1af82013-12-27 20:40:28 +000044#if PLATFORM(IOS)
45 bool standalone() const;
46#endif
47
cfleizach@apple.comaed49292010-07-30 21:13:51 +000048 void getStorageUpdates();
jorlow@chromium.org8da60312009-08-17 23:28:38 +000049
cfleizach@apple.comaed49292010-07-30 21:13:51 +000050private:
darin@apple.com6bfe1122016-10-21 18:32:04 +000051 explicit Navigator(Frame&);
abarth@webkit.org84fe60e2012-01-07 08:46:38 +000052
cfleizach@apple.comaed49292010-07-30 21:13:51 +000053 mutable RefPtr<DOMPluginArray> m_plugins;
54 mutable RefPtr<DOMMimeTypeArray> m_mimeTypes;
cfleizach@apple.comaed49292010-07-30 21:13:51 +000055};
hausmann@webkit.org9999bb82008-03-10 11:52:27 +000056
57}