svnno****@sourc*****
svnno****@sourc*****
Tue Feb 19 15:50:09 JST 2008
Revision: 3363 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=kazehakase&view=rev&rev=3363 Author: ikezoe Date: 2008-02-19 15:50:09 +0900 (Tue, 19 Feb 2008) Log Message: ----------- Use static_cast. Modified Paths: -------------- kazehakase/trunk/ChangeLog kazehakase/trunk/module/embed/gecko/gtkmozembed/EmbedPrivate.cpp Modified: kazehakase/trunk/ChangeLog =================================================================== --- kazehakase/trunk/ChangeLog 2008-02-19 06:46:34 UTC (rev 3362) +++ kazehakase/trunk/ChangeLog 2008-02-19 06:50:09 UTC (rev 3363) @@ -3,6 +3,7 @@ * module/embed/gecko/gtkmozembed/EmbedWindow.cpp, module/embed/gecko/gtkmozembed/EmbedProgress.cpp, module/embed/gecko/gtkmozembed/EmbedWindowCreator.cpp, + module/embed/gecko/gtkmozembed/EmbedPrivate.cpp, module/embed/gecko/gtkmozembed/EmbedStream.cpp: Use static_cast instead of NS_STATIC_CAST. * module/embed/gecko/kz-mozutils.h: Support for xulrunner-1.9. Modified: kazehakase/trunk/module/embed/gecko/gtkmozembed/EmbedPrivate.cpp =================================================================== --- kazehakase/trunk/module/embed/gecko/gtkmozembed/EmbedPrivate.cpp 2008-02-19 06:46:34 UTC (rev 3362) +++ kazehakase/trunk/module/embed/gecko/gtkmozembed/EmbedPrivate.cpp 2008-02-19 06:50:09 UTC (rev 3363) @@ -134,30 +134,28 @@ // initialize it. It is assumed that this window will be destroyed // when we go out of scope. mWindow = new EmbedWindow(); - mWindowGuard = NS_STATIC_CAST(nsIWebBrowserChrome *, mWindow); + mWindowGuard = static_cast<nsIWebBrowserChrome *>(mWindow); mWindow->Init(this); // Create our progress listener object, make an owning reference, // and initialize it. It is assumed that this progress listener // will be destroyed when we go out of scope. mProgress = new EmbedProgress(); - mProgressGuard = NS_STATIC_CAST(nsIWebProgressListener *, - mProgress); + mProgressGuard = static_cast<nsIWebProgressListener *>(mProgress); mProgress->Init(this); // Create our content listener object, initialize it and attach it. // It is assumed that this will be destroyed when we go out of // scope. mContentListener = new EmbedContentListener(); - mContentListenerGuard = NS_STATIC_CAST(nsISupports*, NS_STATIC_CAST(nsIURIContentListener*, mContentListener)); + mContentListenerGuard = static_cast<nsISupports*>(static_cast<nsIURIContentListener*>(mContentListener)); mContentListener->Init(this); // Create our key listener object and initialize it. It is assumed // that this will be destroyed before we go out of scope. mEventListener = new EmbedEventListener(); mEventListenerGuard = - NS_STATIC_CAST(nsISupports *, NS_STATIC_CAST(nsIDOMKeyListener *, - mEventListener)); + static_cast<nsISupports *>(static_cast<nsIDOMKeyListener *>(mEventListener)); mEventListener->Init(this); // has the window creator service been set up? @@ -171,7 +169,7 @@ // create our local object EmbedWindowCreator *creator = new EmbedWindowCreator(); nsCOMPtr<nsIWindowCreator> windowCreator; - windowCreator = NS_STATIC_CAST(nsIWindowCreator *, creator); + windowCreator = static_cast<nsIWindowCreator *>(creator); // Attach it via the watcher service nsCOMPtr<nsIWindowWatcher> watcher = do_GetService(NS_WINDOWWATCHER_CONTRACTID); @@ -236,7 +234,7 @@ // save the widget ID - it should be the mozarea of the window. gpointer data = nsnull; gdk_window_get_user_data(tmp_window, &data); - mMozWindowWidget = NS_STATIC_CAST(GtkWidget *, data); + mMozWindowWidget = static_cast<GtkWidget *>(data); // Apply the current chrome mask ApplyChromeMask(); @@ -661,11 +659,9 @@ // creating a new window ) so it's OK to walk the list of open // windows. for (int i = 0; i < count; i++) { - EmbedPrivate *tmpPrivate = NS_STATIC_CAST(EmbedPrivate *, - g_list_nth_data(sWindowList, i)); + EmbedPrivate *tmpPrivate = static_cast<EmbedPrivate *>(g_list_nth_data(sWindowList, i)); // get the browser object for that window - nsIWebBrowserChrome *chrome = NS_STATIC_CAST(nsIWebBrowserChrome *, - tmpPrivate->mWindow); + nsIWebBrowserChrome *chrome = static_cast<nsIWebBrowserChrome *>(tmpPrivate->mWindow); if (chrome == aBrowser) return tmpPrivate; } @@ -790,8 +786,7 @@ return; nsIDOMEventListener *eventListener = - NS_STATIC_CAST(nsIDOMEventListener *, - NS_STATIC_CAST(nsIDOMKeyListener *, mEventListener)); + static_cast<nsIDOMEventListener *>(static_cast<nsIDOMKeyListener *>(mEventListener)); // add the key listener nsresult rv; @@ -835,8 +830,7 @@ return; nsIDOMEventListener *eventListener = - NS_STATIC_CAST(nsIDOMEventListener *, - NS_STATIC_CAST(nsIDOMKeyListener *, mEventListener)); + static_cast<nsIDOMEventListener *>(static_cast<nsIDOMKeyListener *>(mEventListener)); nsresult rv; rv = mEventReceiver->RemoveEventListenerByIID(eventListener,