summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llfloaterwebcontent.cpp17
-rw-r--r--indra/newview/llfloaterwebcontent.h2
-rw-r--r--indra/newview/skins/default/xui/en/floater_web_content.xml13
3 files changed, 31 insertions, 1 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)
{
diff --git a/indra/newview/llfloaterwebcontent.h b/indra/newview/llfloaterwebcontent.h
index 09b4945b65..4bd10342fa 100644
--- a/indra/newview/llfloaterwebcontent.h
+++ b/indra/newview/llfloaterwebcontent.h
@@ -34,6 +34,7 @@ class LLMediaCtrl;
class LLComboBox;
class LLTextBox;
class LLProgressBar;
+class LLIconCtrl;
class LLFloaterWebContent :
public LLFloater,
@@ -69,6 +70,7 @@ private:
LLMediaCtrl* mWebBrowser;
LLComboBox* mAddressCombo;
+ LLIconCtrl *mSecureLockIcon;
LLTextBox* mStatusBarText;
LLProgressBar* mStatusBarProgress;
std::string mCurrentURL;
diff --git a/indra/newview/skins/default/xui/en/floater_web_content.xml b/indra/newview/skins/default/xui/en/floater_web_content.xml
index 3072ca1b0e..46776d3f7e 100644
--- a/indra/newview/skins/default/xui/en/floater_web_content.xml
+++ b/indra/newview/skins/default/xui/en/floater_web_content.xml
@@ -114,6 +114,17 @@
<combo_box.commit_callback
function="WebContent.EnterAddress" />
</combo_box>
+ <icon
+ name="media_secure_lock_flag"
+ height="16"
+ follows="top|right"
+ image_name="Lock2"
+ layout="topleft"
+ left_delta="656"
+ top_delta="2"
+ visible="false"
+ tool_tip="Secured Browsing"
+ width="16" />
<button
image_overlay="ExternalBrowser_Off"
image_disabled="PushButton_Disabled"
@@ -126,7 +137,7 @@
layout="topleft"
name="popexternal"
right="800"
- top_delta="0"
+ top_delta="-2"
width="22">
<button.commit_callback
function="WebContent.PopExternal" />