master
Nicky 2015-09-10 17:57:28 +02:00
commit 87922248a6
6 changed files with 42 additions and 36 deletions

View File

@ -1698,11 +1698,11 @@
<key>archive</key>
<map>
<key>hash</key>
<string>6b727137b63a321298cba87863db2147</string>
<string>23faf62c138f7662e5c79fbe4fdfef90</string>
<key>hash_algorithm</key>
<string>md5</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/llceflib_3p-llceflib/rev/304772/arch/Darwin/installer/llceflib-1.0.1.304772-darwin-304772.tar.bz2</string>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/llceflib_3p-llceflib/rev/304837/arch/Darwin/installer/llceflib-1.0.1.304837-darwin-304837.tar.bz2</string>
</map>
<key>name</key>
<string>darwin</string>
@ -1737,7 +1737,7 @@
</map>
</map>
<key>version</key>
<string>1.0.1.304772</string>
<string>1.0.1.304837</string>
</map>
<key>llphysicsextensions_source</key>
<map>

View File

@ -1131,7 +1131,7 @@ void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message)
{
mClickURL = message.getValue("uri");
mClickTarget = message.getValue("target");
mClickUUID = message.getValue("uuid");
//mClickUUID = message.getValue("uuid");
mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_CLICK_LINK_HREF);
}
else if(message_name == "click_nofollow")

View File

@ -52,7 +52,6 @@ public:
/*virtual*/
void receiveMessage(const char* message_string);
private:
bool init();
@ -63,8 +62,8 @@ private:
void onTitleChangeCallback(std::string title);
void onLoadStartCallback();
void onLoadEndCallback(int httpStatusCode);
void onNavigateURLCallback(std::string url);
void onExternalTargetLinkCallback(std::string url);
void onAddressChangeCallback(std::string url);
void onNavigateURLCallback(std::string url, std::string target);
bool onHTTPAuthCallback(const std::string host, const std::string realm, std::string& username, std::string& password);
void postDebugMessage(const std::string& msg);
@ -157,16 +156,6 @@ void MediaPluginCEF::onPageChangedCallback(unsigned char* pixels, int width, int
}
}
////////////////////////////////////////////////////////////////////////////////
//
void MediaPluginCEF::onCustomSchemeURLCallback(std::string url)
{
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "click_nofollow");
message.setValue("uri", url);
message.setValue("nav_type", "clicked"); // TODO: differentiate between click and navigate to
sendMessage(message);
}
////////////////////////////////////////////////////////////////////////////////
//
void MediaPluginCEF::onConsoleMessageCallback(std::string message, std::string source, int line)
@ -219,7 +208,7 @@ void MediaPluginCEF::onLoadEndCallback(int httpStatusCode)
////////////////////////////////////////////////////////////////////////////////
//
void MediaPluginCEF::onNavigateURLCallback(std::string url)
void MediaPluginCEF::onAddressChangeCallback(std::string url)
{
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "location_changed");
message.setValue("uri", url);
@ -227,10 +216,24 @@ void MediaPluginCEF::onNavigateURLCallback(std::string url)
}
////////////////////////////////////////////////////////////////////////////////
// triggered when user clicks link with "external" attribute
void MediaPluginCEF::onExternalTargetLinkCallback(std::string url)
//
void MediaPluginCEF::onNavigateURLCallback(std::string url, std::string target)
{
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "click_href");
message.setValue("uri", url);
message.setValue("target", target);
message.setValue("uuid", ""); // not used right now
sendMessage(message);
}
////////////////////////////////////////////////////////////////////////////////
//
void MediaPluginCEF::onCustomSchemeURLCallback(std::string url)
{
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "click_nofollow");
message.setValue("uri", url);
message.setValue("nav_type", "clicked"); // TODO: differentiate between click and navigate to
sendMessage(message);
}
////////////////////////////////////////////////////////////////////////////////
@ -354,9 +357,8 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
mLLCEFLib->setOnTitleChangeCallback(boost::bind(&MediaPluginCEF::onTitleChangeCallback, this, _1));
mLLCEFLib->setOnLoadStartCallback(boost::bind(&MediaPluginCEF::onLoadStartCallback, this));
mLLCEFLib->setOnLoadEndCallback(boost::bind(&MediaPluginCEF::onLoadEndCallback, this, _1));
mLLCEFLib->setOnNavigateURLCallback(boost::bind(&MediaPluginCEF::onNavigateURLCallback, this, _1));
mLLCEFLib->setOnNavigateURLCallback(boost::bind(&MediaPluginCEF::onNavigateURLCallback, this, _1, _2));
mLLCEFLib->setOnHTTPAuthCallback(boost::bind(&MediaPluginCEF::onHTTPAuthCallback, this, _1, _2, _3, _4));
mLLCEFLib->setOnExternalTargetLinkCallback(boost::bind(&MediaPluginCEF::onExternalTargetLinkCallback, this, _1));
LLCEFLibSettings settings;
settings.inital_width = 1024;

View File

@ -1012,19 +1012,23 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event)
std::string target = self->getClickTarget();
std::string uuid = self->getClickUUID();
LLNotification::Params notify_params;
notify_params.name = "PopupAttempt";
notify_params.payload = LLSD().with("target", target).with("url", url).with("uuid", uuid).with("media_id", mMediaTextureID);
notify_params.functor.function = boost::bind(&LLMediaCtrl::onPopup, this, _1, _2);
LLWeb::loadURL(url, target, std::string());
if (mTrusted)
{
LLNotifications::instance().forceResponse(notify_params, 0);
}
else
{
LLNotifications::instance().add(notify_params);
}
// CP: removing this code because we no longer support popups so this breaks the flow.
// replaced with a bare call to LLWeb::LoadURL(...)
//LLNotification::Params notify_params;
//notify_params.name = "PopupAttempt";
//notify_params.payload = LLSD().with("target", target).with("url", url).with("uuid", uuid).with("media_id", mMediaTextureID);
//notify_params.functor.function = boost::bind(&LLMediaCtrl::onPopup, this, _1, _2);
//if (mTrusted)
//{
// LLNotifications::instance().forceResponse(notify_params, 0);
//}
//else
//{
// LLNotifications::instance().add(notify_params);
//}
break;
};

View File

@ -266,7 +266,7 @@
name="Web Content Floater Debug Test">
<menu_item_call.on_click
function="Advanced.WebContentTest"
parameter="http://google.com"/>
parameter="https://callum-linden.s3.amazonaws.com/ceftests.html"/>
</menu_item_call>
<menu
create_jump_keys="true"

View File

@ -4190,7 +4190,7 @@
shortcut="control|shift|Z">
<menu_item_call.on_click
function="Advanced.WebContentTest"
parameter="http://google.com"/>
parameter="https://callum-linden.s3.amazonaws.com/ceftests.html"/>
</menu_item_call>
<menu_item_call
label="FB Connect Test"