summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterwebcontent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterwebcontent.cpp')
-rw-r--r--indra/newview/llfloaterwebcontent.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp
index d9748b2235..b4fa41e3f4 100644
--- a/indra/newview/llfloaterwebcontent.cpp
+++ b/indra/newview/llfloaterwebcontent.cpp
@@ -27,6 +27,7 @@
#include "llviewerprecompiledheaders.h"
#include "llcombobox.h"
+#include "lliconctrl.h"
#include "llfloaterreg.h"
#include "lllayoutstack.h"
#include "llpluginclassmedia.h"
@@ -63,6 +64,9 @@ BOOL LLFloaterWebContent::postBuild()
getChildView("reload")->setEnabled( true );
getChildView("popexternal")->setEnabled( true );
+ // cache image for secure browsing
+ mSecureLockIcon = getChild< LLIconCtrl >("media_secure_lock_flag");
+
return TRUE;
}
@@ -248,6 +252,19 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent
// we populate the status bar with URLs as they change so clear it now we're done
const std::string end_str = "";
mStatusBarText->setText( end_str );
+
+ // decide if secure browsing icon should be displayed
+ std::string prefix = std::string("https://");
+ std::string test_prefix = mCurrentURL.substr(0, prefix.length());
+ LLStringUtil::toLower(test_prefix);
+ if(test_prefix == prefix)
+ {
+ mSecureLockIcon->setVisible(true);
+ }
+ else
+ {
+ mSecureLockIcon->setVisible(false);
+ }
}
else if(event == MEDIA_EVENT_CLOSE_REQUEST)
{