diff --git a/autobuild.xml b/autobuild.xml
index d43e3168256e83459fe82a8dabd3426180bb26f8..13ec9c0f6bd7071a83e011d5c01a9b6b0daca3a1 100755
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -1644,11 +1644,11 @@
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>bb6eda4480a04068e76a1d14c908e591</string>
+              <string>f80eb840c1924e3727fff65246f01c12</string>
               <key>hash_algorithm</key>
               <string>md5</string>
               <key>url</key>
-              <string>https://callum-linden.s3.amazonaws.com/cef-3.2272.2035.80000-windows-800000.tar.bz2</string>
+              <string>https://callum-linden.s3.amazonaws.com/cef-3.2272.2035.888888-windows-888888.tar.bz2</string>
             </map>
             <key>name</key>
             <string>windows</string>
diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake
index 84cfaac0741804eabbe58410f895acd3b8548e81..682aeea6b9aee941dc2ede499538829bb07060b9 100644
--- a/indra/cmake/CEFPlugin.cmake
+++ b/indra/cmake/CEFPlugin.cmake
@@ -13,6 +13,11 @@ else (USESYSTEMLIBS)
 endif (USESYSTEMLIBS)
 
 if (WINDOWS)
+    set(CEF_PLUGIN_LIBRARIES
+        libcef.lib
+        libcef_dll_wrapper.lib
+        llceflib.lib
+    )
 elseif (DARWIN)
 elseif (LINUX)
 endif (WINDOWS)
diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp
index ada297373a844ced2ba58f2a514ae6431c845ac0..7f0f40bcaa83a832e2e5222a079ca6223b1f81b4 100644
--- a/indra/media_plugins/cef/media_plugin_cef.cpp
+++ b/indra/media_plugins/cef/media_plugin_cef.cpp
@@ -34,380 +34,282 @@
 #include "llpluginmessageclasses.h"
 #include "media_plugin_base.h"
 
+#include <functional>
+#include "llCEFLib.h"
+
 #include <time.h>
 
 ////////////////////////////////////////////////////////////////////////////////
 //
 class MediaPluginCEF :
-        public MediaPluginBase
+	public MediaPluginBase
 {
-    public:
-        MediaPluginCEF( LLPluginInstance::sendMessageFunction host_send_func, void *host_user_data );
-        ~MediaPluginCEF();
-
-        /*virtual*/ void receiveMessage( const char* message_string );
-
-    private:
-        bool init();
-        void update( F64 milliseconds );
-        void write_pixel( int x, int y, unsigned char r, unsigned char g, unsigned char b );
-        bool mFirstTime;
-
-        time_t mLastUpdateTime;
-        enum Constants { ENumObjects = 10 };
-        unsigned char* mBackgroundPixels;
-        int mColorR[ ENumObjects ];
-        int mColorG[ ENumObjects ];
-        int mColorB[ ENumObjects ];
-        int mXpos[ ENumObjects ];
-        int mYpos[ ENumObjects ];
-        int mXInc[ ENumObjects ];
-        int mYInc[ ENumObjects ];
-        int mBlockSize[ ENumObjects ];
-        bool mMouseButtonDown;
-        bool mStopAction;
+public:
+	MediaPluginCEF(LLPluginInstance::sendMessageFunction host_send_func, void *host_user_data);
+	~MediaPluginCEF();
+
+	/*virtual*/ void receiveMessage(const char* message_string);
+
+private:
+	bool init();
+	void update(F64 milliseconds);
+	bool mFirstTime;
+
+    // TODO FIX ME
+	void pageChangedCallback(unsigned char* pixels, int width, int height)
+	{
+		if (mPixels && pixels)
+		{
+			memcpy(mPixels, pixels, width * height * mDepth);
+			setDirty(0, 0, mWidth, mHeight);
+		}
+	}
+
+	void MediaPluginCEF::postDebugMessage(const std::string& msg);
+
+	bool mEnableMediaPluginDebugging;
+	LLCEFLib* mLLCEFLib;
 };
 
 ////////////////////////////////////////////////////////////////////////////////
 //
