aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/EphyWrapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'embed/mozilla/EphyWrapper.cpp')
-rw-r--r--embed/mozilla/EphyWrapper.cpp53
1 files changed, 10 insertions, 43 deletions
diff --git a/embed/mozilla/EphyWrapper.cpp b/embed/mozilla/EphyWrapper.cpp
index 5cb399201..bea527fe2 100644
--- a/embed/mozilla/EphyWrapper.cpp
+++ b/embed/mozilla/EphyWrapper.cpp
@@ -30,6 +30,7 @@
#include <gtkmozembed_internal.h>
#include <unistd.h>
+#include "nsICommandManager.h"
#include "nsIContentViewer.h"
#include "nsIGlobalHistory.h"
#include "nsIDocShellHistory.h"
@@ -51,7 +52,6 @@
#include "nsCWebBrowserPersist.h"
#include "nsNetUtil.h"
#include "nsIChromeEventHandler.h"
-#include "nsIClipboardCommands.h"
#include "nsIDOMDocumentStyle.h"
#include "nsIDocShellTreeItem.h"
#include "nsIDocShellTreeNode.h"
@@ -712,48 +712,6 @@ nsresult EphyWrapper::ForceEncoding (const char *encoding)
return result;
}
-nsresult EphyWrapper::CanCutSelection(PRBool *result)
-{
- nsCOMPtr<nsIClipboardCommands> clipboard (do_GetInterface(mWebBrowser));
- return clipboard->CanCutSelection (result);
-}
-
-nsresult EphyWrapper::CanCopySelection(PRBool *result)
-{
- nsCOMPtr<nsIClipboardCommands> clipboard (do_GetInterface(mWebBrowser));
- return clipboard->CanCopySelection (result);
-}
-
-nsresult EphyWrapper::CanPaste(PRBool *result)
-{
- nsCOMPtr<nsIClipboardCommands> clipboard (do_GetInterface(mWebBrowser));
- return clipboard->CanPaste (result);
-}
-
-nsresult EphyWrapper::CutSelection(void)
-{
- nsCOMPtr<nsIClipboardCommands> clipboard (do_GetInterface(mWebBrowser));
- return clipboard->CutSelection ();
-}
-
-nsresult EphyWrapper::CopySelection(void)
-{
- nsCOMPtr<nsIClipboardCommands> clipboard (do_GetInterface(mWebBrowser));
- return clipboard->CopySelection ();
-}
-
-nsresult EphyWrapper::Paste(void)
-{
- nsCOMPtr<nsIClipboardCommands> clipboard (do_GetInterface(mWebBrowser));
- return clipboard->Paste ();
-}
-
-nsresult EphyWrapper::SelectAll (void)
-{
- nsCOMPtr<nsIClipboardCommands> clipboard (do_GetInterface(mWebBrowser));
- return clipboard->SelectAll ();
-}
-
nsresult EphyWrapper::PushTargetDocument (nsIDOMDocument *domDoc)
{
mTargetDocument = domDoc;
@@ -894,3 +852,12 @@ nsresult EphyWrapper::GetEncodingInfo (EphyEncodingInfo **infoptr)
return NS_OK;
}
+
+nsresult EphyWrapper::DoCommand (const char *command)
+{
+ nsCOMPtr<nsICommandManager> cmdManager;
+ cmdManager = do_GetInterface (mWebBrowser);
+ if (!cmdManager) return NS_ERROR_FAILURE;
+
+ return cmdManager->DoCommand (command, nsnull, nsnull);
+}