author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 06 Jul 2010 15:10:48 +0300 | |
changeset 30 | 5dc02b23752f |
parent 0 | 1918ee327afb |
permissions | -rw-r--r-- |
0 | 1 |
/* |
2 |
Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
|
3 |
||
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 |
||
20 |
#ifndef Navigator_h |
|
21 |
#define Navigator_h |
|
22 |
||
23 |
#include "NavigatorBase.h" |
|
24 |
#include <wtf/PassRefPtr.h> |
|
25 |
#include <wtf/RefCounted.h> |
|
26 |
#include <wtf/RefPtr.h> |
|
27 |
||
28 |
namespace WebCore { |
|
29 |
||
30 |
class Frame; |
|
31 |
class Geolocation; |
|
32 |
class MimeTypeArray; |
|
33 |
class PluginData; |
|
34 |
class PluginArray; |
|
35 |
class String; |
|
36 |
||
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
37 |
typedef int ExceptionCode; |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
38 |
|
0 | 39 |
class Navigator : public NavigatorBase, public RefCounted<Navigator> { |
40 |
public: |
|
41 |
static PassRefPtr<Navigator> create(Frame* frame) { return adoptRef(new Navigator(frame)); } |
|
42 |
~Navigator(); |
|
43 |
||
44 |
void disconnectFrame(); |
|
45 |
Frame* frame() const { return m_frame; } |
|
46 |
||
47 |
String appVersion() const; |
|
48 |
String language() const; |
|
49 |
PluginArray* plugins() const; |
|
50 |
MimeTypeArray* mimeTypes() const; |
|
51 |
bool cookieEnabled() const; |
|
52 |
bool javaEnabled() const; |
|
53 |
||
54 |
virtual String userAgent() const; |
|
55 |
||
56 |
Geolocation* geolocation() const; |
|
57 |
// This is used for GC marking. |
|
58 |
Geolocation* optionalGeolocation() const { return m_geolocation.get(); } |
|
59 |
||
60 |
#if ENABLE(DOM_STORAGE) |
|
61 |
// Relinquishes the storage lock, if one exists. |
|
62 |
void getStorageUpdates(); |
|
63 |
#endif |
|
64 |
||
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
65 |
void registerProtocolHandler(const String& scheme, const String& url, const String& title, ExceptionCode& ec); |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
66 |
void registerContentHandler(const String& mimeType, const String& url, const String& title, ExceptionCode& ec); |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
67 |
|
0 | 68 |
private: |
69 |
Navigator(Frame*); |
|
70 |
Frame* m_frame; |
|
71 |
mutable RefPtr<PluginArray> m_plugins; |
|
72 |
mutable RefPtr<MimeTypeArray> m_mimeTypes; |
|
73 |
mutable RefPtr<Geolocation> m_geolocation; |
|
74 |
}; |
|
75 |
||
76 |
} |
|
77 |
||
78 |
#endif |