-MediaPluginCEF::MediaPluginCEF( LLPluginInstance::sendMessageFunction host_send_func, void *host_user_data ) :
-    MediaPluginBase( host_send_func, host_user_data )
+MediaPluginCEF::MediaPluginCEF(LLPluginInstance::sendMessageFunction host_send_func, void *host_user_data) :
+MediaPluginBase(host_send_func, host_user_data)
 {
-    mFirstTime = true;
-    mWidth = 0;
-    mHeight = 0;
-    mDepth = 4;
-    mPixels = 0;
-    mMouseButtonDown = false;
-    mStopAction = false;
-    mLastUpdateTime = 0;
-	mBackgroundPixels = 0;
+	mWidth = 0;
+	mHeight = 0;
+	mDepth = 4;
+	mPixels = 0;
+	mEnableMediaPluginDebugging = false;
+
+	mLLCEFLib = new LLCEFLib();
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 //
 MediaPluginCEF::~MediaPluginCEF()
 {
+	mLLCEFLib->reset();
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 //
-void MediaPluginCEF::receiveMessage( const char* message_string )
+void MediaPluginCEF::postDebugMessage(const std::string& msg)
 {
-//  std::cerr << "MediaPluginWebKit::receiveMessage: received message: \"" << message_string << "\"" << std::endl;
-    LLPluginMessage message_in;
-
-    if(message_in.parse(message_string) >= 0)
-    {
-        std::string message_class = message_in.getClass();
-        std::string message_name = message_in.getName();
-        if(message_class == LLPLUGIN_MESSAGE_CLASS_BASE)
-        {
-            if(message_name == "init")
-            {
-                LLPluginMessage message("base", "init_response");
-                LLSD versions = LLSD::emptyMap();
-                versions[LLPLUGIN_MESSAGE_CLASS_BASE] = LLPLUGIN_MESSAGE_CLASS_BASE_VERSION;
-                versions[LLPLUGIN_MESSAGE_CLASS_MEDIA] = LLPLUGIN_MESSAGE_CLASS_MEDIA_VERSION;
-                versions[LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER] = LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER_VERSION;
-                message.setValueLLSD("versions", versions);
-
-                std::string plugin_version = "CEF plugin 1.0..0";
-                message.setValue("plugin_version", plugin_version);
-                sendMessage(message);
-            }
-            else if(message_name == "idle")
-            {
-                // no response is necessary here.
-                F64 time = message_in.getValueReal("time");
-
-                // Convert time to milliseconds for update()
-                update((int)(time * 1000.0f));
-            }
-            else if(message_name == "cleanup")
-            {
-            }
-            else if(message_name == "shm_added")
-            {
-                SharedSegmentInfo info;
-                info.mAddress = message_in.getValuePointer("address");
-                info.mSize = (size_t)message_in.getValueS32("size");
-                std::string name = message_in.getValue("name");
-
-                mSharedSegments.insert(SharedSegmentMap::value_type(name, info));
-
-            }
-            else if(message_name == "shm_remove")
-            {
-                std::string name = message_in.getValue("name");
-
-                SharedSegmentMap::iterator iter = mSharedSegments.find(name);
-                if(iter != mSharedSegments.end())
-                {
-                    if(mPixels == iter->second.mAddress)
-                    {
-                        // This is the currently active pixel buffer.  Make sure we stop drawing to it.
-                        mPixels = NULL;
-                        mTextureSegmentName.clear();
-                    }
-                    mSharedSegments.erase(iter);
-                }
-                else
-                {
-//                  std::cerr << "MediaPluginWebKit::receiveMessage: unknown shared memory region!" << std::endl;
-                }
-
-                // Send the response so it can be cleaned up.
-                LLPluginMessage message("base", "shm_remove_response");
-                message.setValue("name", name);
-                sendMessage(message);
-            }
-            else
-            {
-//              std::cerr << "MediaPluginWebKit::receiveMessage: unknown base message: " << message_name << std::endl;
-            }
-        }
-        else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA)
-        {
-            if(message_name == "init")
-            {
-                // Plugin gets to decide the texture parameters to use.
-                mDepth = 4;
-                LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "texture_params");
-                message.setValueS32("default_width", 1024);
-                message.setValueS32("default_height", 1024);
-                message.setValueS32("depth", mDepth);
-                message.setValueU32("internalformat", GL_RGB);
-                message.setValueU32("format", GL_RGBA);
-                message.setValueU32("type", GL_UNSIGNED_BYTE);
-                message.setValueBoolean("coords_opengl", true);
-                sendMessage(message);
-            }
-            else if(message_name == "size_change")
-            {
-                std::string name = message_in.getValue("name");
-                S32 width = message_in.getValueS32("width");
-                S32 height = message_in.getValueS32("height");
-                S32 texture_width = message_in.getValueS32("texture_width");
-                S32 texture_height = message_in.getValueS32("texture_height");
-
-                if(!name.empty())
-                {
-                    // Find the shared memory region with this name
-                    SharedSegmentMap::iterator iter = mSharedSegments.find(name);
-                    if(iter != mSharedSegments.end())
-                    {
-                        mPixels = (unsigned char*)iter->second.mAddress;
-                        mWidth = width;
-                        mHeight = height;
-
-                        mTextureWidth = texture_width;
-                        mTextureHeight = texture_height;
-                    };
-                };
-
-                LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "size_change_response");
-                message.setValue("name", name);
-                message.setValueS32("width", width);
-                message.setValueS32("height", height);
-                message.setValueS32("texture_width", texture_width);
-                message.setValueS32("texture_height", texture_height);
-                sendMessage(message);
-
-            }
-            else if(message_name == "load_uri")
-            {
-            }
-            else if(message_name == "mouse_event")
-            {
-                std::string event = message_in.getValue("event");
-                if(event == "down")
-                {
-
-                }
-                else if(event == "up")
-                {
-                }
-                else if(event == "double_click")
-                {
-                }
-            }
-        }
-        else
-        {
-//          std::cerr << "MediaPluginWebKit::receiveMessage: unknown message class: " << message_class << std::endl;
-        };
-    }
+	if (mEnableMediaPluginDebugging)
+	{
+		std::stringstream str;
+		str << "@Media Msg> " << msg;
+
+		LLPluginMessage debug_message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "debug_message");
+		debug_message.setValue("message_text", str.str());
+		debug_message.setValue("message_level", "info");
+		sendMessage(debug_message);
+	}
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 //
-void MediaPluginCEF::write_pixel( int x, int y, unsigned char r, unsigned char g, unsigned char b )
+void MediaPluginCEF::receiveMessage(const char* message_string)
 {
-    // make sure we don't write outside the buffer
-    if ( ( x < 0 ) || ( x >= mWidth ) || ( y < 0 ) || ( y >= mHeight ) )
-        return;
-
-    if ( mBackgroundPixels != NULL )
-    {
-        unsigned char *pixel = mBackgroundPixels;
-        pixel += y * mWidth * mDepth;
-        pixel += ( x * mDepth );
-        pixel[ 0 ] = b;
-        pixel[ 1 ] = g;
-        pixel[ 2 ] = r;
-
-        setDirty( x, y, x + 1, y + 1 );
-    };
+	//  std::cerr << "MediaPluginWebKit::receiveMessage: received message: \"" << message_string << "\"" << std::endl;
+	LLPluginMessage message_in;
+
+	if (message_in.parse(message_string) >= 0)
+	{
+		std::string message_class = message_in.getClass();
+		std::string message_name = message_in.getName();
+		if (message_class == LLPLUGIN_MESSAGE_CLASS_BASE)
+		{
+			if (message_name == "init")
+			{
+				LLPluginMessage message("base", "init_response");
+				LLSD versions = LLSD::emptyMap();
+				versions[LLPLUGIN_MESSAGE_CLASS_BASE] = LLPLUGIN_MESSAGE_CLASS_BASE_VERSION;
+				versions[LLPLUGIN_MESSAGE_CLASS_MEDIA] = LLPLUGIN_MESSAGE_CLASS_MEDIA_VERSION;
+				versions[LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER] = LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER_VERSION;
+				message.setValueLLSD("versions", versions);
+
+				std::string plugin_version = "Example plugin 1.0..0";
+				message.setValue("plugin_version", plugin_version);
+				sendMessage(message);
+			}
+			else if (message_name == "idle")
+			{
+				mLLCEFLib->update();
+			}
+			else if (message_name == "cleanup")
+			{
+			}
+			else if (message_name == "shm_added")
+			{
+				SharedSegmentInfo info;
+				info.mAddress = message_in.getValuePointer("address");
+				info.mSize = (size_t)message_in.getValueS32("size");
+				std::string name = message_in.getValue("name");
+
+				mSharedSegments.insert(SharedSegmentMap::value_type(name, info));
+
+			}
+			else if (message_name == "shm_remove")
+			{
+				std::string name = message_in.getValue("name");
+
+				SharedSegmentMap::iterator iter = mSharedSegments.find(name);
+				if (iter != mSharedSegments.end())
+				{
+					if (mPixels == iter->second.mAddress)
+					{
+						// This is the currently active pixel buffer.  Make sure we stop drawing to it.
+						mPixels = NULL;
+						mTextureSegmentName.clear();
+					}
+					mSharedSegments.erase(iter);
+				}
+				else
+				{
+					//                  std::cerr << "MediaPluginWebKit::receiveMessage: unknown shared memory region!" << std::endl;
+				}
+
+				// Send the response so it can be cleaned up.
+				LLPluginMessage message("base", "shm_remove_response");
+				message.setValue("name", name);
+				sendMessage(message);
+			}
+			else
+			{
+				//              std::cerr << "MediaPluginWebKit::receiveMessage: unknown base message: " << message_name << std::endl;
+			}
+		}
+		else if (message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA)
+		{
+			if (message_name == "init")
+			{
+
+				mLLCEFLib->setPageChangedCallback(std::bind(&MediaPluginCEF::pageChangedCallback, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
+
+				bool result = mLLCEFLib->init(1024, 1024);
+				if (!result)
+				{
+					MessageBoxA(0, "FAIL INIT", 0, 0);
+				}
+
+				// Plugin gets to decide the texture parameters to use.
+				mDepth = 4;
+				LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "texture_params");
+				message.setValueS32("default_width", 1024);
+				message.setValueS32("default_height", 1024);
+				message.setValueS32("depth", mDepth);
+				message.setValueU32("internalformat", GL_RGB);
+				message.setValueU32("format", GL_BGRA);
+				message.setValueU32("type", GL_UNSIGNED_BYTE);
+				message.setValueBoolean("coords_opengl", false);
+				sendMessage(message);
+			}
+			else if (message_name == "size_change")
+			{
+				std::string name = message_in.getValue("name");
+				S32 width = message_in.getValueS32("width");
+				S32 height = message_in.getValueS32("height");
+				S32 texture_width = message_in.getValueS32("texture_width");
+				S32 texture_height = message_in.getValueS32("texture_height");
+
+				if (!name.empty())
+				{
+					// Find the shared memory region with this name
+					SharedSegmentMap::iterator iter = mSharedSegments.find(name);
+					if (iter != mSharedSegments.end())
+					{
+						mPixels = (unsigned char*)iter->second.mAddress;
+						mWidth = width;
+						mHeight = height;
+
+						mTextureWidth = texture_width;
+						mTextureHeight = texture_height;
+					};
+				};
+
+				mLLCEFLib->setSize(mWidth, mHeight);
+
+				LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "size_change_response");
+				message.setValue("name", name);
+				message.setValueS32("width", width);
+				message.setValueS32("height", height);
+				message.setValueS32("texture_width", texture_width);
+				message.setValueS32("texture_height", texture_height);
+				sendMessage(message);
+
+			}
+			else if (message_name == "load_uri")
+			{
+				std::string uri = message_in.getValue("uri");
+				mLLCEFLib->navigate(uri);
+			}
+			else if (message_name == "mouse_event")
+			{
+				std::string event = message_in.getValue("event");
+				//S32 button = message_in.getValueS32("button");
+				S32 x = message_in.getValueS32("x");
+				S32 y = message_in.getValueS32("y");
+
+
+
+				//std::string modifiers = message_in.getValue("modifiers");
+
+				if (event == "down")
+				{
+					mLLCEFLib->mouseButton(0, true, x, y);
+
+					std::stringstream str;
+					str << "Mouse down at = " << x << ", " << y;
+					postDebugMessage(str.str());
+				}
+				else if (event == "up")
+				{
+					mLLCEFLib->mouseButton(0, false, x, y);
+				}
+				else if (event == "double_click")
+				{
+				}
+				else
+				{
+					mLLCEFLib->mouseMove(x, y);
+				}
+			}
+			else
+				if (message_name == "enable_media_plugin_debugging")
+				{
+					mEnableMediaPluginDebugging = message_in.getValueBoolean("enable");
+				}
+		}
+		else
+		{
+			//          std::cerr << "MediaPluginWebKit::receiveMessage: unknown message class: " << message_class << std::endl;
+		};
+	}
 }
 
