summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterwebcontent.cpp
diff options
context:
space:
mode:
authorcallum <none@none>2010-12-14 12:25:10 -0800
committercallum <none@none>2010-12-14 12:25:10 -0800
commit5dcf11ab4bf5903ff75513f037242cba1e3c11ca (patch)
tree6105a4fd9a2c98e4978547feeefd5abf30b39d13 /indra/newview/llfloaterwebcontent.cpp
parent126295523fe2ac9f8df47e9b3080cd9e6d389cc0 (diff)
SOCIAL-373 FIX Media browser does not show https secure icon in address bar when a site is loaded over https
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)
{