diff options
Diffstat (limited to 'src/3rdparty/webkit/WebCore/page/Page.h')
-rw-r--r-- | src/3rdparty/webkit/WebCore/page/Page.h | 79 |
1 files changed, 37 insertions, 42 deletions
diff --git a/src/3rdparty/webkit/WebCore/page/Page.h b/src/3rdparty/webkit/WebCore/page/Page.h index 4886464..94e6dd5 100644 --- a/src/3rdparty/webkit/WebCore/page/Page.h +++ b/src/3rdparty/webkit/WebCore/page/Page.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/) * * This library is free software; you can redistribute it and/or @@ -21,29 +21,23 @@ #ifndef Page_h #define Page_h -#include "BackForwardList.h" -#include "Chrome.h" -#include "ContextMenuController.h" #include "FrameLoaderTypes.h" -#include "LinkHash.h" #include "PlatformString.h" +#include <wtf/Forward.h> #include <wtf/HashSet.h> -#include <wtf/OwnPtr.h> +#include <wtf/Noncopyable.h> #if PLATFORM(MAC) #include "SchedulePair.h" #endif -#if PLATFORM(WIN) || (PLATFORM(WX) && PLATFORM(WIN_OS)) || (PLATFORM(QT) && defined(Q_WS_WIN)) -typedef struct HINSTANCE__* HINSTANCE; -#endif - namespace JSC { class Debugger; } namespace WebCore { + class BackForwardList; class Chrome; class ChromeClient; class ContextMenuClient; @@ -54,30 +48,36 @@ namespace WebCore { class EditorClient; class FocusController; class Frame; + class GeolocationController; + class GeolocationControllerClient; class HaltablePlugin; + class HistoryItem; class InspectorClient; class InspectorController; class InspectorTimelineAgent; + class MediaCanStartListener; class Node; class PageGroup; class PluginData; class PluginHalter; class PluginHalterClient; - class PluginView; class ProgressTracker; class RenderTheme; class VisibleSelection; class SelectionController; class Settings; + #if ENABLE(DOM_STORAGE) class StorageNamespace; #endif -#if ENABLE(WML) - class WMLPageState; -#endif #if ENABLE(NOTIFICATIONS) class NotificationPresenter; #endif +#if ENABLE(WML) + class WMLPageState; +#endif + + typedef uint64_t LinkHash; enum FindDirection { FindDirectionForward, FindDirectionBackward }; @@ -85,7 +85,7 @@ namespace WebCore { public: static void setNeedsReapplyStyles(); - Page(ChromeClient*, ContextMenuClient*, EditorClient*, DragClient*, InspectorClient*, PluginHalterClient*); + Page(ChromeClient*, ContextMenuClient*, EditorClient*, DragClient*, InspectorClient*, PluginHalterClient*, GeolocationControllerClient*); ~Page(); RenderTheme* theme() const { return m_theme.get(); }; @@ -93,10 +93,10 @@ namespace WebCore { static void refreshPlugins(bool reload); PluginData* pluginData() const; - void setCanStartPlugins(bool); - bool canStartPlugins() const { return m_canStartPlugins; } - void addUnstartedPlugin(PluginView*); - void removeUnstartedPlugin(PluginView*); + void setCanStartMedia(bool); + bool canStartMedia() const { return m_canStartMedia; } + void addMediaCanStartListener(MediaCanStartListener*); + void removeMediaCanStartListener(MediaCanStartListener*); EditorClient* editorClient() const { return m_editorClient; } @@ -129,8 +129,8 @@ namespace WebCore { PageGroup* groupPtr() { return m_group; } // can return 0 void incrementFrameCount() { ++m_frameCount; } - void decrementFrameCount() { --m_frameCount; } - int frameCount() const { return m_frameCount; } + void decrementFrameCount() { ASSERT(m_frameCount); --m_frameCount; } + int frameCount() const { checkFrameCountConsistency(); return m_frameCount; } Chrome* chrome() const { return m_chrome.get(); } SelectionController* dragCaretController() const { return m_dragCaretController.get(); } @@ -144,13 +144,11 @@ namespace WebCore { #if ENABLE(INSPECTOR) InspectorController* inspectorController() const { return m_inspectorController.get(); } #endif +#if ENABLE(CLIENT_BASED_GEOLOCATION) + GeolocationController* geolocationController() const { return m_geolocationController.get(); } +#endif Settings* settings() const { return m_settings.get(); } ProgressTracker* progress() const { return m_progress.get(); } - -#if ENABLE(INSPECTOR) - void setParentInspectorController(InspectorController* controller) { m_parentInspectorController = controller; } - InspectorController* parentInspectorController() const { return m_parentInspectorController; } -#endif void setTabKeyCyclesThroughElements(bool b) { m_tabKeyCyclesThroughElements = b; } bool tabKeyCyclesThroughElements() const { return m_tabKeyCyclesThroughElements; } @@ -190,6 +188,8 @@ namespace WebCore { void userStyleSheetLocationChanged(); const String& userStyleSheet() const; + void privateBrowsingStateChanged(); + void didStartPlugin(HaltablePlugin*); void didStopPlugin(HaltablePlugin*); void pluginAllowedRunTimeChanged(); @@ -198,12 +198,6 @@ namespace WebCore { void setDebugger(JSC::Debugger*); JSC::Debugger* debugger() const { return m_debugger; } -#if PLATFORM(WIN) || (PLATFORM(WX) && PLATFORM(WIN_OS)) || (PLATFORM(QT) && defined(Q_WS_WIN)) - // The global DLL or application instance used for all windows. - static void setInstanceHandle(HINSTANCE instanceHandle) { s_instanceHandle = instanceHandle; } - static HINSTANCE instanceHandle() { return s_instanceHandle; } -#endif - static void removeAllVisitedLinks(); static void allVisitedStateChanged(PageGroup*); @@ -238,6 +232,12 @@ namespace WebCore { private: void initGroup(); +#if ASSERT_DISABLED + void checkFrameCountConsistency() const { } +#else + void checkFrameCountConsistency() const; +#endif + OwnPtr<Chrome> m_chrome; OwnPtr<SelectionController> m_dragCaretController; #if ENABLE(DRAG_SUPPORT) @@ -250,6 +250,9 @@ namespace WebCore { #if ENABLE(INSPECTOR) OwnPtr<InspectorController> m_inspectorController; #endif +#if ENABLE(CLIENT_BASED_GEOLOCATION) + OwnPtr<GeolocationController> m_geolocationController; +#endif OwnPtr<Settings> m_settings; OwnPtr<ProgressTracker> m_progress; @@ -278,10 +281,6 @@ namespace WebCore { bool m_javaScriptURLsAreAllowed; -#if ENABLE(INSPECTOR) - InspectorController* m_parentInspectorController; -#endif - String m_userStyleSheetPath; mutable String m_userStyleSheet; mutable bool m_didLoadUserStyleSheet; @@ -295,8 +294,8 @@ namespace WebCore { double m_customHTMLTokenizerTimeDelay; int m_customHTMLTokenizerChunkSize; - bool m_canStartPlugins; - HashSet<PluginView*> m_unstartedPlugins; + bool m_canStartMedia; + HashSet<MediaCanStartListener*> m_mediaCanStartListeners; OwnPtr<PluginHalter> m_pluginHalter; @@ -304,10 +303,6 @@ namespace WebCore { RefPtr<StorageNamespace> m_sessionStorage; #endif -#if PLATFORM(WIN) || (PLATFORM(WX) && defined(__WXMSW__)) || (PLATFORM(QT) && defined(Q_WS_WIN)) - static HINSTANCE s_instanceHandle; -#endif - #if ENABLE(WML) OwnPtr<WMLPageState> m_wmlPageState; #endif |