-////////////////////////////////////////////////////////////////////////////////
-//
-void MediaPluginCEF::update( F64 milliseconds )
-{
-    if ( mWidth < 1 || mWidth > 2048 || mHeight < 1 || mHeight > 2048 )
-        return;
-
-    if ( mPixels == 0 )
-            return;
-
-    if ( mFirstTime )
-    {
-        for( int n = 0; n < ENumObjects; ++n )
-        {
-            mXpos[ n ] = ( mWidth / 2 ) + rand() % ( mWidth / 16 ) - ( mWidth / 32 );
-            mYpos[ n ] = ( mHeight / 2 ) + rand() % ( mHeight / 16 ) - ( mHeight / 32 );
-
-            mColorR[ n ] = rand() % 0x60 + 0x60;
-            mColorG[ n ] = rand() % 0x60 + 0x60;
-            mColorB[ n ] = rand() % 0x60 + 0x60;
-
-            mXInc[ n ] = 0;
-            while ( mXInc[ n ] == 0 )
-                mXInc[ n ] = rand() % 7 - 3;
-
-            mYInc[ n ] = 0;
-            while ( mYInc[ n ] == 0 )
-                mYInc[ n ] = rand() % 9 - 4;
-
-            mBlockSize[ n ] = rand() % 0x30 + 0x10;
-        };
-
-        delete [] mBackgroundPixels;
-
-        mBackgroundPixels = new unsigned char[ mWidth * mHeight * mDepth ];
-
-        mFirstTime = false;
-    };
-
-    if ( mStopAction )
-        return;
-
-    if ( time( NULL ) > mLastUpdateTime + 3 )
-    {
-        const int num_squares = rand() % 20 + 4;
-        int sqr1_r = rand() % 0x80 + 0x20;
-        int sqr1_g = rand() % 0x80 + 0x20;
-        int sqr1_b = rand() % 0x80 + 0x20;
-        int sqr2_r = rand() % 0x80 + 0x20;
-        int sqr2_g = rand() % 0x80 + 0x20;
-        int sqr2_b = rand() % 0x80 + 0x20;
-
-        for ( int y1 = 0; y1 < num_squares; ++y1 )
-        {
-            for ( int x1 = 0; x1 < num_squares; ++x1 )
-            {
-                int px_start = mWidth * x1 / num_squares;
-                int px_end = ( mWidth * ( x1 + 1 ) ) / num_squares;
-                int py_start = mHeight * y1 / num_squares;
-                int py_end = ( mHeight * ( y1 + 1 ) ) / num_squares;
-
-                for( int y2 = py_start; y2 < py_end; ++y2 )
-                {
-                    for( int x2 = px_start; x2 < px_end; ++x2 )
-                    {
-                        int rowspan = mWidth * mDepth;
-
-                        if ( ( y1 % 2 ) ^ ( x1 % 2 ) )
-                        {
-                            mBackgroundPixels[ y2 * rowspan + x2 * mDepth + 0 ] = sqr1_r;
-                            mBackgroundPixels[ y2 * rowspan + x2 * mDepth + 1 ] = sqr1_g;
-                            mBackgroundPixels[ y2 * rowspan + x2 * mDepth + 2 ] = sqr1_b;
-                        }
-                        else
-                        {
-                            mBackgroundPixels[ y2 * rowspan + x2 * mDepth + 0 ] = sqr2_r;
-                            mBackgroundPixels[ y2 * rowspan + x2 * mDepth + 1 ] = sqr2_g;
-                            mBackgroundPixels[ y2 * rowspan + x2 * mDepth + 2 ] = sqr2_b;
-                        };
-                    };
-                };
-            };
-        };
-
-        time( &mLastUpdateTime );
-    };
-
-    memcpy( mPixels, mBackgroundPixels, mWidth * mHeight * mDepth );
-
-    for( int n = 0; n < ENumObjects; ++n )
-    {
-        if ( rand() % 50 == 0 )
-        {
-                mXInc[ n ] = 0;
-                while ( mXInc[ n ] == 0 )
-                    mXInc[ n ] = rand() % 7 - 3;
-
-                mYInc[ n ] = 0;
-                while ( mYInc[ n ] == 0 )
-                    mYInc[ n ] = rand() % 9 - 4;
-        };
-
-        if ( mXpos[ n ] + mXInc[ n ] < 0 || mXpos[ n ] + mXInc[ n ] >= mWidth - mBlockSize[ n ] )
-            mXInc[ n ]= -mXInc[ n ];
-
-        if ( mYpos[ n ] + mYInc[ n ] < 0 || mYpos[ n ] + mYInc[ n ] >= mHeight - mBlockSize[ n ] )
-            mYInc[ n ]= -mYInc[ n ];
-
-        mXpos[ n ] += mXInc[ n ];
-        mYpos[ n ] += mYInc[ n ];
-
-        for( int y = 0; y < mBlockSize[ n ]; ++y )
-        {
-            for( int x = 0; x < mBlockSize[ n ]; ++x )
-            {
-                mPixels[ ( mXpos[ n ] + x ) * mDepth + ( mYpos[ n ] + y ) * mDepth * mWidth + 0 ] = mColorR[ n ];
-                mPixels[ ( mXpos[ n ] + x ) * mDepth + ( mYpos[ n ] + y ) * mDepth * mWidth + 1 ] = mColorG[ n ];
-                mPixels[ ( mXpos[ n ] + x ) * mDepth + ( mYpos[ n ] + y ) * mDepth * mWidth + 2 ] = mColorB[ n ];
-            };
-        };
-    };
-
-    setDirty( 0, 0, mWidth, mHeight );
-};
-
 ////////////////////////////////////////////////////////////////////////////////
 //
 bool MediaPluginCEF::init()
 {
-    LLPluginMessage message( LLPLUGIN_MESSAGE_CLASS_MEDIA, "name_text" );
-    message.setValue( "name", "Example Plugin" );
-    sendMessage( message );
+	LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "name_text");
+	message.setValue("name", "Example Plugin");
+	sendMessage(message);
 
