diff --git a/modules/juce_gui_extra/juce_gui_extra.cpp b/modules/juce_gui_extra/juce_gui_extra.cpp index 6491e0ef95..ad68d2f337 100644 --- a/modules/juce_gui_extra/juce_gui_extra.cpp +++ b/modules/juce_gui_extra/juce_gui_extra.cpp @@ -184,14 +184,3 @@ #include "native/juce_android_WebBrowserComponent.cpp" #endif #endif - -#if JUCE_WEB_BROWSER -namespace juce -{ - bool WebBrowserComponent::pageAboutToLoad (const String&) { return true; } - void WebBrowserComponent::pageFinishedLoading (const String&) {} - bool WebBrowserComponent::pageLoadHadNetworkError (const String&) { return true; } - void WebBrowserComponent::windowCloseRequest() {} - void WebBrowserComponent::newWindowAttemptingToLoad (const String&) {} -} -#endif diff --git a/modules/juce_gui_extra/juce_gui_extra.h b/modules/juce_gui_extra/juce_gui_extra.h index 3d712e51b6..ebeb6a310a 100644 --- a/modules/juce_gui_extra/juce_gui_extra.h +++ b/modules/juce_gui_extra/juce_gui_extra.h @@ -50,7 +50,7 @@ //============================================================================== /** Config: JUCE_WEB_BROWSER - This lets you disable the WebBrowserComponent class (Mac, Windows, and Linux). + This lets you disable the WebBrowserComponent class. If you're not using any embedded web-pages, turning this off may reduce your code size. */ #ifndef JUCE_WEB_BROWSER diff --git a/modules/juce_gui_extra/misc/juce_WebBrowserComponent.h b/modules/juce_gui_extra/misc/juce_WebBrowserComponent.h index f83250610d..f72d618bfd 100644 --- a/modules/juce_gui_extra/misc/juce_WebBrowserComponent.h +++ b/modules/juce_gui_extra/misc/juce_WebBrowserComponent.h @@ -32,7 +32,7 @@ namespace juce @tags{GUI} */ -class JUCE_API WebBrowserComponent : public Component +class JUCE_API WebBrowserComponent : public Component { public: //============================================================================== @@ -88,10 +88,10 @@ public: tries to go to a particular URL. To allow the operation to carry on, return true, or return false to stop the navigation happening. */ - virtual bool pageAboutToLoad (const String& newURL); + virtual bool pageAboutToLoad (const String& newURL) { ignoreUnused (newURL); return true; } /** This callback happens when the browser has finished loading a page. */ - virtual void pageFinishedLoading (const String& url); + virtual void pageFinishedLoading (const String& url) { ignoreUnused (url); } /** This callback happens when a network error was encountered while trying to load a page. @@ -103,18 +103,18 @@ public: The errorInfo contains some platform dependent string describing the error. */ - virtual bool pageLoadHadNetworkError (const String& errorInfo); + virtual bool pageLoadHadNetworkError (const String& errorInfo) { ignoreUnused (errorInfo); return true; } /** This callback occurs when a script or other activity in the browser asks for the window to be closed. */ - virtual void windowCloseRequest(); + virtual void windowCloseRequest() {} /** This callback occurs when the browser attempts to load a URL in a new window. This won't actually load the window but gives you a chance to either launch a new window yourself or just load the URL into the current window with goToURL(). */ - virtual void newWindowAttemptingToLoad (const String& newURL); + virtual void newWindowAttemptingToLoad (const String& newURL) { ignoreUnused (newURL); } //============================================================================== /** @internal */ @@ -127,8 +127,10 @@ public: void visibilityChanged() override; /** @internal */ void focusGained (FocusChangeType) override; + /** @internal */ class Pimpl; + private: //============================================================================== std::unique_ptr browser; @@ -143,7 +145,6 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WebBrowserComponent) }; - #endif } // namespace juce