Examples of XPCOMObject


Examples of org.eclipse.swt.internal.mozilla.XPCOMObject

      return;
    }
    // get old web progress listener instance and dispose
    Field f_Mozilla_webProgressListener = mozClass.getDeclaredField("webProgressListener");
    f_Mozilla_webProgressListener.setAccessible(true);
    final XPCOMObject oldWebProgressListener =
        (XPCOMObject) f_Mozilla_webProgressListener.get(m_webBrowser);
    oldWebProgressListener.dispose();
    // get methods which needed to delegate to
    final Method m_Mozilla_QueryInterface =
        mozClass.getDeclaredMethod("QueryInterface", new Class[]{int.class, int.class});
    final Method m_Mozilla_AddRef = mozClass.getDeclaredMethod("AddRef", new Class[0]);
    final Method m_Mozilla_Release = mozClass.getDeclaredMethod("Release", new Class[0]);
    final Method m_Mozilla_OnStateChange =
        mozClass.getDeclaredMethod("OnStateChange", new Class[]{
            int.class,
            int.class,
            int.class,
            int.class});
    final Method m_Mozilla_OnProgressChange =
        mozClass.getDeclaredMethod("OnProgressChange", new Class[]{
            int.class,
            int.class,
            int.class,
            int.class,
            int.class,
            int.class});
    final Method m_Mozilla_OnLocationChange =
        mozClass.getDeclaredMethod("OnLocationChange", new Class[]{int.class, int.class, int.class});
    final Method m_Mozilla_OnStatusChange =
        mozClass.getDeclaredMethod("OnStatusChange", new Class[]{
            int.class,
            int.class,
            int.class,
            int.class});
    final Method m_Mozilla_OnSecurityChange =
        mozClass.getDeclaredMethod("OnSecurityChange", new Class[]{int.class, int.class, int.class});
    // get them accessible
    m_Mozilla_QueryInterface.setAccessible(true);
    m_Mozilla_AddRef.setAccessible(true);
    m_Mozilla_Release.setAccessible(true);
    m_Mozilla_OnStateChange.setAccessible(true);
    m_Mozilla_OnProgressChange.setAccessible(true);
    m_Mozilla_OnLocationChange.setAccessible(true);
    m_Mozilla_OnStatusChange.setAccessible(true);
    m_Mozilla_OnSecurityChange.setAccessible(true);
    // create own web progress listener instance
    XPCOMObject webProgressListener = new XPCOMObject(new int[]{2, 0, 0, 4, 6, 3, 4, 3}) {
      private Integer[] prepareArgs(int[] args, int count) {
        Integer[] result = new Integer[count];
        for (int i = 0; i < count; ++i) {
          result[i] = new Integer(args[i]);
        }
View Full Code Here

Examples of org.eclipse.swt.internal.mozilla.XPCOMObject

    }
    try {
      // get old web progress listener instance and dispose
      Field f_Mozilla_webProgressListener = mozClass.getDeclaredField("webProgressListener");
      f_Mozilla_webProgressListener.setAccessible(true);
      final XPCOMObject oldWebProgressListener =
          (XPCOMObject) f_Mozilla_webProgressListener.get(m_webBrowser);
      oldWebProgressListener.dispose();
      // get methods which needed to delegate to
      final Method m_Mozilla_QueryInterface =
          mozClass.getDeclaredMethod("QueryInterface", new Class[]{long.class, long.class});
      final Method m_Mozilla_AddRef = mozClass.getDeclaredMethod("AddRef", new Class[0]);
      final Method m_Mozilla_Release = mozClass.getDeclaredMethod("Release", new Class[0]);
      final Method m_Mozilla_OnLocationChange;
      final Method[] m_Mozilla_OnStateChange = new Method[1];
      final Method[] m_Mozilla_OnProgressChange = new Method[1];
      final Method[] m_Mozilla_OnStatusChange = new Method[1];
      final Method[] m_Mozilla_OnSecurityChange = new Method[1];
      try {
        // eclipse 3.3
        m_Mozilla_OnStateChange[0] =
            mozClass.getDeclaredMethod("OnStateChange", new Class[]{
                long.class,
                long.class,
                long.class,
                long.class});
      } catch (NoSuchMethodException nsme) {
        // eclipse 3.4
        m_Mozilla_OnStateChange[0] =
            mozClass.getDeclaredMethod("OnStateChange", new Class[]{
                long.class,
                long.class,
                int.class,
                int.class});
      }
      try {
        m_Mozilla_OnProgressChange[0] =
            mozClass.getDeclaredMethod("OnProgressChange", new Class[]{
                long.class,
                long.class,
                long.class,
                long.class,
                long.class,
                long.class});
      } catch (NoSuchMethodException nsme) {
        m_Mozilla_OnProgressChange[0] =
            mozClass.getDeclaredMethod("OnProgressChange", new Class[]{
                long.class,
                long.class,
                int.class,
                int.class,
                int.class,
                int.class});
      }
      m_Mozilla_OnLocationChange =
          mozClass.getDeclaredMethod("OnLocationChange", new Class[]{
              long.class,
              long.class,
              long.class});
      try {
        m_Mozilla_OnStatusChange[0] =
            mozClass.getDeclaredMethod("OnStatusChange", new Class[]{
                long.class,
                long.class,
                long.class,
                long.class});
      } catch (NoSuchMethodException nsme) {
        m_Mozilla_OnStatusChange[0] =
            mozClass.getDeclaredMethod("OnStatusChange", new Class[]{
                long.class,
                long.class,
                int.class,
                long.class});
      }
      try {
        m_Mozilla_OnSecurityChange[0] =
            mozClass.getDeclaredMethod("OnSecurityChange", new Class[]{
                long.class,
                long.class,
                long.class});
      } catch (NoSuchMethodException nsme) {
        m_Mozilla_OnSecurityChange[0] =
            mozClass.getDeclaredMethod("OnSecurityChange", new Class[]{
                long.class,
                long.class,
                int.class});
      }
      // get them accessible
      m_Mozilla_QueryInterface.setAccessible(true);
      m_Mozilla_AddRef.setAccessible(true);
      m_Mozilla_Release.setAccessible(true);
      m_Mozilla_OnLocationChange.setAccessible(true);
      m_Mozilla_OnStateChange[0].setAccessible(true);
      m_Mozilla_OnProgressChange[0].setAccessible(true);
      m_Mozilla_OnStatusChange[0].setAccessible(true);
      m_Mozilla_OnSecurityChange[0].setAccessible(true);
      // create own web progress listener instance
      XPCOMObject webProgressListener = new XPCOMObject(new int[]{2, 0, 0, 4, 6, 3, 4, 3}) {
        private Object[] prepareArgs(Method method, long[] args) {
          Class<?>[] parameterTypes = method.getParameterTypes();
          int count = parameterTypes.length;
          Object[] result = new Object[count];
          for (int i = 0; i < count; ++i) {
View Full Code Here

Examples of org.eclipse.swt.internal.mozilla.XPCOMObject

    }
    try {
      // get old web progress listener instance and dispose
      Field f_Mozilla_webProgressListener = mozClass.getDeclaredField("webProgressListener");
      f_Mozilla_webProgressListener.setAccessible(true);
      final XPCOMObject oldWebProgressListener =
          (XPCOMObject) f_Mozilla_webProgressListener.get(m_webBrowser);
      oldWebProgressListener.dispose();
      // get methods which needed to delegate to
      final Method m_Mozilla_QueryInterface =
          mozClass.getDeclaredMethod("QueryInterface", new Class[]{long.class, long.class});
      final Method m_Mozilla_AddRef = mozClass.getDeclaredMethod("AddRef", new Class[0]);
      final Method m_Mozilla_Release = mozClass.getDeclaredMethod("Release", new Class[0]);
      final Method m_Mozilla_OnLocationChange;
      final Method[] m_Mozilla_OnStateChange = new Method[1];
      final Method[] m_Mozilla_OnProgressChange = new Method[1];
      final Method[] m_Mozilla_OnStatusChange = new Method[1];
      final Method[] m_Mozilla_OnSecurityChange = new Method[1];
      try {
        // eclipse 3.3
        m_Mozilla_OnStateChange[0] =
            mozClass.getDeclaredMethod("OnStateChange", new Class[]{
                long.class,
                long.class,
                long.class,
                long.class});
      } catch (NoSuchMethodException nsme) {
        // eclipse 3.4
        m_Mozilla_OnStateChange[0] =
            mozClass.getDeclaredMethod("OnStateChange", new Class[]{
                long.class,
                long.class,
                int.class,
                int.class});
      }
      try {
        m_Mozilla_OnProgressChange[0] =
            mozClass.getDeclaredMethod("OnProgressChange", new Class[]{
                long.class,
                long.class,
                long.class,
                long.class,
                long.class,
                long.class});
      } catch (NoSuchMethodException nsme) {
        m_Mozilla_OnProgressChange[0] =
            mozClass.getDeclaredMethod("OnProgressChange", new Class[]{
                long.class,
                long.class,
                int.class,
                int.class,
                int.class,
                int.class});
      }
      m_Mozilla_OnLocationChange =
          mozClass.getDeclaredMethod("OnLocationChange", new Class[]{
              long.class,
              long.class,
              long.class});
      try {
        m_Mozilla_OnStatusChange[0] =
            mozClass.getDeclaredMethod("OnStatusChange", new Class[]{
                long.class,
                long.class,
                long.class,
                long.class});
      } catch (NoSuchMethodException nsme) {
        m_Mozilla_OnStatusChange[0] =
            mozClass.getDeclaredMethod("OnStatusChange", new Class[]{
                long.class,
                long.class,
                int.class,
                long.class});
      }
      try {
        m_Mozilla_OnSecurityChange[0] =
            mozClass.getDeclaredMethod("OnSecurityChange", new Class[]{
                long.class,
                long.class,
                long.class});
      } catch (NoSuchMethodException nsme) {
        m_Mozilla_OnSecurityChange[0] =
            mozClass.getDeclaredMethod("OnSecurityChange", new Class[]{
                long.class,
                long.class,
                int.class});
      }
      // get them accessible
      m_Mozilla_QueryInterface.setAccessible(true);
      m_Mozilla_AddRef.setAccessible(true);
      m_Mozilla_Release.setAccessible(true);
      m_Mozilla_OnLocationChange.setAccessible(true);
      m_Mozilla_OnStateChange[0].setAccessible(true);
      m_Mozilla_OnProgressChange[0].setAccessible(true);
      m_Mozilla_OnStatusChange[0].setAccessible(true);
      m_Mozilla_OnSecurityChange[0].setAccessible(true);
      // create own web progress listener instance
      XPCOMObject webProgressListener = new XPCOMObject(new int[]{2, 0, 0, 4, 6, 3, 4, 3}) {
        private Object[] prepareArgs(Method method, long[] args) {
          Class<?>[] parameterTypes = method.getParameterTypes();
          int count = parameterTypes.length;
          Object[] result = new Object[count];
          for (int i = 0; i < count; ++i) {
View Full Code Here

Examples of org.eclipse.swt.internal.mozilla.XPCOMObject

      return;
    }
    // get old web progress listener instance and dispose
    Field f_Mozilla_webProgressListener = mozClass.getDeclaredField("webProgressListener");
    f_Mozilla_webProgressListener.setAccessible(true);
    final XPCOMObject oldWebProgressListener =
        (XPCOMObject) f_Mozilla_webProgressListener.get(m_webBrowser);
    oldWebProgressListener.dispose();
    // get methods which needed to delegate to
    final Method m_Mozilla_QueryInterface =
        mozClass.getDeclaredMethod("QueryInterface", new Class[]{int.class, int.class});
    final Method m_Mozilla_AddRef = mozClass.getDeclaredMethod("AddRef", new Class[0]);
    final Method m_Mozilla_Release = mozClass.getDeclaredMethod("Release", new Class[0]);
    final Method m_Mozilla_OnStateChange =
        mozClass.getDeclaredMethod("OnStateChange", new Class[]{
            int.class,
            int.class,
            int.class,
            int.class});
    final Method m_Mozilla_OnProgressChange =
        mozClass.getDeclaredMethod("OnProgressChange", new Class[]{
            int.class,
            int.class,
            int.class,
            int.class,
            int.class,
            int.class});
    final Method m_Mozilla_OnLocationChange =
        mozClass.getDeclaredMethod("OnLocationChange", new Class[]{int.class, int.class, int.class});
    final Method m_Mozilla_OnStatusChange =
        mozClass.getDeclaredMethod("OnStatusChange", new Class[]{
            int.class,
            int.class,
            int.class,
            int.class});
    final Method m_Mozilla_OnSecurityChange =
        mozClass.getDeclaredMethod("OnSecurityChange", new Class[]{int.class, int.class, int.class});
    // get them accessible
    m_Mozilla_QueryInterface.setAccessible(true);
    m_Mozilla_AddRef.setAccessible(true);
    m_Mozilla_Release.setAccessible(true);
    m_Mozilla_OnStateChange.setAccessible(true);
    m_Mozilla_OnProgressChange.setAccessible(true);
    m_Mozilla_OnLocationChange.setAccessible(true);
    m_Mozilla_OnStatusChange.setAccessible(true);
    m_Mozilla_OnSecurityChange.setAccessible(true);
    // create own web progress listener instance
    XPCOMObject webProgressListener = new XPCOMObject(new int[]{2, 0, 0, 4, 6, 3, 4, 3}) {
      private Integer[] prepareArgs(int[] args, int count) {
        Integer[] result = new Integer[count];
        for (int i = 0; i < count; ++i) {
          result[i] = new Integer(args[i]);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.