-    return true;
+	return true;
 };
 
 ////////////////////////////////////////////////////////////////////////////////
 //
-int init_media_plugin( LLPluginInstance::sendMessageFunction host_send_func,
-                        void* host_user_data,
-                        LLPluginInstance::sendMessageFunction *plugin_send_func,
-                        void **plugin_user_data )
+int init_media_plugin(LLPluginInstance::sendMessageFunction host_send_func,
+	void* host_user_data,
+	LLPluginInstance::sendMessageFunction *plugin_send_func,
+	void **plugin_user_data)
 {
-    MediaPluginCEF* self = new MediaPluginCEF( host_send_func, host_user_data );
-    *plugin_send_func = MediaPluginCEF::staticReceiveMessage;
-    *plugin_user_data = ( void* )self;
+	MediaPluginCEF* self = new MediaPluginCEF(host_send_func, host_user_data);
+	*plugin_send_func = MediaPluginCEF::staticReceiveMessage;
+	*plugin_user_data = (void*)self;
 
-    return 0;
+	return 0;
 }
-
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 62467750a0add2638fa3c3b0de646a89bcd6152c..8613cbed57730f224cd35cd5346924f0011f7162 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -438,69 +438,97 @@ def construct(self):
             self.path("winmm.dll")
             self.end_prefix()
 
