CN103019735A - Method and system for executing moving object of browser and browser - Google Patents

Method and system for executing moving object of browser and browser Download PDF

Info

Publication number
CN103019735A
CN103019735A CN2012105726006A CN201210572600A CN103019735A CN 103019735 A CN103019735 A CN 103019735A CN 2012105726006 A CN2012105726006 A CN 2012105726006A CN 201210572600 A CN201210572600 A CN 201210572600A CN 103019735 A CN103019735 A CN 103019735A
Authority
CN
China
Prior art keywords
moving object
script
plug
unit
agent
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2012105726006A
Other languages
Chinese (zh)
Other versions
CN103019735B (en
Inventor
李鸣
李锦伟
贺跃松
陈志�
任寰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201210572600.6A priority Critical patent/CN103019735B/en
Publication of CN103019735A publication Critical patent/CN103019735A/en
Priority to PCT/CN2013/082659 priority patent/WO2014101455A1/en
Priority to US14/655,159 priority patent/US10218767B2/en
Application granted granted Critical
Publication of CN103019735B publication Critical patent/CN103019735B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method and a system for executing a moving object of a browser and a browser, wherein the method comprises the steps of: obtaining a type of a plug-in module before building a moving object; intercepting a process of building the moving object by a page process, according to the type of the plug-in module, building a proxy object for replacing the moving object to be actually built; when the page process activates the proxy object, building the moving object to be actually built in an independent process independent from the page process according to the type of the plug-in module; respectively building a communication window in the moving object and the proxy object; and carrying out communication on the moving object and the proxy object through the communication windows for realizing that the proxy object calls the moving object and/or the moving object calls the proxy object. According to the invention, the proxy object is operated in the page process, and the moving object is operated in the independent process, and thus the actual Active X plug-in module is separated from the page process.

Description

The manner of execution of browser moving object, system and browser
Technical field
The present invention relates to technical field of the computer network, be specifically related to a kind of manner of execution, system and browser of browser moving object.
Background technology
The page process of browser is understood the activity of constructing object when open any browser, then carries out the operations of the page, and described moving object is often referred to the plug-in unit of browser, for example the ActiveX plug-in unit.
The ActiveX plug-in unit is a kind of expansion interface mode that strengthens viewing experience of the IE kernel browser support of Microsoft, representational plug-in unit have Flash, Baidu audio-visual, broadcast soon (QVOD) etc.The ActiveX plug-in unit is a kind of reusable component software, by using the ActiveX plug-in unit, can add soon special function in network address, desk-top application program and developing instrument.Can be used for immediately adding action message such as the StockTicker plug-in unit on webpage, the animation plug-in unit can be used to add animated characteristics in webpage.
When the ActiveX plug-in unit moves in the page process of IE browser, because ActiveX plug-in unit quantity is various, running environment is complicated, and the opening of ActiveX plug-in unit, caused ActiveX plug-in unit average quality relatively poor, in case the problems such as stuck or collapse appear in the ActiveX plug-in unit, can cause full page to withdraw from, and have affected the stability of page operation.Otherwise, if the problems such as stuck or collapse appear in page process for a certain reason, can cause the ActiveX plug-in unit in the page to withdraw from, affected the stability of ActiveX plug-in unit.
Summary of the invention
In view of the above problems, the present invention has been proposed in order to a kind of manner of execution of executive system, browser and corresponding browser moving object of the browser moving object that overcomes the problems referred to above or address the above problem at least in part is provided.
According to an aspect of the present invention, provide a kind of manner of execution of browser moving object, described moving object is object corresponding to plug-in unit, and described method comprises: before moving object creates, know the type of plug-in unit; The process of interception page process creation moving object according to the type of described plug-in unit, creates agent object and replaces the actual moving object that will create, and described agent object moves in page process; When page process activates described agent object, according to the type of described plug-in unit, in the detached process that is independent of page process, create the described actual moving object that will create, described moving object is moved in detached process; In moving object and agent object, create respectively communication window; Described moving object and agent object communicate by described communication window, realize proxy object invocation moving object and/or active object calls agent object.
According to a further aspect in the invention, provide a kind of executive system of browser moving object, having comprised: page process module is suitable for knowing the type of plug-in unit before moving object creates; And the process of interception page process creation moving object according to the type of described plug-in unit, creates agent object and replaces the actual moving object that will create, and described agent object moves in page process; The detached process module is suitable for when page process activates described agent object, according to the type of described plug-in unit, creates the described actual moving object that will create in the detached process that is independent of page process, and described moving object is moved in detached process; Be arranged in described page process module agent object, be arranged in the moving object of described detached process module and create respectively communication window in moving object and agent object, described moving object is moving object corresponding to plug-in unit, described moving object and agent object communicate by described communication window, realize proxy object invocation moving object and/or active object calls agent object.
According to another aspect of the invention, provide a kind of browser, comprised the executive system of above-mentioned browser moving object.
In the present invention, by in page process, moving agent object, and in detached process, move moving object, so that real ActiveX plug-in unit separates with page process, thereby make the ActiveX plug-in unit Shi Buhui that goes wrong affect page process, improved the stability of browser, when the safety issue such as virus especially occurring when the ActiveX plug-in unit, can not exert an influence to page process yet, improve the security of browser; Simultaneously, page process goes wrong can not affect the normal operation of ActiveX plug-in unit, has improved the stability of ActiveX plug-in unit.And the present invention is compatible with all ActiveX plug-in units, is included in the plug-in unit of its script security of statement in the registration table and the plug-in unit of not stating its script security.
Above-mentioned explanation only is the general introduction of technical solution of the present invention, for can clearer understanding technological means of the present invention, and can be implemented according to the content of instructions, and for above and other objects of the present invention, feature and advantage can be become apparent, below especially exemplified by the specific embodiment of the present invention.
Description of drawings
By reading hereinafter detailed description of the preferred embodiment, various other advantage and benefits will become cheer and bright for those of ordinary skills.Accompanying drawing only is used for the purpose of preferred implementation is shown, and does not think limitation of the present invention.And in whole accompanying drawing, represent identical parts with identical reference symbol.In the accompanying drawings:
Fig. 1 shows the according to an embodiment of the invention process flow diagram of the manner of execution of browser moving object;
Fig. 2 shows the synoptic diagram of the constructive process of agent object and moving object among the present invention;
Fig. 3 shows the process flow diagram of a kind of method of the script by agent object executed activity object among the present invention;
Fig. 4 shows among the present invention the process flow diagram of the method for another kind of script by agent object executed activity object;
Fig. 5 shows among the present invention the process flow diagram by the method for the script of moving object agents object;
Fig. 6 shows the according to an embodiment of the invention structured flowchart of the executive system of browser moving object;
Fig. 7 shows the in accordance with another embodiment of the present invention structured flowchart of the executive system of browser moving object;
Fig. 8 shows the structured flowchart of executive system of the browser moving object of another embodiment according to the present invention.
Embodiment
Exemplary embodiment of the present disclosure is described below with reference to accompanying drawings in more detail.Although shown exemplary embodiment of the present disclosure in the accompanying drawing, yet should be appreciated that and to realize the disclosure and the embodiment that should do not set forth limits here with various forms.On the contrary, it is in order to understand the disclosure more thoroughly that these embodiment are provided, and can with the scope of the present disclosure complete convey to those skilled in the art.
Fig. 1 shows the according to an embodiment of the invention process flow diagram of the manner of execution 100 of browser moving object.In this method, moving object is object corresponding to ActiveX plug-in unit.As shown in Figure 1, method 100 starts from step S101, wherein before moving object creates, knows the type of plug-in unit.Specifically, in the page, have in the situation of ActiveX plug-in unit, before the page process creation ActiveX of browser plug-in unit, at first inquire about registration table, check the security of whether stating the script of this plug-in unit in the registration table relevant with this plug-in unit.The plug-in unit of security of having stated the script of plug-in unit in the registration table is called first kind plug-in unit herein, just belongs to first kind plug-in unit such as the Flash plug-in unit; The plug-in unit of security of not stating the script of plug-in unit in the registration table is called the Equations of The Second Kind plug-in unit, and the video playback plug-in unit such as, QVOD audio-visual such as Baidu just belongs to the Equations of The Second Kind plug-in unit.Therefore, can know the type of working as anterior plug-in according to the security of the script of whether stating this plug-in unit in the registration table, be first kind plug-in unit if work as anterior plug-in, then jumps to step S104; If working as anterior plug-in is the Equations of The Second Kind plug-in unit, then execution in step S102.
In step S102, for the Equations of The Second Kind plug-in unit, after the inquiry registration table, create and pre-create moving object.
After step S102, method 100 enters step S103, wherein tackles the security interface (IObjectSafety interface) that the inquiry of page process pre-creates moving object, directly returns the information that indication plug unit is safety insert.For the plug-in unit of in registration table, not stating the security of its script, can determine by the IObjectSafety that pre-creates moving object that inquires about this plug-in unit the security of this plug-in unit, the moving object of establishment plug-in unit that only just can be real in the situation of confirming plug-in security.For the Equations of The Second Kind plug-in unit, if do not carry out special processing herein, will show the information of warning or not creating object, so that this class plug-in unit can't normally move.So when the inquiry of page process pre-creates the IObjectSafety interface of moving object, tackle for this interface, return the IObjectSatety interface of having indicated plug-in security to it, return INTERFACESAFE_FOR_UNTRUSTED_CALLER|INTERFACESAFE_FOR_UNT RUSTED_DATA by GetInterfaceSafetyOptions, represent this plug-in unit be script safety and also initialization safety, thus can be smoothly check by security.
Fig. 2 shows the synoptic diagram of the constructive process of agent object and moving object among the present invention.As shown in Figure 2, operation has the Web page and agent object in the page process, and operation has empty page and moving object in the detached process.Below with reference to Fig. 2 subsequent step is done further introduction.
After step S103, method 100 enters step S104, wherein tackles the process of page process creation moving object, creates agent object and replaces the actual moving object that will create, and this agent object moves in page process.Specifically, when the page process creation moving object of browser, interception CoGetClassObject, create agent object and replace the actual moving object that will create, this agent object comprises a series of interfaces, comprise a lot of standard interfaces that the IUnknown pointer will call, such as IOleObject, IViewObject etc.Then when calling the CreateInstance of IClassFactory, the agent object that creates is returned to the IUnknown pointer of page process.Agent object creates and finishes thus.
Subsequently, method 100 enters step S105, wherein when page process activates agent object, in the detached process that is independent of page process, creates the actual moving object that will create, and this moving object is moved in detached process.Specifically, when page process activates agent object, extract the relevant informations such as attribute, URL, size of this plug-in unit, then create a detached process.At first, create a file (document), namely empty page inserts an object (object) therein, and this detached process is called CoGetClassObject, tackles this CoGetClassObject, creates a moving object.This moving object comprises a series of interface, comprises a lot of standard interfaces that the IUnknown pointer will call, such as IOleObject, IViewObject etc.Then when calling the CreateInstance of IClassFactory, the moving object that creates is returned to the IUnknown pointer of detached process.Moving object creates and finishes thus, and this moving object is really to realize the object of pin function.
In the constructive process of moving object, can not realize the IWebBrowser2 interface for first kind plug-in unit, moving object still can normally create.But for the Equations of The Second Kind plug-in unit, if do not realize the IWebBrowser2 interface, moving object creates will be failed.The purpose that realizes the IWebBrowser2 interface mainly is to realize redirect (Navigate method), obtain the URL(get_LocationURL method), obtain the function such as the page (the IHtmlDocument interface under the get_document method).In order to realize these functions, if plug-in unit is the Equations of The Second Kind plug-in unit, then when detached process inquiry IWebBrowser2 interface, it is tackled, return the IWebBrowser2 interface from establishment, thereby create the moving object of above-mentioned Equations of The Second Kind plug-in unit.
Subsequently, method 100 enters step S106, wherein creates respectively the communication window related with plug-in object in agent object and moving object, for agent object and moving object are communicated.By these two communication windows, two objects can be for size, the focus of plug-in unit, refresh, script and out of Memory carry out alternately.
Subsequently, method 100 enters step S107, and wherein moving object and agent object communicate by communication window, realizes proxy object invocation moving object and/or active object calls agent object, thereby realizes the function that plug-in unit will be realized.
Further, if in the Web page nested structure is arranged, i.e. page process operation has a plurality of parent pages and a plurality of subpage frame.When subpage frame of page process creation and agent object thereof, the agent object ID(of subpage frame also can be comprised its URL) and the agent object ID(of the parent page of this subpage frame also can comprise its URL) send to detached process, in detached process according to the hierarchical structure activity of constructing object of correspondence.In this case, the agent object that runs in the page process is a plurality of, the moving object that runs in the detached process is a plurality of, agent object and moving object are corresponding one by one, the communication window of the communication window of each agent object and the moving object corresponding with this agent object has corresponding attribute, realizes communicating by letter of moving objects and the agent object corresponding with it by these two communication windows.
In the method, by in page process, moving agent object, and in detached process, move moving object, so that real ActiveX plug-in unit separates with page process, thereby make the ActiveX plug-in unit Shi Buhui that goes wrong affect page process, improved the stability of browser, when the safety issue such as virus especially occurring when the ActiveX plug-in unit, can not exert an influence to page process yet, improve the security of browser; Simultaneously, page process goes wrong can not affect the normal operation of ActiveX plug-in unit, has improved the stability of ActiveX plug-in unit.And this method is compatible with all ActiveX plug-in units, is included in the plug-in unit of its script security of statement in the registration table and the plug-in unit of not stating its script security.
In said method, because real ActiveX plug-in unit separates with page process, when wishing that the plug-in unit form shows in the former Web page, plug-in unit form that can moving object is corresponding is arranged on the plug-in unit form position of the former Web page, plug-in unit form corresponding to this moving object can move, convergent-divergent, and the Web page is unaffected.
According to the method that above-described embodiment provides, the plug-in unit form is not rolled thereupon.Specifically, according to existing operation, when the Web page rolled, the GetWindow method that can call the IOleWindow interface of moving object judged whether moving object has corresponding form, if form is arranged then move form by sending WM_MOVE message.But this method can be returned null value when the GetWindow method of the IOleWindow interface that calls moving object, and form just can not roll thereupon like this.
Further, on the above-mentioned basis that has created agent object and moving object, the communication between moving object and the agent object comprises the script implementation between process.This script implementation comprises the process by the script of agent object executed activity object, and by the process of the script of moving object agents object, the below is introduced respectively.
Fig. 3 shows the process flow diagram of a kind of method 300 of the script by agent object executed activity object among the present invention.The method is applicable to the script of the agent object executed activity object of first kind plug-in unit, and namely the method is the method that runs on the page in the moving object control page process of the first kind plug-in unit in the detached process.As shown in Figure 3, method 300 starts from step S301, and wherein moving object sends to agent object by communication window with script.Click the button that creates on the plug-in unit with the user, triggering page blackening is example, and when the user clicked button on the plug-in unit, moving object was obtained the script that button is clicked operational correspondence, and this script is sent to agent object by communication window.
Subsequently, method 300 enters step S302, wherein carries out relevant interface with script in the agent object query page process, obtains the script manner of execution according to this interface.After agent object receives the script of above-mentioned button click operational correspondence, inquire about and obtain the IHTMLWindow interface in the page process, the IHTMLWindow interface is to carry out relevant interface with script, ExecScript in this IHTMLWindow interface is for being used for carrying out the function of script, and namely the ExecScript function provides the script manner of execution.
Subsequently, method 300 enters step S303, and wherein agent object is carried out this script according to the script manner of execution.Agent object provides the script manner of execution to carry out the script that above-mentioned button is clicked operational correspondence according to the ExecScript function, makes page blackening.
Fig. 4 shows among the present invention the process flow diagram of the method 400 of another kind of script by agent object executed activity object.The method is applicable to the script of the agent object executed activity object of Equations of The Second Kind plug-in unit, and namely the method is the method that runs on the page in the moving object control page process of the Equations of The Second Kind plug-in unit in the detached process.As shown in Figure 4, method 400 starts from step S401, and wherein moving object sends to agent object by communication window with script.Click the button that creates on the plug-in unit form with the user, triggering page blackening is example, and when the user clicked button on the plug-in unit form, the moving object of plug-in unit was obtained the script that button is clicked operational correspondence, and this script is sent to agent object by communication window.
Subsequently, method 400 enters step S402, wherein moving object allows agent object carry out the method for obtaining the scheduling identification of pending method in the script by calling the dispatch interface of agent object, by communication window scheduling identification is returned to moving object after agent object obtains this scheduling identification.Specifically, at first detached process is resolved the script that button is clicked operational correspondence, obtain method pending in this script for making page blackening, then the title of method pending in the script is transferred in the IDispatch interface of moving object, the IDispatch interface is dispatch interface, be used for calling the function of the language program of not supporting virtual table, the IDispatch interface has GetIDsOfNames function and Invoke function, wherein the GetIDsOfNames function provides the method that the title of utilizing method is returned its dispatch id, and the Invoke function provides the instruction of the dispatch id manner of execution of utilizing method.Because the page corresponding to moving object is empty page, it does not possess the method that makes page blackening, so moving object can't be known the scheduling identification (ID) of the method in the script, moving object is called the IDispatch interface of agent object by communication window so.Because the Web page corresponding to agent object is the complete page, the method that provides by the GetIDsOfNames function that calls agent object, can allow agent object obtain the dispatch id of pending method in the script, then agent object returns to moving object by communication window with this dispatch id.
Subsequently, method 400 enters step S403, wherein carries out the instruction of pending method in the script in the moving object interception detached process, and this instruction is sent to agent object.Specifically, after moving object obtains the dispatch id of pending method, this dispatch id is fed back to the page, next step just will carry out the instruction of Invoke (ID) according to old process detached process, but this method is tackled the instruction of the Invoke (ID) of detached process here, and the instruction of Invoke (ID) is sent to agent object.
Subsequently, method 400 enters step S404, and wherein agent object is carried out pending method in the script by carrying out instruction, then execution result is returned to moving object.Specifically, agent object is carried out the instruction of Invoke (ID), thereby carries out pending method in the script, makes page blackening, and the notification message of page blackening is returned to moving object.
Fig. 5 shows among the present invention the process flow diagram by the method 500 of the script of moving object agents object.The method is applicable to the script of the moving object agents object of all kinds of plug-in units (comprising first kind plug-in unit and Equations of The Second Kind plug-in unit), and namely the method is the method for moving object in the page control detached process that runs in the page process.If the page is wanted to obtain information (such as attributes such as version number, path, URL) or the page of plug-in unit and wanted to operate plug-in unit (wanting to change the size of plug-in unit form such as the page), can realize by the method.As shown in Figure 5, method 500 starts from step S501, and wherein agent object sends to moving object by communication window with script.To obtain plug-in version number as example, because the agent object in the page process is not real plug-in object, it does not also know the version number of plug-in unit, thereby agent object can not directly feed back the version number of plug-in unit to the page.Detached process create finish moving object after, can be to the variable of page informing movement object, the page development person writes the script of the version number that obtains plug-in unit according to this variable in the page, pending method is exactly to obtain the version number of plug-in unit in this script.Agent object sends to moving object by the script that communication window will obtain the version number of plug-in unit.
Subsequently, method 500 enters step S502, wherein agent object allows moving object carry out the method for obtaining the scheduling identification of pending method in the script by calling the dispatch interface of moving object, by communication window scheduling identification is returned to agent object after moving object is obtained this scheduling identification.Specifically, at first the page is resolved script, the title of method pending in this script is transferred in the IDispatch interface of agent object, the IDispatch interface is dispatch interface, be used for calling the function of the language program of not supporting virtual table, the IDispatch interface has GetIDsOfNames function and Invoke function, wherein the GetIDsOfNames function provides the method that the title of utilizing method is returned its dispatch id, and the Invoke function provides the instruction of the dispatch id manner of execution of utilizing method.Because agent object can't be known the scheduling identification (ID) of pending method in the script, so agent object calls the IDispatch interface of moving object by communication window.And moving object is the object of real plug-in unit, so method that provides by the GetIDsOfNames function that calls moving object, can allow moving object obtain the dispatch id of pending method, then moving object returns to agent object by communication window with this dispatch id.
Subsequently, method 500 enters step S503, wherein carries out the instruction of pending method in the script in the agent object interception page process, and this instruction is sent to moving object.Specifically, after agent object obtains the dispatch id of pending method, this dispatch id is fed back to the page, next step will carry out the instruction of Invoke (ID) according to old process page process, this method is tackled the instruction of the Invoke (ID) of page process here, and the instruction of Invoke (ID) is sent to moving object.
Subsequently, method 500 enters step S504, and wherein moving object is carried out pending method in the script by carrying out instruction, then execution result is returned to agent object.Specifically, moving object is carried out the instruction of Invoke (ID), thereby carries out pending method in the script, obtains the version number of plug-in unit, and the version number of plug-in unit is returned to agent object, and then agent object can feed back to the page with the version number of plug-in unit.
According to the script manner of execution between above-mentioned process, so that agent object can the executed activity object script, moving object can the agents object script, thereby realized running on moving object in the detached process to running on the control of the page in the page process, and run on the page in the page process to running on the control of the moving object in the detached process.
Fig. 6 shows the according to an embodiment of the invention structured flowchart of the executive system of browser moving object.As shown in Figure 6, this system comprises page process module 610 and detached process module 620, is arranged in the agent object 611 of page process module 610 and is arranged in the moving object 621 of detached process module 620 and the communication window 630 that creates respectively at moving object 611 and agent object 621.Moving object in the native system is moving object corresponding to ActiveX plug-in unit, and this ActiveX plug-in unit can be for Flash, Baidu is audio-visual or QVOD(broadcasts soon) etc. the video playback plug-in unit, but the present invention is not limited only to this.
Page process module 610 is suitable for knowing the type of plug-in unit before moving object creates; And the process of interception page process creation moving object according to the type of plug-in unit, creates agent object 611 and replaces the actual moving object that will create, and agent object 611 moves in page process.In the page, have in the situation of ActiveX plug-in unit, before page process module 610 creates the ActiveX plug-in unit, at first inquire about registration table, check the security of whether stating the script of this plug-in unit in the registration table relevant with this plug-in unit.If in registration table, stated the security of the script of plug-in unit, know that then this plug-in unit is first kind plug-in unit, just belongs to first kind plug-in unit such as the Flash plug-in unit; If in registration table, do not state the security of the script of plug-in unit, know that then this plug-in unit is the Equations of The Second Kind plug-in unit, the video playback plug-in unit such as, QVOD audio-visual such as Baidu just belongs to the Equations of The Second Kind plug-in unit.
If know that according to the type of plug-in unit plug-in unit is the Equations of The Second Kind plug-in unit, then page process module 610 also is suitable for tackling the security interface that the inquiry of page process pre-creates moving object, and returning expression Equations of The Second Kind plug-in unit is the information of safety insert.For the Equations of The Second Kind plug-in unit, after the inquiry registration table, create and pre-create moving object.When 610 inquiries of page process module pre-create the IObjectSafety interface of moving object, tackle for this interface, return the IObjectSatety interface of having indicated plug-in security to it, return INTERFACESAFE_FOR_UNTRUSTED_CALLER|INTERFACESAFE_FOR_UNT RUSTED_DATA by GetInterfaceSafetyOptions, represent this plug-in unit be script safety and also initialization safety, thus can be smoothly check by security.
When the page process creation moving object of browser, page process module 610 interception CoGetClassObject, create agent object 611 and replace the actual moving object that will create, this agent object 611 comprises a series of interfaces, comprise a lot of standard interfaces that the IUnknown pointer will call, such as IOleObject, IViewObject etc.Then when calling the CreateInstance of IClassFactory, the agent object 611 that creates is returned to the IUnknown pointer of page process.Agent object 611 creates and finishes thus.
Detached process module 620 is suitable for when page process activates agent object 611, according to the type of plug-in unit, creates the actual moving object that will create 621 in the detached process that is independent of page process, and moving object 621 is moved in detached process.When page process activates agent object 611, extract the relevant informations such as attribute, URL, size of this plug-in unit, then create a detached process.At first, create a file (document), namely empty page inserts an object (object) therein, and this detached process is called CoGetClassObject, and detached process module 620 these CoGetClassObject of interception create a moving object 621.This moving object 621 comprises a series of interface, comprises a lot of standard interfaces that the IUnknown pointer will call, such as IOleObject, IViewObject etc.Then when calling the CreateInstance of IClassFactory, the moving object 621 that creates is returned to the IUnknown pointer of detached process.Moving object 621 creates and finishes thus, and this moving object 621 is really to realize the object of pin function.
If know that according to the type of plug-in unit plug-in unit is the Equations of The Second Kind plug-in unit, detached process module 620 is further adapted for interception detached process inquiry IWebBrowser2 interface, returns from the IWebBrowser2 interface that creates, thereby creates the actual moving object that will create 621.
Moving object 621 and agent object 611 communicate by communication window 630, realize that agent object 611 calls moving object 621 and/or moving object 621 is called agent object 611.By these two communication windows, two objects can be for size, the focus of plug-in unit, refresh, script and out of Memory carry out alternately.
Further, when in the Web page nested structure being arranged, page process module 610 comprises a plurality of agent objects, detached process module 620 comprises a plurality of moving objects, agent object and moving object are corresponding one by one, the communication window of the communication window of agent object and the moving object corresponding with agent object has corresponding attribute, realizes communicating by letter of moving objects and agent object by these two communication windows.
In native system, by in page process, moving agent object, and in detached process, move moving object, so that real ActiveX plug-in unit separates with page process, thereby make the ActiveX plug-in unit Shi Buhui that goes wrong affect page process, improved the stability of browser, when the safety issue such as virus especially occurring when the ActiveX plug-in unit, can not exert an influence to page process yet, improve the security of browser; Simultaneously, page process goes wrong can not affect the normal operation of ActiveX plug-in unit, has improved the stability of ActiveX plug-in unit.And native system is compatible with all ActiveX plug-in units, is included in the plug-in unit of its script security of statement in the registration table and the plug-in unit of not stating its script security.
Fig. 7 shows the in accordance with another embodiment of the present invention structured flowchart of the executive system of browser moving object.On the basis of system shown in Figure 6, can interaction scripts between the agent object 711 in page process module 710 in the native system and the moving object in detached process module 720 721, be the script that agent object 711 can executed activity object 721, the script that moving object 721 also can agents object 711.Agent object 711 in the system shown in Figure 7 and moving object 721 are to know that in page process module 710 plug-in unit is to create in the situation of first kind plug-in unit.
Moving object 721 comprises the first sending module 722.Agent object 711 comprises the first enquiry module 712 and the first execution module 713.
The first sending module 722 is suitable for by communication window 730 script being sent to agent object 711.Click the button that creates on the plug-in unit with the user, triggering page blackening is example, when the user clicked button on the plug-in unit, moving object 721 was obtained the script that button is clicked operational correspondence, by the first sending module 722 this script is sent to agent object 711 by communication window 730.
The first enquiry module 712 is suitable for carrying out relevant interface with script in the query page process, obtains the script manner of execution according to this interface; The first execution module 713 is suitable for carrying out script according to the script manner of execution.After agent object 711 receives the script of above-mentioned button click operational correspondence, the IHTMLWindow interface in the page process is inquired about and obtained to the first enquiry module 712, the IHTMLWindow interface is to carry out relevant interface with script, ExecScript in this IHTMLWindow interface is for being used for carrying out the function of script, and namely the ExecScript function provides the script manner of execution.The first execution module 713 provides the script manner of execution to carry out the script that above-mentioned button is clicked operational correspondence according to the ExecScript function, makes page blackening.
Agent object 711 also comprises the 3rd sending module 714, the 3rd scheduling identification acquisition module 715 and the 3rd blocking module 716, and wherein the 3rd scheduling identification acquisition module 715 further comprises the 3rd calling module 717 and the 3rd scheduling identification receiver module 718.Moving object 721 also comprises the 3rd receiver module 723 and the 3rd execution module 724.
The 3rd sending module 714 is suitable for by communication window 730 script being sent to moving object 721.To obtain plug-in version number as example, because the agent object 711 in the page process is not real plug-in object, it does not also know the version number of plug-in unit, thereby agent object 711 can not directly feed back the version number of plug-in unit to the page.After moving object 721 is finished in the detached process establishment, can be to the variable of page informing movement object 721, the page development person writes the script of the version number that obtains plug-in unit according to this variable in the page, pending method is exactly to obtain the version number of plug-in unit in this script.The 3rd sending module 714 sends to moving object 721 by the script that communication window 730 will obtain the version number of plug-in unit.
The 3rd scheduling identification acquisition module 715 is suitable for obtaining the scheduling identification of pending method in the script by calling the dispatch interface of moving object 721.Wherein, the 3rd calling module 717 is suitable for by calling the dispatch interface of moving object 721, allows moving object 721 carry out the method for obtaining the scheduling identification of pending method in the script and obtains scheduling identification; The 3rd scheduling identification receiver module 718 is suitable for receiving the scheduling identification that moving object 721 is returned by communication window 730.At first page process module 710 is resolved script, the title of method pending in this script is transferred in the IDispatch interface of agent object 711.Because agent object 711 can't be known the scheduling identification (ID) of pending method in the script, so the 3rd calling module 717 of agent object 711 calls the IDispatch interface of moving object 721 by communication window 730.And moving object 721 is objects of real plug-in unit, so method that provides by the GetIDsOfNames function that calls moving object 721, can allow moving object 721 obtain the dispatch id of pending method, then moving object 721 returns to this dispatch id by communication window 730 the 3rd scheduling identification receiver module 718 of agent object 711.
The 3rd blocking module 716 is suitable for tackling the instruction of carrying out pending method in the script in the page process, and instruction is sent to moving object 721.After agent object 711 obtains the dispatch id of pending method, this dispatch id is fed back to the page, next step will carry out the instruction of Invoke (ID) according to old process page process, but the instruction of the Invoke (ID) of the page of the 3rd blocking module 716 interception here processes sends to moving object 721 with the instruction of Invoke (ID).
The 3rd receiver module 723 is suitable for the script of the 3rd sending module 714 transmissions in the Receiving Agent object 711 and the instruction that the 3rd blocking module 716 sends; The 3rd execution module 724 is suitable for carrying out pending method in the script by carrying out instruction, then execution result is returned to agent object 711.
Function according to the realization of above-mentioned functions module, so that the agent object of first kind plug-in unit can the executed activity object script, moving object can the agents object script, thereby realized running on moving object in the detached process to running on the control of the page in the page process, and run on the page in the page process to running on the control of the moving object in the detached process.
Fig. 8 shows the structured flowchart of executive system of the browser moving object of another embodiment according to the present invention.On the basis of system shown in Figure 6, can interaction scripts between the agent object 811 in page process module 810 in the native system and the moving object in detached process module 820 821, be the script that agent object 811 can executed activity object 821, the script that moving object 821 also can agents object 811.Agent object 811 in the system shown in Figure 8 and moving object 821 are to know that in page process module 810 plug-in unit is to create in the situation of Equations of The Second Kind plug-in unit.
Moving object 821 comprises the second sending module 822, the second scheduling identification acquisition module 823 and the second blocking module 824, and wherein the second scheduling identification acquisition module 823 further comprises the second calling module 825 and the second scheduling identification receiver module 826.Agent object 811 comprises the second receiver module 812 and the second execution module 813.
The second sending module 822 is suitable for by communication window 830 script being sent to agent object 811.Click the button that creates on the plug-in unit form with the user, triggering page blackening is example, when the user clicked button on the plug-in unit form, the moving object 821 of plug-in unit was obtained the script that button is clicked operational correspondence, and the second sending module 822 sends to agent object 811 with this script by communication window 830.
The second scheduling identification acquisition module 823 is suitable for obtaining the scheduling identification of pending method in the script by calling the dispatch interface of agent object 811.Wherein, the second calling module 825 is suitable for calling the dispatch interface of agent object 811, allows agent object 811 carry out the method for obtaining the scheduling identification of pending method in the script and obtains scheduling identification; The second scheduling identification receiver module 826 is suitable for the scheduling identification that Receiving Agent object 811 returns by communication window 830.Specifically, at first detached process module 820 is resolved the script that button is clicked operational correspondence, obtains method pending in this script for making page blackening, then the title of method pending in the script is transferred in the IDispatch interface of moving object 821.Because the page of moving object 821 correspondences is empty pages, it does not possess the method that makes page blackening, so moving object 821 can't be known the scheduling identification (ID) of the method in the script, the second calling module 825 of moving object 821 calls the IDispatch interface of agent object 811 by communication window 830 so.Because the Web page of agent object 811 correspondences is complete pages, the method that provides by the GetIDsOfNames function that calls agent object 811, can allow agent object 811 obtain the dispatch id of pending method in the script, then agent object 811 returns to this dispatch id by communication window 830 the second scheduling identification receiver module 826 of moving object 821.
The second blocking module 824 is suitable for tackling the instruction of carrying out pending method in the script in the detached process, and instruction is sent to agent object 811.After moving object 821 obtains the dispatch id of pending method, this dispatch id is fed back to the page, next step just will carry out the instruction of Invoke (ID) according to old process detached process, but the instruction of the Invoke (ID) of the detached processes of the second blocking module 824 interception here sends to agent object 811 with the instruction of Invoke (ID).
The second receiver module 812 is suitable for receiving the instruction that script that the second sending module 822 of moving object 821 sends and the second blocking module 824 send; The second execution module 813 is suitable for carrying out pending method in the script by carrying out instruction, then execution result is returned to moving object 821.The second execution module 813 is carried out the instruction of Invoke (ID), thereby carries out pending method in the script, makes page blackening, and the notification message of page blackening is returned to moving object 821.
Agent object 811 also comprises the 3rd sending module 814, the 3rd scheduling identification acquisition module 815, the 3rd blocking module 816, and wherein the 3rd scheduling identification acquisition module 815 further comprises the 3rd calling module 817 and the 3rd scheduling identification receiver module 818.Moving object 821 also comprises the 3rd receiver module 827 and the 3rd execution module 828.
The 3rd sending module 814 is suitable for by communication window 830 script being sent to moving object 821.To obtain plug-in version number as example, because the agent object 811 in the page process is not real plug-in object, it does not also know the version number of plug-in unit, thereby agent object 811 can not directly feed back the version number of plug-in unit to the page.After moving object 821 is finished in the detached process establishment, can be to the variable of page informing movement object 821, the page development person writes the script of the version number that obtains plug-in unit according to this variable in the page, pending method is exactly to obtain the version number of plug-in unit in this script.The script that communication window 830 will obtain the version number of plug-in unit that passes through of the 3rd sending module 814 sends to moving object 821.
The 3rd scheduling identification acquisition module 815 is suitable for obtaining the scheduling identification of pending method in the script by calling the dispatch interface of moving object 821.Wherein, the 3rd calling module 817 is suitable for by calling the dispatch interface of moving object 821, allows moving object 821 carry out the method for obtaining the scheduling identification of pending method in the script and obtains scheduling identification; The 3rd scheduling identification receiver module 818 is suitable for receiving the scheduling identification that moving object 821 is returned by communication window 830.At first page process module 810 is resolved script, the title of method pending in this script is transferred in the IDispatch interface of agent object 811.Because agent object 811 can't be known the scheduling identification (ID) of pending method in the script, so the 3rd calling module 817 of agent object 811 calls the IDispatch interface of moving object 821 by communication window 830.And moving object 821 is objects of real plug-in unit, so method that provides by the GetIDsOfNames function that calls moving object 821, can allow moving object 821 obtain the dispatch id of pending method, then moving object 821 returns to this dispatch id by communication window 830 the 3rd scheduling identification receiver module 818 of agent object 811.
The 3rd blocking module 816 is suitable for tackling the instruction of carrying out pending method in the script in the page process, and instruction is sent to moving object 821.After agent object 811 obtains the dispatch id of pending method, this dispatch id is fed back to the page, next step will carry out the instruction of Invoke (ID) according to old process page process, but the instruction of the Invoke (ID) of the page of the 3rd blocking module 816 interception here processes sends to moving object 821 with the instruction of Invoke (ID).
The 3rd receiver module 827 is suitable for the script of the 3rd sending module 814 transmissions in the Receiving Agent object 811 and the instruction that the 3rd blocking module 816 sends; The 3rd execution module 828 is suitable for carrying out pending method in the script by carrying out instruction, then execution result is returned to agent object 811.
Function according to the realization of above-mentioned functions module, so that the agent object of Equations of The Second Kind plug-in unit can the executed activity object script, moving object can the agents object script, thereby realized running on moving object in the detached process to running on the control of the page in the page process, and run on the page in the page process to running on the control of the moving object in the detached process.
The present invention also provides a kind of browser, and this browser comprises the executive system of the described arbitrary browser moving object of above-described embodiment.
Intrinsic not relevant with any certain computer, virtual system or miscellaneous equipment with demonstration at this algorithm that provides.Various general-purpose systems also can be with using based on the teaching at this.According to top description, it is apparent constructing the desired structure of this type systematic.In addition, the present invention is not also for any certain programmed language.Should be understood that and to utilize various programming languages to realize content of the present invention described here, and the top description that language-specific is done is in order to disclose preferred forms of the present invention.
In the instructions that provides herein, a large amount of details have been described.Yet, can understand, embodiments of the invention can be put into practice in the situation of these details not having.In some instances, be not shown specifically known method, structure and technology, so that not fuzzy understanding of this description.
Similarly, be to be understood that, in order to simplify the disclosure and to help to understand one or more in each inventive aspect, in the description to exemplary embodiment of the present invention, each feature of the present invention is grouped together in single embodiment, figure or the description to it sometimes in the above.Yet the method for the disclosure should be construed to the following intention of reflection: namely the present invention for required protection requires the more feature of feature clearly put down in writing than institute in each claim.Or rather, as following claims reflected, inventive aspect was to be less than all features of the disclosed single embodiment in front.Therefore, follow claims of embodiment and incorporate clearly thus this embodiment into, wherein each claim itself is as independent embodiment of the present invention.
Those skilled in the art are appreciated that and can adaptively change and they are arranged in one or more equipment different from this embodiment the module in the equipment among the embodiment.Can be combined into a module or unit or assembly to the module among the embodiment or unit or assembly, and can be divided into a plurality of submodules or subelement or sub-component to them in addition.In such feature and/or process or unit at least some are mutually repelling, and can adopt any combination to disclosed all features in this instructions (comprising claim, summary and the accompanying drawing followed) and so all processes or the unit of disclosed any method or equipment make up.Unless in addition clearly statement, disclosed each feature can be by providing identical, being equal to or the alternative features of similar purpose replaces in this instructions (comprising claim, summary and the accompanying drawing followed).
In addition, those skilled in the art can understand, although embodiment more described herein comprise some feature rather than further feature included among other embodiment, the combination of the feature of different embodiment means and is within the scope of the present invention and forms different embodiment.For example, in the following claims, the one of any of embodiment required for protection can be used with array mode arbitrarily.
All parts embodiment of the present invention can realize with hardware, perhaps realizes with the software module of moving at one or more processor, and perhaps the combination with them realizes.It will be understood by those of skill in the art that and to use in practice microprocessor or digital signal processor (DSP) to realize according to the executive system of the browser moving object of the embodiment of the invention and some or all some or repertoire of parts in the browser.The present invention can also be embodied as be used to part or all equipment or the device program (for example, computer program and computer program) of carrying out method as described herein.Such realization program of the present invention can be stored on the computer-readable medium, perhaps can have the form of one or more signal.Such signal can be downloaded from internet website and obtain, and perhaps provides at carrier signal, perhaps provides with any other form.
It should be noted above-described embodiment the present invention will be described rather than limit the invention, and those skilled in the art can design alternative embodiment in the situation of the scope that does not break away from claims.In the claims, any reference symbol between bracket should be configured to limitations on claims.Word " comprises " not to be got rid of existence and is not listed in element or step in the claim.Being positioned at word " " before the element or " one " does not get rid of and has a plurality of such elements.The present invention can realize by means of the hardware that includes some different elements and by means of the computing machine of suitably programming.In having enumerated the unit claim of some devices, several in these devices can be to come imbody by same hardware branch.The use of word first, second and C grade does not represent any order.Can be title with these word explanations.
Herein disclosed is the manner of execution of A1, a kind of browser moving object, described moving object is object corresponding to plug-in unit, and described method comprises: before moving object creates, know the type of plug-in unit; The process of interception page process creation moving object according to the type of described plug-in unit, creates agent object and replaces the actual moving object that will create, and described agent object moves in page process; When page process activates described agent object, according to the type of described plug-in unit, in the detached process that is independent of page process, create the described actual moving object that will create, described moving object is moved in detached process; In moving object and agent object, create respectively communication window; Described moving object and agent object communicate by described communication window, realize proxy object invocation moving object and/or active object calls agent object.A2, according to the described method of A1, if know that according to the type of described plug-in unit described plug-in unit is the Equations of The Second Kind plug-in unit, also comprised before the step of the process of described interception page process creation moving object: the inquiry of interception page process pre-creates the security interface of moving object, the information that to return the described Equations of The Second Kind plug-in unit of expression be safety insert.A3, according to the described method of A2, creating the described actual moving object that will create in the described detached process being independent of page process comprises: interception detached process inquiry IWebBrowser2 interface, return from the IWebBrowser2 interface that creates, thereby create the described actual moving object that will create.A4, according to A1 or A2 or the described method of A3, described moving object and agent object communicate the script implementation that comprises between moving object and the agent object by described communication window.A5, according to the described method of A4, script implementation between described moving object and the agent object comprises the script by agent object executed activity object, if know that according to the type of described plug-in unit described plug-in unit is first kind plug-in unit, then the process of described script by agent object executed activity object comprises: described moving object sends to described agent object by communication window with script; Described agent object is inquired about in the described page process and is carried out relevant interface with script, obtains the script manner of execution according to this interface; Described agent object is carried out described script according to described script manner of execution.A6, according to the described method of A4, script implementation between described moving object and the agent object comprises the script by agent object executed activity object, if know that according to the type of described plug-in unit described plug-in unit is the Equations of The Second Kind plug-in unit, then the process of described script by agent object executed activity object comprises: described moving object sends to described agent object by communication window with script; Described moving object is obtained the scheduling identification of pending method in the described script by calling the dispatch interface of described agent object; Carry out the instruction of pending method in the described script in the described moving object interception detached process, described instruction is sent to described agent object; Described agent object is carried out method pending in the described script by carrying out described instruction, then execution result is returned to described moving object.A7, according to the described method of A6, described moving object is by calling the dispatch interface of described agent object, the step of obtaining the scheduling identification of pending method in the described script comprises: described moving object is by calling the dispatch interface of described agent object, allow described agent object carry out the method for obtaining the scheduling identification of pending method in the described script, then described agent object returns to described moving object by communication window with described scheduling identification.A8, according to the described method of A4, script implementation between described moving object and the agent object comprises the script by moving object agents object, and the process of described script by moving object agents object comprises: described agent object sends to described moving object by communication window with script; Described agent object obtains the scheduling identification of pending method in the described script by calling the dispatch interface of described moving object; Carry out the instruction of pending method in the described script in the described agent object interception page process, described instruction is sent to described moving object; Described moving object is carried out pending method in the described script by carrying out described instruction, then execution result is returned to agent object.A9, according to the described method of A8, described agent object is by calling the dispatch interface of described moving object, the step of obtaining the scheduling identification of pending method in the described script comprises: described agent object is by calling the dispatch interface of described moving object, allow described moving object carry out the method for obtaining the scheduling identification of pending method in the described script, then described moving object returns to described agent object by communication window with described scheduling identification.A10, according to each described method of A1 to A9, the agent object that runs in the described page process is a plurality of, the moving object that runs in the described detached process is a plurality of, described agent object and moving object are corresponding one by one, the communication window of the communication window of described agent object and the moving object corresponding with described agent object has corresponding attribute, realizes communicating by letter of moving objects and agent object by these two communication windows.A11, according to the described method of A5, described first kind plug-in unit is the Flash plug-in unit.A12, according to the described method of A6, described Equations of The Second Kind plug-in unit is the audio-visual or QVOD of Baidu.
Herein disclosed is the executive system of B13, a kind of browser moving object, comprising: page process module is suitable for knowing the type of plug-in unit before moving object creates; And the process of interception page process creation moving object according to the type of described plug-in unit, creates agent object and replaces the actual moving object that will create, and described agent object moves in page process; The detached process module is suitable for when page process activates described agent object, according to the type of described plug-in unit, creates the described actual moving object that will create in the detached process that is independent of page process, and described moving object is moved in detached process; Be arranged in described page process module agent object, be arranged in the moving object of described detached process module and create respectively communication window in moving object and agent object, described moving object is moving object corresponding to plug-in unit, described moving object and agent object communicate by described communication window, realize proxy object invocation moving object and/or active object calls agent object.B14, according to the described system of B13, if know that according to the type of described plug-in unit described plug-in unit is the Equations of The Second Kind plug-in unit, described page process module also is suitable for tackling the security interface that the inquiry of page process pre-creates moving object, returns the information that represents that described Equations of The Second Kind plug-in unit is safety insert.B15, according to the described system of B14, described detached process module is further adapted for interception detached process inquiry IWebBrowser2 interface, returns from the IWebBrowser2 interface that creates, thereby creates the described actual moving object that will create.B16, according to the described system of B13, if know that according to the type of described plug-in unit described plug-in unit is first kind plug-in unit, described moving object comprises: the first sending module is suitable for by communication window script being sent to described agent object; Described agent object comprises: the first enquiry module, and be suitable for inquiring about in the described page process and carry out relevant interface with script, obtain the script manner of execution according to this interface; The first execution module is suitable for carrying out described script according to described script manner of execution.B17, according to B14 or the described system of B15, if know that according to the type of described plug-in unit described plug-in unit is the Equations of The Second Kind plug-in unit, described moving object comprises: the second sending module is suitable for by communication window script being sent to agent object; The second scheduling identification acquisition module is suitable for obtaining the scheduling identification of pending method in the described script by calling the dispatch interface of described agent object; The second blocking module is suitable for tackling the instruction of carrying out pending method in the described script in the detached process, and described instruction is sent to described agent object; Described agent object comprises: the second receiver module is suitable for receiving the instruction that script that the second sending module of described moving object sends and the second blocking module send; The second execution module is suitable for carrying out method pending in the described script by carrying out described instruction, then execution result is returned to described moving object.B18, according to the described system of B17, described the second scheduling identification acquisition module comprises: the second calling module, be suitable for calling the dispatch interface of described agent object, allow described agent object carry out the method for obtaining the scheduling identification of pending method in the described script and obtain described scheduling identification; The second scheduling identification receiver module is suitable for receiving the scheduling identification that described agent object returns by communication window.B19, according to B13 or B14 or the described system of B15, described agent object comprises: the 3rd sending module is suitable for by communication window script being sent to described moving object; The 3rd scheduling identification acquisition module is suitable for obtaining the scheduling identification of pending method in the described script by calling the dispatch interface of described moving object; The 3rd blocking module is suitable for tackling the instruction of carrying out pending method in the described script in the page process, and described instruction is sent to described moving object; Described moving object comprises: the 3rd receiver module is suitable for receiving the script of the 3rd sending module transmission in the described agent object and the instruction that the 3rd blocking module sends; The 3rd execution module is suitable for carrying out pending method in the described script by carrying out described instruction, then execution result is returned to agent object.B20, according to the described system of B19, described the 3rd scheduling identification acquisition module comprises: the 3rd calling module, be suitable for by calling the dispatch interface of described moving object, allow described moving object carry out the method for obtaining the scheduling identification of pending method in the described script and obtain scheduling identification; The 3rd scheduling identification receiver module is suitable for receiving the described scheduling identification that described moving object is returned by communication window.B21, according to each described system of B13 to B20, described page process module comprises a plurality of agent objects, described detached process module comprises a plurality of moving objects, described agent object and moving object are corresponding one by one, the communication window of the communication window of described agent object and the moving object corresponding with described agent object has corresponding attribute, realizes communicating by letter of moving objects and agent object by these two communication windows.B22, according to the described system of B16, described first kind plug-in unit is the flash plug-in unit.B23, according to the described system of B17, described Equations of The Second Kind plug-in unit is the audio-visual or QVOD of Baidu.
Herein disclosed is the browser of the executive system of C24, each described browser moving object of a kind of B13 to B23 of comprising.

Claims (20)

1. the manner of execution of a browser moving object, described moving object is object corresponding to plug-in unit, described method comprises:
Before moving object creates, know the type of plug-in unit;
The process of interception page process creation moving object according to the type of described plug-in unit, creates agent object and replaces the actual moving object that will create, and described agent object moves in page process;
When page process activates described agent object, according to the type of described plug-in unit, in the detached process that is independent of page process, create the described actual moving object that will create, described moving object is moved in detached process;
In moving object and agent object, create respectively communication window;
Described moving object and agent object communicate by described communication window, realize proxy object invocation moving object and/or active object calls agent object.
2. method according to claim 1, if know that according to the type of described plug-in unit described plug-in unit is the Equations of The Second Kind plug-in unit, also comprised before the step of the process of described interception page process creation moving object: the inquiry of interception page process pre-creates the security interface of moving object, the information that to return the described Equations of The Second Kind plug-in unit of expression be safety insert.
3. method according to claim 2, creating the described actual moving object that will create in the described detached process being independent of page process comprises: interception detached process inquiry IWebBrowser2 interface, return from the IWebBrowser2 interface that creates, thereby create the described actual moving object that will create.
4. according to claim 1 and 2 or 3 described methods, described moving object and agent object communicate the script implementation that comprises between moving object and the agent object by described communication window.
5. method according to claim 4, script implementation between described moving object and the agent object comprises the script by agent object executed activity object, if know that according to the type of described plug-in unit described plug-in unit is first kind plug-in unit, then the process of described script by agent object executed activity object comprises:
Described moving object sends to described agent object by communication window with script;
Described agent object is inquired about in the described page process and is carried out relevant interface with script, obtains the script manner of execution according to this interface;
Described agent object is carried out described script according to described script manner of execution.
6. method according to claim 4, script implementation between described moving object and the agent object comprises the script by agent object executed activity object, if know that according to the type of described plug-in unit described plug-in unit is the Equations of The Second Kind plug-in unit, then the process of described script by agent object executed activity object comprises:
Described moving object sends to described agent object by communication window with script;
Described moving object is obtained the scheduling identification of pending method in the described script by calling the dispatch interface of described agent object;
Carry out the instruction of pending method in the described script in the described moving object interception detached process, described instruction is sent to described agent object;
Described agent object is carried out method pending in the described script by carrying out described instruction, then execution result is returned to described moving object.
7. method according to claim 6, described moving object is by calling the dispatch interface of described agent object, and the step of obtaining the scheduling identification of pending method in the described script comprises:
Described moving object is by calling the dispatch interface of described agent object, allow described agent object carry out the method for obtaining the scheduling identification of pending method in the described script, then described agent object returns to described moving object by communication window with described scheduling identification.
8. method according to claim 4, the script implementation between described moving object and the agent object comprises the script by moving object agents object, the process of described script by moving object agents object comprises:
Described agent object sends to described moving object by communication window with script;
Described agent object obtains the scheduling identification of pending method in the described script by calling the dispatch interface of described moving object;
Carry out the instruction of pending method in the described script in the described agent object interception page process, described instruction is sent to described moving object;
Described moving object is carried out pending method in the described script by carrying out described instruction, then execution result is returned to agent object.
9. method according to claim 8, described agent object is by calling the dispatch interface of described moving object, and the step of obtaining the scheduling identification of pending method in the described script comprises:
Described agent object is by calling the dispatch interface of described moving object, allow described moving object carry out the method for obtaining the scheduling identification of pending method in the described script, then described moving object returns to described agent object by communication window with described scheduling identification.
10. according to claim 1 to 9 each described methods, the agent object that runs in the described page process is a plurality of, the moving object that runs in the described detached process is a plurality of, described agent object and moving object are corresponding one by one, the communication window of the communication window of described agent object and the moving object corresponding with described agent object has corresponding attribute, realizes communicating by letter of moving objects and agent object by these two communication windows.
11. method according to claim 5, described first kind plug-in unit is the Flash plug-in unit.
12. method according to claim 6, described Equations of The Second Kind plug-in unit are the audio-visual or QVOD of Baidu.
13. the executive system of a browser moving object comprises:
Page process module is suitable for knowing the type of plug-in unit before moving object creates; And the process of interception page process creation moving object according to the type of described plug-in unit, creates agent object and replaces the actual moving object that will create, and described agent object moves in page process;
The detached process module is suitable for when page process activates described agent object, according to the type of described plug-in unit, creates the described actual moving object that will create in the detached process that is independent of page process, and described moving object is moved in detached process;
Be arranged in described page process module agent object, be arranged in the moving object of described detached process module and create respectively communication window in moving object and agent object, described moving object is moving object corresponding to plug-in unit, described moving object and agent object communicate by described communication window, realize proxy object invocation moving object and/or active object calls agent object.
14. system according to claim 13, if know that according to the type of described plug-in unit described plug-in unit is the Equations of The Second Kind plug-in unit, described page process module also is suitable for tackling the security interface that the inquiry of page process pre-creates moving object, returns the information that represents that described Equations of The Second Kind plug-in unit is safety insert.
15. system according to claim 14, described detached process module are further adapted for interception detached process inquiry IWebBrowser2 interface, return from the IWebBrowser2 interface that creates, thereby create the described actual moving object that will create.
16. system according to claim 13, if know that according to the type of described plug-in unit described plug-in unit is first kind plug-in unit,
Described moving object comprises:
The first sending module is suitable for by communication window script being sent to described agent object;
Described agent object comprises:
The first enquiry module is suitable for inquiring about in the described page process and carries out relevant interface with script, obtains the script manner of execution according to this interface;
The first execution module is suitable for carrying out described script according to described script manner of execution.
17. according to claim 14 or 15 described systems, if know that according to the type of described plug-in unit described plug-in unit is the Equations of The Second Kind plug-in unit,
Described moving object comprises:
The second sending module is suitable for by communication window script being sent to agent object;
The second scheduling identification acquisition module is suitable for obtaining the scheduling identification of pending method in the described script by calling the dispatch interface of described agent object;
The second blocking module is suitable for tackling the instruction of carrying out pending method in the described script in the detached process, and described instruction is sent to described agent object;
Described agent object comprises:
The second receiver module is suitable for receiving the instruction that script that the second sending module of described moving object sends and the second blocking module send;
The second execution module is suitable for carrying out method pending in the described script by carrying out described instruction, then execution result is returned to described moving object.
18. system according to claim 17, described the second scheduling identification acquisition module comprises:
The second calling module is suitable for calling the dispatch interface of described agent object, allows described agent object carry out the method for obtaining the scheduling identification of pending method in the described script and obtains described scheduling identification;
The second scheduling identification receiver module is suitable for receiving the scheduling identification that described agent object returns by communication window.
19. according to claim 13 or 14 or 15 described systems,
Described agent object comprises:
The 3rd sending module is suitable for by communication window script being sent to described moving object;
The 3rd scheduling identification acquisition module is suitable for obtaining the scheduling identification of pending method in the described script by calling the dispatch interface of described moving object;
The 3rd blocking module is suitable for tackling the instruction of carrying out pending method in the described script in the page process, and described instruction is sent to described moving object;
Described moving object comprises:
The 3rd receiver module is suitable for receiving the script of the 3rd sending module transmission in the described agent object and the instruction that the 3rd blocking module sends;
The 3rd execution module is suitable for carrying out pending method in the described script by carrying out described instruction, then execution result is returned to agent object.
20. browser that comprises the executive system of each described browser moving object of claim 13 to 23.
CN201210572600.6A 2012-12-25 2012-12-25 Execution method, system and the browser of browser moving object Expired - Fee Related CN103019735B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201210572600.6A CN103019735B (en) 2012-12-25 2012-12-25 Execution method, system and the browser of browser moving object
PCT/CN2013/082659 WO2014101455A1 (en) 2012-12-25 2013-08-30 Method, system, and browser for executing active object of browser
US14/655,159 US10218767B2 (en) 2012-12-25 2013-08-30 Method, system and browser for executing active object of browser

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210572600.6A CN103019735B (en) 2012-12-25 2012-12-25 Execution method, system and the browser of browser moving object

Publications (2)

Publication Number Publication Date
CN103019735A true CN103019735A (en) 2013-04-03
CN103019735B CN103019735B (en) 2016-08-03

Family

ID=47968373

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210572600.6A Expired - Fee Related CN103019735B (en) 2012-12-25 2012-12-25 Execution method, system and the browser of browser moving object

Country Status (1)

Country Link
CN (1) CN103019735B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103019733A (en) * 2012-12-25 2013-04-03 北京奇虎科技有限公司 Moving object execution method and system for browser and browser
WO2014101455A1 (en) * 2012-12-25 2014-07-03 北京奇虎科技有限公司 Method, system, and browser for executing active object of browser
CN104360907A (en) * 2014-12-05 2015-02-18 国家电网公司 Event calling method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070199073A1 (en) * 2005-10-14 2007-08-23 Softwareonline, Llc Enhanced browser security
CN102314510A (en) * 2011-09-15 2012-01-11 奇智软件(北京)有限公司 Method and system for executing browser control

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070199073A1 (en) * 2005-10-14 2007-08-23 Softwareonline, Llc Enhanced browser security
CN102314510A (en) * 2011-09-15 2012-01-11 奇智软件(北京)有限公司 Method and system for executing browser control

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
杨莉萍: "《VB的多接口技术及安全性控件的制作》", 《计算机系统应用》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103019733A (en) * 2012-12-25 2013-04-03 北京奇虎科技有限公司 Moving object execution method and system for browser and browser
WO2014101455A1 (en) * 2012-12-25 2014-07-03 北京奇虎科技有限公司 Method, system, and browser for executing active object of browser
CN103019733B (en) * 2012-12-25 2016-07-06 北京奇虎科技有限公司 A kind of for the activity object implementation of browser, system and browser
CN104360907A (en) * 2014-12-05 2015-02-18 国家电网公司 Event calling method and device

Also Published As

Publication number Publication date
CN103019735B (en) 2016-08-03

Similar Documents

Publication Publication Date Title
CN103019733A (en) Moving object execution method and system for browser and browser
US8166396B2 (en) User interface rendering
CN104657451B (en) The processing method and processing device of the page
US11487514B2 (en) State management persistence
WO2006124215A2 (en) System and method for generating and updating user interfaces of web-based applications
WO2000020963A2 (en) Method and system for associating parameters of containers and contained objects
US20180095604A1 (en) Rendering components based on screen size
US20150234798A1 (en) System and method for changing a web ui application appearance based on state through css selector cascading
CN103064680B (en) The player method of plug-in unit and device in browser
CN102982169A (en) Browser and method for isolating webpage plugins
CN104424205A (en) Context menu implementing method and device of page-embedded client
CN103034518A (en) Method and browser for loading browser control tool
CN103034495A (en) Browser capable of isolating plug-in in webpage and webpage plug-in isolating method
CN103034503B (en) A kind of script execution, system and browser
CN108762956A (en) Obtain method, server, mobile terminal and the storage medium of Native local datas
CN114816401A (en) Interface element positioning method, electronic equipment and storage medium
CN103064709A (en) Execution method and system of browser moving object and browser
CN103019734A (en) Activity object implementation method, system and browser
CN104598322A (en) Method and device for communicating among multiple window components
CN104021016A (en) Method and browser for loading browser plug-in icons
CN103064750A (en) Interrupt restoring method and device for browser control
CN103019735A (en) Method and system for executing moving object of browser and browser
CN108664242B (en) Method and device for generating visual interface, electronic equipment and readable storage medium
US10218767B2 (en) Method, system and browser for executing active object of browser
CN103077016B (en) A kind of moving object creation method, device and browser

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20160803

Termination date: 20211225

CF01 Termination of patent right due to non-payment of annual fee