1/* 2 * Copyright (C) 2009, 2010, 2011, 2012 Research In Motion Limited. All rights reserved. 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Lesser 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 * Lesser General Public License for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public 15 * License along with this library; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 */ 18 19#ifndef PageClientBlackBerry_h 20#define PageClientBlackBerry_h 21 22#include "Cursor.h" 23#include "WebPageClient.h" 24 25namespace BlackBerry { 26namespace Platform { 27class NetworkStreamFactory; 28namespace Graphics { 29class Window; 30} 31} 32} 33 34namespace WebCore { 35class AuthenticationChallengeClient; 36class Credential; 37class IntRect; 38class IntSize; 39class KURL; 40class PluginView; 41class ProtectionSpace; 42} 43 44class PageClientBlackBerry { 45public: 46 enum SaveCredentialType { 47 SaveCredentialNeverForThisSite = 0, 48 SaveCredentialNotNow, 49 SaveCredentialYes 50 }; 51 52 virtual int playerID() const = 0; 53 virtual void setCursor(WebCore::PlatformCursor) = 0; 54 virtual BlackBerry::Platform::NetworkStreamFactory* networkStreamFactory() = 0; 55 virtual BlackBerry::Platform::Graphics::Window* platformWindow() const = 0; 56 virtual void setPreventsScreenDimming(bool) = 0; 57 virtual void showVirtualKeyboard(bool) = 0; 58 virtual void ensureContentVisible(bool centerInView = true) = 0; 59 virtual void zoomToContentRect(const WebCore::IntRect&) = 0; 60 virtual void registerPlugin(WebCore::PluginView*, bool) = 0; 61 virtual void notifyPageOnLoad() = 0; 62 virtual bool shouldPluginEnterFullScreen(WebCore::PluginView*, const char* uniquePluginPrefix) = 0; 63 virtual void didPluginEnterFullScreen(WebCore::PluginView*, const char* uniquePluginPrefix) = 0; 64 virtual void didPluginExitFullScreen(WebCore::PluginView*, const char* uniquePluginPrefix) = 0; 65 virtual void onPluginStartBackgroundPlay(WebCore::PluginView*, const char* uniquePluginPrefix) = 0; 66 virtual void onPluginStopBackgroundPlay(WebCore::PluginView*, const char* uniquePluginPrefix) = 0; 67 virtual bool lockOrientation(bool landscape) = 0; 68 virtual void unlockOrientation() = 0; 69 virtual int orientation() const = 0; 70 virtual double currentZoomFactor() const = 0; 71 virtual WebCore::IntSize viewportSize() const = 0; 72 virtual int showAlertDialog(BlackBerry::WebKit::WebPageClient::AlertType) = 0; 73 virtual bool isActive() const = 0; 74 virtual bool isVisible() const = 0; 75 virtual void authenticationChallenge(const WebCore::KURL&, const WebCore::ProtectionSpace&, const WebCore::Credential&) = 0; 76 virtual SaveCredentialType notifyShouldSaveCredential(bool) = 0; 77 virtual void syncProxyCredential(const WebCore::Credential&) = 0; 78}; 79 80#endif // PageClientBlackBerry_h 81