-
+        # CEF runtime files - debug
         if self.args['configuration'].lower() == 'debug':
-            if self.prefix(src=os.path.join(os.pardir, 'packages', 'lib', 'debug'),
-                           dst="llplugin"):
-                self.path("libeay32.dll")
-                self.path("qtcored4.dll")
-                self.path("qtguid4.dll")
-                self.path("qtnetworkd4.dll")
-                self.path("qtopengld4.dll")
-                self.path("qtwebkitd4.dll")
-                self.path("qtxmlpatternsd4.dll")
-                self.path("ssleay32.dll")
-
-                # For WebKit/Qt plugin runtimes (image format plugins)
-                if self.prefix(src="imageformats", dst="imageformats"):
-                    self.path("qgifd4.dll")
-                    self.path("qicod4.dll")
-                    self.path("qjpegd4.dll")
-                    self.path("qmngd4.dll")
-                    self.path("qsvgd4.dll")
-                    self.path("qtiffd4.dll")
-                    self.end_prefix()
-
-                # For WebKit/Qt plugin runtimes (codec/character encoding plugins)
-                if self.prefix(src="codecs", dst="codecs"):
-                    self.path("qcncodecsd4.dll")
-                    self.path("qjpcodecsd4.dll")
-                    self.path("qkrcodecsd4.dll")
-                    self.path("qtwcodecsd4.dll")
-                    self.end_prefix()
-
+            if self.prefix(src=os.path.join(os.pardir, 'packages', 'bin', 'debug'), dst="llplugin"):
+                self.path("d3dcompiler_43.dll")
+                self.path("d3dcompiler_47.dll")
+                self.path("ffmpegsumo.dll")
+                self.path("libcef.dll")
+                self.path("libEGL.dll")
+                self.path("libGLESv2.dll")
+                self.path("llceflib_host.exe")
+                self.path("pdf.dll")
+                self.path("wow_helper.exe")
                 self.end_prefix()
         else:
