aboutsummaryrefslogtreecommitdiffstats
path: root/embed/xulrunner/src
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2007-09-13 21:09:13 +0800
committerChristian Persch <chpe@src.gnome.org>2007-09-13 21:09:13 +0800
commit4fe73188e1d1acf72a346d939a86691c73bb6ebd (patch)
tree459738eb5c4db5b52ffcfce7afec7f5c5a6a9b58 /embed/xulrunner/src
parent0651f74cfd3a68649a96c2f2b70a93c48451c010 (diff)
downloadgsoc2013-epiphany-4fe73188e1d1acf72a346d939a86691c73bb6ebd.tar
gsoc2013-epiphany-4fe73188e1d1acf72a346d939a86691c73bb6ebd.tar.gz
gsoc2013-epiphany-4fe73188e1d1acf72a346d939a86691c73bb6ebd.tar.bz2
gsoc2013-epiphany-4fe73188e1d1acf72a346d939a86691c73bb6ebd.tar.lz
gsoc2013-epiphany-4fe73188e1d1acf72a346d939a86691c73bb6ebd.tar.xz
gsoc2013-epiphany-4fe73188e1d1acf72a346d939a86691c73bb6ebd.tar.zst
gsoc2013-epiphany-4fe73188e1d1acf72a346d939a86691c73bb6ebd.zip
Move AutoJSContextStack and AutoWindowModalState helpers to
embed/xulrunner/utils instead of having two copies of it in src and embed. svn path=/trunk/; revision=7424
Diffstat (limited to 'embed/xulrunner/src')
-rw-r--r--embed/xulrunner/src/AutoJSContextStack.cpp48
-rw-r--r--embed/xulrunner/src/AutoJSContextStack.h41
-rw-r--r--embed/xulrunner/src/AutoWindowModalState.cpp39
-rw-r--r--embed/xulrunner/src/AutoWindowModalState.h38
-rw-r--r--embed/xulrunner/src/Makefile.am5
5 files changed, 1 insertions, 170 deletions
diff --git a/embed/xulrunner/src/AutoJSContextStack.cpp b/embed/xulrunner/src/AutoJSContextStack.cpp
deleted file mode 100644
index 9c918fc3b..000000000
--- a/embed/xulrunner/src/AutoJSContextStack.cpp
+++ /dev/null
@@ -1,48 +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$
- */
-
-#include <xpcom-config.h>
-#include "config.h"
-
-#include "AutoJSContextStack.h"
-
-#include <nsIServiceManager.h>
-#include <nsServiceManagerUtils.h>
-
-AutoJSContextStack::~AutoJSContextStack()
-{
- if (mStack) {
- JSContext* cx;
- mStack->Pop (&cx);
-
- NS_ASSERTION(cx == nsnull, "We pushed a null context but popped a non-null context!?");
- }
-}
-
-nsresult
-AutoJSContextStack::Init()
-{
- nsresult rv;
- mStack = do_GetService ("@mozilla.org/js/xpc/ContextStack;1", &rv);
- if (NS_FAILED (rv))
- return rv;
-
- return mStack->Push (nsnull);
-}
diff --git a/embed/xulrunner/src/AutoJSContextStack.h b/embed/xulrunner/src/AutoJSContextStack.h
deleted file mode 100644
index 5294e7d4e..000000000
--- a/embed/xulrunner/src/AutoJSContextStack.h
+++ /dev/null
@@ -1,41 +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 AUTO_JSCONTEXTSTACK_H
-#define AUTO_JSCONTEXTSTACK_H
-
-struct JSContext;
-
-#include <nsCOMPtr.h>
-#include <nsIJSContextStack.h>
-
-class AutoJSContextStack
-{
- public:
- AutoJSContextStack () { }
- ~AutoJSContextStack ();
-
- nsresult Init ();
-
- private:
- nsCOMPtr<nsIJSContextStack> mStack;
-};
-
-#endif
diff --git a/embed/xulrunner/src/AutoWindowModalState.cpp b/embed/xulrunner/src/AutoWindowModalState.cpp
deleted file mode 100644
index 5f38acec5..000000000
--- a/embed/xulrunner/src/AutoWindowModalState.cpp
+++ /dev/null
@@ -1,39 +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$
- */
-
-#include <xpcom-config.h>
-#include "config.h"
-
-#include "AutoWindowModalState.h"
-
-AutoWindowModalState::AutoWindowModalState (nsIDOMWindow *aWindow)
-{
- mWindow = do_QueryInterface (aWindow);
- if (mWindow) {
- mWindow->EnterModalState ();
- }
-}
-
-AutoWindowModalState::~AutoWindowModalState()
-{
- if (mWindow) {
- mWindow->LeaveModalState ();
- }
-}
diff --git a/embed/xulrunner/src/AutoWindowModalState.h b/embed/xulrunner/src/AutoWindowModalState.h
deleted file mode 100644
index bccefede2..000000000
--- a/embed/xulrunner/src/AutoWindowModalState.h
+++ /dev/null
@@ -1,38 +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 AUTO_WINDOWMODALSTATE_H
-#define AUTO_WINDOWMODALSTATE_H
-
-#include <nsCOMPtr.h>
-#include <nsPIDOMWindow.h>
-
-class AutoWindowModalState
-{
- public:
- AutoWindowModalState (nsIDOMWindow *);
- ~AutoWindowModalState ();
-
- private:
-
- nsCOMPtr<nsPIDOMWindow> mWindow;
-};
-
-#endif
diff --git a/embed/xulrunner/src/Makefile.am b/embed/xulrunner/src/Makefile.am
index a0d82d551..4dd581aae 100644
--- a/embed/xulrunner/src/Makefile.am
+++ b/embed/xulrunner/src/Makefile.am
@@ -79,10 +79,6 @@ libgnomegeckoembed_la_SOURCES = \
gecko-init.h \
gecko-init-internal.h \
gecko-init-private.h \
- AutoJSContextStack.cpp \
- AutoJSContextStack.h \
- AutoWindowModalState.cpp \
- AutoWindowModalState.h \
EmbedContentListener.cpp \
EmbedContentListener.h \
EmbedEventListener.cpp \
@@ -104,6 +100,7 @@ libgnomegeckoembed_la_SOURCES = \
$(NULL)
libgnomegeckoembed_la_CPPFLAGS = \
+ -I$(top_srcdir)/embed/xulrunner/utils \
$(LIBXUL_CXXCPPFLAGS) \
$(LIBXUL_INCLUDES) \
$(AM_CPPFLAGS)