[kazehakase-svn] [3347] * module/embed/gecko/GtkPromptService.cpp: don' t use nsIDocument.

Back to archive index

svnno****@sourc***** svnno****@sourc*****
Sat Jan 5 20:52:52 JST 2008


Revision: 3347
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=kazehakase&view=rev&rev=3347
Author:   kous
Date:     2008-01-05 20:52:51 +0900 (Sat, 05 Jan 2008)

Log Message:
-----------
* module/embed/gecko/GtkPromptService.cpp: don't use nsIDocument.

Modified Paths:
--------------
    kazehakase/trunk/ChangeLog
    kazehakase/trunk/module/embed/gecko/GtkPromptService.cpp
    kazehakase/trunk/module/embed/gecko/GtkPromptService.h

Modified: kazehakase/trunk/ChangeLog
===================================================================
--- kazehakase/trunk/ChangeLog	2008-01-05 11:25:37 UTC (rev 3346)
+++ kazehakase/trunk/ChangeLog	2008-01-05 11:52:51 UTC (rev 3347)
@@ -1,5 +1,10 @@
 2008-01-05  Kouhei Sutou  <kou****@cozmi*****>
 
+	* module/embed/gecko/GtkPromptService.cpp: don't use nsIDocument.
+
+	* module/embed/gecko/kz-mozprogresslistener.cpp
+	(KzMozProgressListener::OnRefreshAttempted): defined dummy method.
+
 	* module/embed/gecko/kz-mozhistorysearch.cpp: buildable.
 
 	* module/embed/gecko/kz-mozwrapper.{cpp,h}: removing MozillaPrivate

Modified: kazehakase/trunk/module/embed/gecko/GtkPromptService.cpp
===================================================================
--- kazehakase/trunk/module/embed/gecko/GtkPromptService.cpp	2008-01-05 11:25:37 UTC (rev 3346)
+++ kazehakase/trunk/module/embed/gecko/GtkPromptService.cpp	2008-01-05 11:52:51 UTC (rev 3347)
@@ -37,18 +37,14 @@
  * ***** END LICENSE BLOCK ***** */
 
 #include "GtkPromptService.h"
-#include "kz-mozutils.h"
-#define MOZILLA_STRICT_API
-#include <nsEmbedString.h>
-#undef MOZILLA_STRICT_API
 #include <nsIWindowWatcher.h>
 #include <nsIWebBrowserChrome.h>
 #include <nsIEmbeddingSiteWindow.h>
 #include <nsCOMPtr.h>
 #include <nsIServiceManager.h>
 
-#include <nsIDocument.h>
 #include <nsIDOMDocument.h>
+#include <nsIDOM3Document.h>
 #include <nsIDOMWindow.h>
 #include <nsIDOMCharacterData.h>
 #include <nsIDOMText.h>
@@ -57,6 +53,7 @@
 #include <glib/gi18n.h>
 #include "kz-prompt-dialog.h"
 
+#include "kz-mozutils.h"
 
 static void
 kz_prompt_dialog_set_check_box(KzPromptDialog *prompt,
@@ -501,16 +498,15 @@
 
 	nsCOMPtr<nsIDOMDocument> domDoc;
 	aDOMWindow->GetDocument(getter_AddRefs(domDoc));
-	nsCOMPtr<nsIDocument> doc = do_QueryInterface(domDoc);
+	nsCOMPtr<nsIDOM3Document> doc = do_QueryInterface(domDoc);
 
 	if (!doc)
 		return NULL;
 
-	nsCOMPtr<nsIURI> uri;
-	uri = doc->GetDocumentURI();
+	nsString uri;
+	doc->GetDocumentURI(uri);
 
-	nsCAutoString str;
-	uri->GetHost(str);
-
-	return g_strdup(str.get());
+	nsEmbedCString c_uri;
+	NS_UTF16ToCString(uri, NS_CSTRING_ENCODING_UTF8, c_uri);
+	return g_strdup(c_uri.get());
 }

Modified: kazehakase/trunk/module/embed/gecko/GtkPromptService.h
===================================================================
--- kazehakase/trunk/module/embed/gecko/GtkPromptService.h	2008-01-05 11:25:37 UTC (rev 3346)
+++ kazehakase/trunk/module/embed/gecko/GtkPromptService.h	2008-01-05 11:52:51 UTC (rev 3347)
@@ -38,9 +38,6 @@
  * ***** END LICENSE BLOCK ***** */
 
 #include <nsIPromptService.h>
-#define MOZILLA_STRICT_API
-#include <nsEmbedString.h>
-#undef MOZILLA_STRICT_API
 #include <gtk/gtk.h>
 
 #define NS_PROMPTSERVICE_CID \




More information about the Kazehakase-cvs mailing list
Back to archive index