-            if self.prefix(src=os.path.join(os.pardir, 'packages', 'lib', 'release'),
-                           dst="llplugin"):
-                self.path("libeay32.dll")
-                self.path("qtcore4.dll")
-                self.path("qtgui4.dll")
-                self.path("qtnetwork4.dll")
-                self.path("qtopengl4.dll")
-                self.path("qtwebkit4.dll")
-                self.path("qtxmlpatterns4.dll")
-                self.path("ssleay32.dll")
-
-            # For WebKit/Qt plugin runtimes (image format plugins)
-            if self.prefix(src="imageformats", dst="imageformats"):
-                self.path("qgif4.dll")
-                self.path("qico4.dll")
-                self.path("qjpeg4.dll")
-                self.path("qmng4.dll")
-                self.path("qsvg4.dll")
-                self.path("qtiff4.dll")
+        # CEF runtime files - not debug (release, relwithdebinfo etc.)
+            if self.prefix(src=os.path.join(os.pardir, 'packages', 'bin', 'release'), dst="llplugin"):
+                self.path("d3dcompiler_43.dll")
+                self.path("d3dcompiler_47.dll")
+                self.path("ffmpegsumo.dll")
+                self.path("libcef.dll")
+                self.path("libEGL.dll")
+                self.path("libGLESv2.dll")
+                self.path("llceflib_host.exe")
+                self.path("pdf.dll")
+                self.path("wow_helper.exe")
                 self.end_prefix()
 
