diff options
Diffstat (limited to 'indra/newview/llmediactrl.h')
-rw-r--r-- | indra/newview/llmediactrl.h | 73 |
1 files changed, 42 insertions, 31 deletions
diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h index 310492fe02..28666e620f 100644 --- a/indra/newview/llmediactrl.h +++ b/indra/newview/llmediactrl.h @@ -2,31 +2,25 @@ * @file llmediactrl.h * @brief Web browser UI control * - * $LicenseInfo:firstyear=2006&license=viewergpl$ - * - * Copyright (c) 2006-2009, Linden Research, Inc. - * + * $LicenseInfo:firstyear=2006&license=viewerlgpl$ * Second Life Viewer Source Code - * The source code in this file ("Source Code") is provided by Linden Lab - * to you under the terms of the GNU General Public License, version 2.0 - * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and Linden Lab. Terms of - * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * Copyright (C) 2010, Linden Research, Inc. * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ @@ -40,13 +34,15 @@ class LLViewBorder; class LLUICtrlFactory; +class LLContextMenu; //////////////////////////////////////////////////////////////////////////////// // class LLMediaCtrl : public LLPanel, public LLViewerMediaObserver, - public LLViewerMediaEventEmitter + public LLViewerMediaEventEmitter, + public LLInstanceTracker<LLMediaCtrl, LLUUID> { LOG_CLASS(LLMediaCtrl); public: @@ -57,12 +53,18 @@ public: Optional<bool> border_visible, ignore_ui_scale, hide_loading, - decouple_texture_size; + decouple_texture_size, + trusted_content, + focus_on_click; Optional<S32> texture_width, texture_height; Optional<LLUIColor> caret_color; + + Optional<std::string> initial_mime_type; + Optional<std::string> media_id; + Optional<std::string> error_page_url; Params(); }; @@ -90,6 +92,7 @@ public: virtual BOOL handleRightMouseUp(S32 x, S32 y, MASK mask); virtual BOOL handleDoubleClick( S32 x, S32 y, MASK mask ); virtual BOOL handleScrollWheel( S32 x, S32 y, S32 clicks ); + virtual BOOL handleToolTip(S32 x, S32 y, MASK mask); // navigation void navigateTo( std::string url_in, std::string mime_type = ""); @@ -107,15 +110,14 @@ public: // Javascript or some other mechanism. However, we need the search // floater and login page to handle these URLs. Those are safe // because we control the page content. See DEV-9530. JC. - void setTrusted( bool valIn ); - - void setHomePageUrl( const std::string urlIn ); + void setHomePageUrl( const std::string& urlIn, const std::string& mime_type = LLStringUtil::null ); std::string getHomePageUrl(); - // set/clear URL to visit when a 404 page is reached - void set404RedirectUrl( std::string redirect_url ); - void clr404RedirectUrl(); - + void setTarget(const std::string& target); + + void setErrorPageURL(const std::string& url); + const std::string& getErrorPageURL(); + // Clear the browser cache when the instance gets loaded void clearCache(); @@ -144,6 +146,8 @@ public: void setTextureSize(S32 width, S32 height); + void showNotification(boost::shared_ptr<class LLNotification> notify); + void hideNotification(); // over-rides virtual BOOL handleKeyHere( KEY key, MASK mask); @@ -165,15 +169,19 @@ public: private: void onVisibilityChange ( const LLSD& new_visibility ); + void onPopup(const LLSD& notification, const LLSD& response); const S32 mTextureDepthBytes; LLUUID mMediaTextureID; LLViewBorder* mBorder; bool mFrequentUpdates; bool mForceUpdate; - bool mTrusted; + const bool mTrusted; std::string mHomePageUrl; + std::string mHomePageMimeType; std::string mCurrentNavUrl; + std::string mErrorPageURL; + std::string mTarget; bool mIgnoreUIScale; bool mAlwaysRefresh; viewer_media_t mMediaSource; @@ -186,6 +194,9 @@ public: S32 mTextureWidth; S32 mTextureHeight; bool mClearCache; + class LLWindowShade* mWindowShade; + bool mHoverTextChanged; + LLContextMenu* mContextMenu; }; #endif // LL_LLMediaCtrl_H |