18e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project/* 28e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 38e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 48e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project This library is free software; you can redistribute it and/or 58e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project modify it under the terms of the GNU Library General Public 68e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project License as published by the Free Software Foundation; either 78e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project version 2 of the License, or (at your option) any later version. 88e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 98e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project This library is distributed in the hope that it will be useful, 108e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project but WITHOUT ANY WARRANTY; without even the implied warranty of 118e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 128e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project Library General Public License for more details. 138e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 148e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project You should have received a copy of the GNU Library General Public License 158e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project along with this library; see the file COPYING.LIB. If not, write to 168e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 178e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project Boston, MA 02110-1301, USA. 188e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project*/ 198e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 208e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#ifndef Navigator_h 218e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#define Navigator_h 228e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 23635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project#include "NavigatorBase.h" 249fed475722a5da7e9fac4d78715b17ca5ed29335Andrei Popescu#include "PlatformString.h" 258e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#include <wtf/PassRefPtr.h> 268e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#include <wtf/RefCounted.h> 278e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#include <wtf/RefPtr.h> 288e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 298e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectnamespace WebCore { 308e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 318e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project class Frame; 328e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project class Geolocation; 338e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project class MimeTypeArray; 348e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project class PluginData; 358e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project class PluginArray; 36151150803320bb522017b71c36e1855764d640f8Andrei Popescu#if PLATFORM(ANDROID) 37151150803320bb522017b71c36e1855764d640f8Andrei Popescu class ApplicationInstalledCallback; 38151150803320bb522017b71c36e1855764d640f8Andrei Popescu class Connection; 39151150803320bb522017b71c36e1855764d640f8Andrei Popescu#endif 40151150803320bb522017b71c36e1855764d640f8Andrei Popescu 418e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 42643ca7872b450ea4efacab6188849e5aac2ba161Steve Block typedef int ExceptionCode; 43643ca7872b450ea4efacab6188849e5aac2ba161Steve Block 44635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project class Navigator : public NavigatorBase, public RefCounted<Navigator> { 458e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project public: 468e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project static PassRefPtr<Navigator> create(Frame* frame) { return adoptRef(new Navigator(frame)); } 478e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project ~Navigator(); 488e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 498e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void disconnectFrame(); 508e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project Frame* frame() const { return m_frame; } 518e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 528e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project String appVersion() const; 538e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project String language() const; 548e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project PluginArray* plugins() const; 558e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project MimeTypeArray* mimeTypes() const; 568e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project bool cookieEnabled() const; 578e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project bool javaEnabled() const; 588e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 59635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project virtual String userAgent() const; 60635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project 618e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project Geolocation* geolocation() const; 628e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project // This is used for GC marking. 638e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project Geolocation* optionalGeolocation() const { return m_geolocation.get(); } 648e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 65488dcd54e257a3a18d92e5ec1897511dfb05482cAndrei Popescu#if PLATFORM(ANDROID) 66488dcd54e257a3a18d92e5ec1897511dfb05482cAndrei Popescu Connection* connection() const; 67488dcd54e257a3a18d92e5ec1897511dfb05482cAndrei Popescu#endif 68488dcd54e257a3a18d92e5ec1897511dfb05482cAndrei Popescu 69151150803320bb522017b71c36e1855764d640f8Andrei Popescu#if PLATFORM(ANDROID) && ENABLE(APPLICATION_INSTALLED) 709fed475722a5da7e9fac4d78715b17ca5ed29335Andrei Popescu bool isApplicationInstalled(const String& name, PassRefPtr<ApplicationInstalledCallback> callback); 719fed475722a5da7e9fac4d78715b17ca5ed29335Andrei Popescu void onPackageResult(); 72151150803320bb522017b71c36e1855764d640f8Andrei Popescu#endif 73151150803320bb522017b71c36e1855764d640f8Andrei Popescu 74231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block#if ENABLE(DOM_STORAGE) 75231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block // Relinquishes the storage lock, if one exists. 76231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block void getStorageUpdates(); 77231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block#endif 78231d4e3152a9c27a73b6ac7badbe6be673aa3ddfSteve Block 79643ca7872b450ea4efacab6188849e5aac2ba161Steve Block void registerProtocolHandler(const String& scheme, const String& url, const String& title, ExceptionCode& ec); 80643ca7872b450ea4efacab6188849e5aac2ba161Steve Block void registerContentHandler(const String& mimeType, const String& url, const String& title, ExceptionCode& ec); 81643ca7872b450ea4efacab6188849e5aac2ba161Steve Block 828e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project private: 838e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project Navigator(Frame*); 848e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project Frame* m_frame; 858e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project mutable RefPtr<PluginArray> m_plugins; 868e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project mutable RefPtr<MimeTypeArray> m_mimeTypes; 878e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project mutable RefPtr<Geolocation> m_geolocation; 88488dcd54e257a3a18d92e5ec1897511dfb05482cAndrei Popescu#if PLATFORM(ANDROID) 89488dcd54e257a3a18d92e5ec1897511dfb05482cAndrei Popescu mutable RefPtr<Connection> m_connection; 90488dcd54e257a3a18d92e5ec1897511dfb05482cAndrei Popescu#endif 919fed475722a5da7e9fac4d78715b17ca5ed29335Andrei Popescu 929fed475722a5da7e9fac4d78715b17ca5ed29335Andrei Popescu#if PLATFORM(ANDROID) && ENABLE(APPLICATION_INSTALLED) 939fed475722a5da7e9fac4d78715b17ca5ed29335Andrei Popescu RefPtr<ApplicationInstalledCallback> m_applicationInstalledCallback; 949fed475722a5da7e9fac4d78715b17ca5ed29335Andrei Popescu String m_applicationNameQuery; 959fed475722a5da7e9fac4d78715b17ca5ed29335Andrei Popescu#endif 968e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project }; 978e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 988e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project} 998e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1008e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#endif 101