-            # For WebKit/Qt plugin runtimes (codec/character encoding plugins)
-            if self.prefix(src="codecs", dst="codecs"):
-                self.path("qcncodecs4.dll")
-                self.path("qjpcodecs4.dll")
-                self.path("qkrcodecs4.dll")
-                self.path("qtwcodecs4.dll")
-                self.end_prefix()
+        # CEF files common to all configurations
+        if self.prefix(src=os.path.join(os.pardir, 'packages', 'resources'), dst="llplugin"):
+            self.path("cef.pak")
+            self.path("cef_100_percent.pak")
+            self.path("cef_200_percent.pak")
+            self.path("devtools_resources.pak")
+            self.path("icudtl.dat")
+            self.end_prefix()
 
-        self.end_prefix()
+        if self.prefix(src=os.path.join(os.pardir, 'packages', 'resources', 'locales'), dst=os.path.join('llplugin', 'locales')):
+            self.path("am.pak")
+            self.path("ar.pak")
+            self.path("bg.pak")
+            self.path("bn.pak")
+            self.path("ca.pak")
+            self.path("cs.pak")
+            self.path("da.pak")
+            self.path("de.pak")
+            self.path("el.pak")
+            self.path("en-GB.pak")
+            self.path("en-US.pak")
+            self.path("es-419.pak")
+            self.path("es.pak")
+            self.path("et.pak")
+            self.path("fa.pak")
+            self.path("fi.pak")
+            self.path("fil.pak")
+            self.path("fr.pak")
+            self.path("gu.pak")
+            self.path("he.pak")
+            self.path("hi.pak")
+            self.path("hr.pak")
+            self.path("hu.pak")
+            self.path("id.pak")
+            self.path("it.pak")
+            self.path("ja.pak")
+            self.path("kn.pak")
+            self.path("ko.pak")
+            self.path("lt.pak")
+            self.path("lv.pak")
+            self.path("ml.pak")
+            self.path("mr.pak")
+            self.path("ms.pak")
+            self.path("nb.pak")
+            self.path("nl.pak")
+            self.path("pl.pak")
+            self.path("pt-BR.pak")
+            self.path("pt-PT.pak")
+            self.path("ro.pak")
+            self.path("ru.pak")
+            self.path("sk.pak")
+            self.path("sl.pak")
+            self.path("sr.pak")
+            self.path("sv.pak")
+            self.path("sw.pak")
+            self.path("ta.pak")
+            self.path("te.pak")
+            self.path("th.pak")
+            self.path("tr.pak")
+            self.path("uk.pak")
+            self.path("vi.pak")
+            self.path("zh-CN.pak")
+            self.path("zh-TW.pak")
+            self.end_prefix()
 
         # pull in the crash logger and updater from other projects
         # tag:"crash-logger" here as a cue to the exporter