diff options
author | Christian Persch <chpe@src.gnome.org> | 2007-09-14 04:36:04 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2007-09-14 04:36:04 +0800 |
commit | 033a9214932e228af131a35322461d3a3e7e06ae (patch) | |
tree | b45afafc1c92c3b72370da0829ea07dd61c3a407 /embed/xulrunner/src | |
parent | 8d92314d3772cdb4fe0240a19743ca1cf7c93267 (diff) | |
download | gsoc2013-epiphany-033a9214932e228af131a35322461d3a3e7e06ae.tar gsoc2013-epiphany-033a9214932e228af131a35322461d3a3e7e06ae.tar.gz gsoc2013-epiphany-033a9214932e228af131a35322461d3a3e7e06ae.tar.bz2 gsoc2013-epiphany-033a9214932e228af131a35322461d3a3e7e06ae.tar.lz gsoc2013-epiphany-033a9214932e228af131a35322461d3a3e7e06ae.tar.xz gsoc2013-epiphany-033a9214932e228af131a35322461d3a3e7e06ae.tar.zst gsoc2013-epiphany-033a9214932e228af131a35322461d3a3e7e06ae.zip |
Move EphyUtils and GeckoUtils to utils/.
svn path=/trunk/; revision=7434
Diffstat (limited to 'embed/xulrunner/src')
-rw-r--r-- | embed/xulrunner/src/GeckoUtils.cpp | 87 | ||||
-rw-r--r-- | embed/xulrunner/src/GeckoUtils.h | 34 | ||||
-rw-r--r-- | embed/xulrunner/src/Makefile.am | 2 |
3 files changed, 0 insertions, 123 deletions
diff --git a/embed/xulrunner/src/GeckoUtils.cpp b/embed/xulrunner/src/GeckoUtils.cpp deleted file mode 100644 index c71fce4ba..000000000 --- a/embed/xulrunner/src/GeckoUtils.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 2.1, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright © 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Brian Ryner <bryner@brianryner.com> - * - * $Id$ - */ - -#include <xpcom-config.h> -#include "config.h" - -#include "GeckoUtils.h" - -#include "gecko-embed.h" - -#include <nsCOMPtr.h> -#include <nsIDOMWindow.h> -#include <nsIWindowWatcher.h> -#include <nsIWebBrowserChrome.h> -#include <nsIEmbeddingSiteWindow.h> -#include <nsIServiceManager.h> -#include <nsServiceManagerUtils.h> - -GtkWidget * -GeckoUtils::GetGeckoEmbedForDOMWindow (nsIDOMWindow * aDOMWindow) -{ - if (!aDOMWindow) - return NULL; - - /* Get the toplevel DOM window, in case this window is a frame */ - nsCOMPtr<nsIDOMWindow> domWin; - aDOMWindow->GetTop (getter_AddRefs (domWin)); - if (!domWin) - return NULL; - - nsCOMPtr< nsIWindowWatcher> wwatch - (do_GetService ("@mozilla.org/embedcomp/window-watcher;1")); - NS_ENSURE_TRUE (wwatch, NULL); - - nsCOMPtr<nsIWebBrowserChrome> chrome; - wwatch->GetChromeForWindow (domWin, getter_AddRefs (chrome)); - - nsCOMPtr <nsIEmbeddingSiteWindow> siteWindow (do_QueryInterface (chrome)); - if (!siteWindow) - return NULL; - - GtkWidget *widget; - siteWindow->GetSiteWindow ((void **) &widget); - if (!widget || !GECKO_IS_EMBED (widget)) - return NULL; - - return widget; -} - -GtkWidget * -GeckoUtils::GetGtkWindowForDOMWindow (nsIDOMWindow * aDOMWindow) -{ - GtkWidget *embed = GeckoUtils::GetGeckoEmbedForDOMWindow (aDOMWindow); - if (!embed) - return NULL; - - GtkWidget *gtkWin = gtk_widget_get_toplevel (embed); - if (!GTK_WIDGET_TOPLEVEL (gtkWin)) - return NULL; - - return gtkWin; -} diff --git a/embed/xulrunner/src/GeckoUtils.h b/embed/xulrunner/src/GeckoUtils.h deleted file mode 100644 index 05012e6b2..000000000 --- a/embed/xulrunner/src/GeckoUtils.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright © 2006 Christian Persch - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 2.1, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ - */ - -#ifndef GECKO_UTILS_H -#define GECKO_UTILS_H - -#include <gtk/gtkwidget.h> - -class nsIDOMWindow; - -namespace GeckoUtils -{ - GtkWidget* GetGeckoEmbedForDOMWindow (nsIDOMWindow*); - GtkWidget* GetGtkWindowForDOMWindow (nsIDOMWindow*); -} - -#endif diff --git a/embed/xulrunner/src/Makefile.am b/embed/xulrunner/src/Makefile.am index ec9847849..0d205386a 100644 --- a/embed/xulrunner/src/Makefile.am +++ b/embed/xulrunner/src/Makefile.am @@ -93,8 +93,6 @@ libgnomegeckoembed_la_SOURCES = \ GeckoBrowser.h \ GeckoSingle.cpp \ GeckoSingle.h \ - GeckoUtils.cpp \ - GeckoUtils.h \ $(NULL) libgnomegeckoembed_la_CPPFLAGS = \ |