CN103064680B - The player method of plug-in unit and device in browser - Google Patents

The player method of plug-in unit and device in browser Download PDF

Info

Publication number
CN103064680B
CN103064680B CN201210573078.3A CN201210573078A CN103064680B CN 103064680 B CN103064680 B CN 103064680B CN 201210573078 A CN201210573078 A CN 201210573078A CN 103064680 B CN103064680 B CN 103064680B
Authority
CN
China
Prior art keywords
plug
unit
broadcast window
control object
window
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.)
Active
Application number
CN201210573078.3A
Other languages
Chinese (zh)
Other versions
CN103064680A (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
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 CN201210573078.3A priority Critical patent/CN103064680B/en
Publication of CN103064680A publication Critical patent/CN103064680A/en
Priority to PCT/CN2013/083729 priority patent/WO2014101486A1/en
Priority to US14/655,138 priority patent/US20150347164A1/en
Application granted granted Critical
Publication of CN103064680B publication Critical patent/CN103064680B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses the player method of plug-in unit in a kind of browser, including: when the page process of browser loads and activates the first plug-in unit, create the independent process different from page process, independent process loads and activates the second plug-in unit, wherein, described second plug-in unit replicates the information of described first plug-in unit;In independent process, the information of described second plug-in unit is calculated, obtain result of calculation;Carry out described second plug-in unit drawing in broadcast window according to described result of calculation and play.The method using the present invention to provide can improve the stability of browser.The invention also discloses corresponding device.

Description

The player method of plug-in unit and device in browser
Technical field
The present invention relates to network application field, be specifically related to player method and the device of plug-in unit in a kind of browser.
Background technology
When opening browser, the page process of browser can create moving object, then carries out the operations of the page, and moving object is often referred to the plug-in unit of browser, such as ActiveX plug-in unit.
Because ActiveX plug-in unit needs to be embedded in webpage, so plug-in unit and the page can run under same process.If the appearance of this plug-in unit is stuck or after collapse, whole webpage can be caused to exit, have impact on the stability of page operation.After stuck or collapse occurs in page process, the ActiveX plug-in unit in the page can be caused to exit, have impact on the stability of ActiveX plug-in unit.
Further, owing to ActiveX plug-in unit is the most fixing in the position of webpage, user cannot dynamically adjust size and the display position of ActiveX plug-in unit.
Summary of the invention
In view of the above problems, it is proposed that the present invention in case provide a kind of overcome the problems referred to above or solve the browser of the problems referred to above at least in part in the player method of plug-in unit in the playing device of plug-in unit and corresponding browser.
According to one aspect of the present invention, it is provided that the player method of plug-in unit in a kind of browser, including:
When the page process of browser loads and activates the first plug-in unit, creating the independent process different from page process, load and activate the second plug-in unit in independent process, wherein, described second plug-in unit replicates the information of described first plug-in unit;
In independent process, the information of described second plug-in unit is calculated, obtain result of calculation;
Carry out described second plug-in unit drawing in broadcast window according to described result of calculation and play.
Alternatively, described second plug-in unit replicates the information of described first plug-in unit, including:
The first control object is generated for described first plug-in unit in page process;
The second control object is generated for described second plug-in unit in independent process;
Utilize described second control object to interact with described first control object to communicate, obtain the information of described first plug-in unit;
Described second control object is utilized to send the information of described first plug-in unit obtained to described second plug-in unit.
Alternatively, carrying out mutual operation by pointer between described first plug-in unit and described first control object, wherein, this pointer can call multiple standard interface;And
Mutual operation is carried out by the pointer of same type between described second plug-in unit and described second control object.
Alternatively, utilize described second control object to interact with described first control object and communicate, including:
In page process, create the first window associated with described first control object;
In independent process, create the second window associated with described second control object;
Utilize described first window to interact with described second window to communicate.
Alternatively, the information of interactive communication includes at least one following:
The focus of thread in the size of plug-in unit, page process, the refresh operation of thread of page process, the execution of script.
Alternatively, carry out described second plug-in unit drawing in broadcast window according to described result of calculation and play, including:
When page process does not exist the broadcast window of described first plug-in unit, utilize the newly-built broadcast window of described independent process;
According to the intervalometer of described independent process, result of calculation described in timing acquisition;
Carry out described second plug-in unit drawing in newly-built broadcast window according to described result of calculation and play.
Alternatively, carry out described second plug-in unit drawing in broadcast window according to described result of calculation and play, including:
When page process exists the former broadcast window of described first plug-in unit, utilize the newly-built broadcast window of described independent process, and newly-built broadcast window is set to the parent window of former broadcast window;
Carry out described second plug-in unit drawing in newly-built broadcast window according to described result of calculation and play.
Alternatively, described newly-built broadcast window can move on a web browser or scale.
Alternatively, said method also includes:
When page process initiates the request obtaining broadcast window, independent process informs that page process is without broadcast window.
Alternatively, described first plug-in unit and/or described second plug-in unit are ActiveX plug-in unit.
According to another aspect of the present invention, it is provided that the playing device of plug-in unit in a kind of browser, including:
Creation module, is configured to when the page process of browser loads and activates the first plug-in unit, creates the independent process different from page process, loads and activate the second plug-in unit in independent process, and wherein, described second plug-in unit replicates the information of described first plug-in unit;
Computing module, is configured in independent process, calculates the information of described second plug-in unit, obtains result of calculation;
Playing module, is configured to carry out described second plug-in unit drawing in broadcast window according to described result of calculation play.
Alternatively, described creation module is additionally configured to:
The first control object is generated for described first plug-in unit in page process;
The second control object is generated for described second plug-in unit in independent process;
Utilize described second control object to interact with described first control object to communicate, obtain the information of described first plug-in unit;
Described second control object is utilized to send the information of described first plug-in unit obtained to described second plug-in unit.
Alternatively, wherein
Carrying out mutual operation by pointer between described first plug-in unit and described first control object, wherein, this pointer can call multiple standard interface;And
Mutual operation is carried out by the pointer of same type between described second plug-in unit and described second control object.
Alternatively, described creation module is additionally configured to:
In page process, create the first window associated with described first control object;
In independent process, create the second window associated with described second control object;
Utilize described first window to interact with described second window to communicate.
Alternatively, the information of interactive communication includes at least one following:
The focus of thread in the size of plug-in unit, page process, the refresh operation of thread of page process, the execution of script.
Alternatively, described playing module is additionally configured to:
When page process does not exist the broadcast window of described first plug-in unit, utilize the newly-built broadcast window of described independent process;
According to the intervalometer of described independent process, result of calculation described in timing acquisition;
Carry out described second plug-in unit drawing in newly-built broadcast window according to described result of calculation and play.
Alternatively, described playing module is additionally configured to:
When page process exists the former broadcast window of described first plug-in unit, utilize the newly-built broadcast window of described independent process, and newly-built broadcast window is set to the parent window of former broadcast window;
Carry out described second plug-in unit drawing in newly-built broadcast window according to described result of calculation and play.
Alternatively, described newly-built broadcast window can move on a web browser or scaling processes.
Alternatively, said apparatus also includes informing module, and when being configured to the request receiving page process initiation acquisition broadcast window, page process is without broadcast window to utilize independent process to inform.
Alternatively, described first plug-in unit and/or described second plug-in unit are ActiveX plug-in unit.
In embodiments of the present invention, the page process of browser loads and activates the first plug-in unit, but not carrying out the first plug-in unit drawing plays, but create an independent process different from page process, and load in independent process and activate the second plug-in unit, utilize the second plug-in unit to realize the duplication to the first plugin information.Owing to the information of the first plug-in unit and the second plug-in unit is consistent, therefore, it is consistent for carrying out the information of the second plug-in unit calculating and the information of the first plug-in unit is calculated acquired result of calculation, then according to result of calculation, the second plug-in unit carries out in broadcast window the content that drafting play and should also be consistent.But, owing to the second plug-in unit is arranged in independent process, share a process with independent process, two different processes it are suitable for respectively from page process, therefore, the operation of the second plug-in unit and the operation of page process are independent, and a side occurs problem can not affect the stability of the opposing party.If the second plug-in unit appearance is stuck or after collapse, is not result in that whole webpage exits, it is possible to increase the stability of page operation, in like manner, after stuck or collapse occurs in page process, the second plug-in unit being also not result in the page exits, and improves the stability of plug-in component operation.As can be seen here, in the browser that the embodiment of the present invention provides, the player method of plug-in unit on the premise of not affecting result of broadcast, can improve the stability of browser execution.
Further, owing to the first plug-in unit is not really performed, and the second plug-in unit is real executive agent, and therefore, it can the first plug-in unit is called agent object, and the second plug-in unit is moving object.The embodiment of the present invention is by running agent object in page process, and in independent process, run moving object, make real browser plug-in, such as real ActiveX plug-in unit separates with page process, so that not interfering with the browser process of embedding browser plug-in unit when browser plug-in goes wrong, i.e. browser plug-in does not interferes with the page process when going wrong, thus improves the stability of browser.Meanwhile, when the problem of the safeties such as virus occurs when browser plug-in, owing to browser plug-in separates with page process, do not interfere with the operation of page process, thus also improve the safety of browser.
Additionally, when browser plug-in goes wrong, the object thread running browser plug-in can be performed hang-up, reduce the operation such as authority or termination, so that the system resources such as the EMS memory occupation of browser plug-in and CPU take can be done the distribution oriented by independent process, realize more preferable resource distribution way of recycling, more reasonably dispatching resource, termination process makes process exit resource reclaim can also be allowed more thorough.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention, and can be practiced according to the content of description, and in order to above and other objects of the present invention, feature and advantage can be become apparent, below especially exemplified by the detailed description of the invention of the present invention.
Accompanying drawing explanation
By reading the detailed description of hereafter preferred implementation, various other advantage and benefit those of ordinary skill in the art be will be clear from understanding.Accompanying drawing is only used for illustrating the purpose of preferred implementation, and is not considered as limitation of the present invention.And in whole accompanying drawing, it is denoted by the same reference numerals identical parts.In the accompanying drawings:
Fig. 1 shows the process chart of the player method of plug-in unit in browser according to an embodiment of the invention;
Fig. 2 shows the schematic diagram communicated between page process and independent process according to an embodiment of the invention;
Fig. 3 shows the schematic diagram that the flash plug-in unit in page process according to an embodiment of the invention is play without flash plug-in unit during broadcast window;
Fig. 4 shows that the flash plug-in unit in page process according to an embodiment of the invention has the schematic diagram that flash plug-in unit during broadcast window is play;And
Fig. 5 shows the structural representation of the playing device of plug-in unit in browser according to an embodiment of the invention.
Detailed description of the invention
Algorithm and display are not intrinsic to any certain computer, virtual system or miscellaneous equipment relevant provided herein.Various general-purpose systems can also be used together with based on teaching in this.As described above, construct the structure required by this kind of system to be apparent from.Additionally, the present invention is also not for any certain programmed language.It is understood that, it is possible to use various programming languages realize the content of invention described herein, and the description done language-specific above is the preferred forms in order to disclose the present invention.
For solving at least one technical problem above-mentioned, embodiments provide the player method of plug-in unit in a kind of browser, for realizing the independence operation of plug-in unit and page process, it is ensured that one of the most any the stability of another one occurs not interfere with during problem.Fig. 1 shows the process chart of the player method of plug-in unit in browser according to an embodiment of the invention.Seeing Fig. 1, in browser, the player method of plug-in unit includes that step S102 is to step S106.Being described as follows of each step.
Step S102, when the page process of browser loads and activates the first plug-in unit, create the independent process different from page process, in independent process, load and activate the second plug-in unit, wherein, the second plug-in unit replicates the information of the first plug-in unit.
Step S104, in independent process, the information of the second plug-in unit is calculated, obtain result of calculation.
Step S106, according to result of calculation in broadcast window, the second plug-in unit is carried out draw play.
In embodiments of the present invention, the page process of browser loads and activates the first plug-in unit, but not carrying out the first plug-in unit drawing plays, but create an independent process different from page process, and load in independent process and activate the second plug-in unit, utilize the second plug-in unit to realize the duplication to the first plugin information.Owing to the information of the first plug-in unit and the second plug-in unit is consistent, therefore, it is consistent for carrying out the information of the second plug-in unit calculating and the information of the first plug-in unit is calculated acquired result of calculation, then according to result of calculation, the second plug-in unit carries out in broadcast window the content that drafting play and should also be consistent.But, owing to the second plug-in unit is arranged in independent process, share a process with independent process, two different processes it are suitable for respectively from page process, therefore, the operation of the second plug-in unit and the operation of page process are independent, and a side occurs problem can not affect the stability of the opposing party.If the second plug-in unit appearance is stuck or after collapse, is not result in that whole webpage exits, it is possible to increase the stability of page operation, in like manner, after stuck or collapse occurs in page process, the second plug-in unit being also not result in the page exits, and improves the stability of plug-in component operation.As can be seen here, in the browser that the embodiment of the present invention provides, the player method of plug-in unit on the premise of not affecting result of broadcast, can improve the stability of browser execution.
Further, owing to the first plug-in unit is not really performed, and the second plug-in unit is real executive agent, and therefore, it can the first plug-in unit is called agent object, and the second plug-in unit is moving object.The embodiment of the present invention is by running agent object in page process, and in independent process, run moving object, make real browser plug-in, such as real ActiveX plug-in unit separates with page process, so that not interfering with the browser process of embedding browser plug-in unit when browser plug-in goes wrong, i.e. browser plug-in does not interferes with the page process when going wrong, thus improves the stability of browser.Meanwhile, when the problem of the safeties such as virus occurs when browser plug-in, owing to browser plug-in separates with page process, do not interfere with the operation of page process, thus also improve the safety of browser.
Additionally, when browser plug-in goes wrong, the object thread running browser plug-in can be performed hang-up, reduce the operation such as authority or termination, so that the system resources such as the EMS memory occupation of browser plug-in and CPU take can be done the distribution oriented by independent process, realize more preferable resource distribution way of recycling, more reasonably dispatching resource, termination process makes process exit resource reclaim can also be allowed more thorough.
It should be noted that in embodiments of the present invention, the first plug-in unit is called agent object, and the second plug-in unit is moving object, and the initiative embodying the first plug-in unit and the second plug-in unit is different.When implementing, in the browser that the embodiment of the present invention provides, the player method of plug-in unit can realize two-way communication, page process and independent process are not fixing, subsequent execution process likely there will be the situation that the plug-in unit in independent process is separated to carry out performing in page process, now, agent object and moving object role exchange, its concrete processing procedure is similar to.
Mention that the second plug-in unit needs to replicate the information of the first plug-in unit in step s 102, for ensureing the consistent of result of broadcast.Concrete, this example provides a kind of preferably copy mode.First, it is that the first plug-in unit generates the first control object in page process.Secondly, it is that the second plug-in unit generates the second control object in independent process.Then, utilize the second control object to interact with the first control object and communicate, obtain the information of the first plug-in unit, recycle the second control object and the information of the first plug-in unit obtained is sent to the second plug-in unit.
Owing to needing to operate between plug-in unit and self corresponding control object, therefore, need the interface that information is mutual between the two.In the embodiment of the present invention, arranging and carry out mutual operation by pointer between plug-in unit and control object, wherein, this pointer can call multiple standard interface.Concrete, carry out mutual operation by pointer between the first plug-in unit and the first control object, between the second plug-in unit and the second control object, carry out mutual operation by the pointer of same type.Preferably, this pointer can be IUnknown pointer, and IUnknown pointer will call a lot of standard interface, such as IOleObject, IViewObject etc..
Utilize the second control object to interact with the first control object when communicating, for convenience of communication, can create the first window associated with the first control object, the second window that then establishment associates with the second control object in independent process in page process.Subsequently, the first window set up and the second window is utilized to interact communication.
In implementation process, the information of interactive communication can be any information involved by plug-in unit is play, such as, the size of plug-in unit, the focus of the thread in page process, the refresh operation of the thread of page process, execution of script etc..Specifying information herein is merely possible to enumerate, and does not cause restriction, communication to can also relate to other information that plug-in unit is play for information itself.
Step S106 is mentioned, carries out the second plug-in unit drawing according to result of calculation and play in broadcast window.That is, when playing out the second plug-in unit, can be divided into two kinds of situations, a kind of broadcast window being not exist in page process the first plug-in unit, another kind is the broadcast window that page process exists the first plug-in unit.The most respectively both are specifically described.
The first situation, when page process does not exist the broadcast window of the first plug-in unit, utilizes the newly-built broadcast window of independent process.Now, owing to broadcast window is that independent process is newly-built, therefore there is no with original page process and contact.One or more intervalometer is set in independent process, the timing acquisition result of calculation to the second plug-in unit, and then in newly-built broadcast window, the second plug-in unit is carried out drafting according to result of calculation and play.
The second situation is when there is the former broadcast window of the first plug-in unit in page process, at this moment, identical with the first situation, also with the newly-built broadcast window of independent process.But, owing to there is former broadcast window, contact accordingly, it would be desirable to set up between newly-built broadcast window and former broadcast window.Concrete, newly-built broadcast window is set to the parent window of former broadcast window, then, carries out the second plug-in unit drawing in newly-built broadcast window according to result of calculation and play.
Newly-built broadcast window can move on a web browser or scale, thus realizes the mobility of broadcast window, extensibility etc..If wishing, broadcast window is presented at the broadcast window of former page process, then have only to be arranged on newly-built broadcast window the window's position of former page process.
Further, in implementation process, if page process initiates to obtain the request of broadcast window, independent process informs that page process is without broadcast window.Page process can not know the existence of broadcast window, then can not be controlled broadcast window, it is achieved thereby that plug-in unit separates with page process, improves the stability of browser.
In any one preferred embodiment above-mentioned, the first plug-in unit and/or the second plug-in unit are ActiveX plug-in unit.
Flash plug-in unit is a kind of conventional ActiveX plug-in unit, existing as a example by flash plug-in unit runs in page process, and in the browser provide the embodiment of the present invention, the player method of plug-in unit is specifically described.
Fig. 2 shows the schematic diagram communicated between page process and independent process according to an embodiment of the invention.
In page process side,
In the case of having flash in webpage, when browser creates ActiveX plug-in unit (the first plug-in unit the most mentioned above), CLSID can be obtained by CLSIDFromProgID according to plug-in unit CLSID or ProgID() inquiry registration table, checking that system has installed corresponding plug-in unit the most, if installing, may proceed to establishment process.
Browser obtains the IUnknown pointer of corresponding plug-in unit by calling CoGetClassObject, then carries out mutual operation by standard interface.CoGetClassObject performs process, registry query ActiveX path is gone to by CLSID, after obtaining ActiveX path, call LoadLibrary and load ActiveX plug-in unit, calling it and derive function DllGetClassObject acquisition class factory pointer (IClassFactory), the CreateInstance method then calling IClassFactory obtains the IUnknown pointer that ActiveX plug-in unit is corresponding.
It should be noted that herein, when loading ActiveX plug-in unit, Hook(intercepts) CoGetClassObject, create an ActiveX control object (the first i.e. corresponding with the first plug-in unit control object), this ActiveX control object includes a series of interface, a lot of standard interfaces that such as IUnknown pointer will call, such as IOleObject, IViewObject etc..Then, when calling the CreateInstance of IClassFactory, the ActiveX control object created is returned to the IUnknown pointer of ActiveX plug-in unit.
In independent process side,
When this ActiveX plug-in unit of page procedure activation, extract the relevant informations such as the attribute of this control, URL, size, then create an independent process, and in independent process, load ActiveX plug-in unit (the i.e. second plug-in unit).
Specifically, create a document, insert an object object wherein, this independent process calls CoGetClassObject, this CoGetClassObject of Hook, then create another ActiveX control object (the second i.e. corresponding with the second plug-in unit control object), this ActiveX control object includes a series of interface, a lot of standard interfaces that such as IUnknown pointer will call, such as IOleObject, IViewObject etc..Then, when calling the CreateInstance of IClassFactory, this another ActiveX control object created is returned to the IUnknown pointer of the ActiveX plug-in unit of independent process.
Between page process and independent process,
A window associated with each control object it is respectively created with for communicating in two the ActiveX control objects created.Two control object can interact for size, focus, refreshing, script and other information specifically.
The method provided according to the present embodiment can intercept all requests of page process and independent process direct interaction.If page process and independent process need to communicate, then the information realized between the two process by two the ActiveX control objects being pre-created is mutual.Due to independent process and the independence of page process, therefore, the concrete calculating process of flash plug-in unit is carried out in independent process, thus does not interferes with former page process.
Further, during the display of flash, then the result calculated in independent process can be drawn in newly-built broadcast window with a newly-built broadcast window, now a point following two situation is described as follows.
The first, the flash plug-in unit in page process is the situation of the flash plug-in unit without broadcast window.
Fig. 3 shows the schematic diagram that the flash plug-in unit in page process according to an embodiment of the invention is play without flash plug-in unit during broadcast window.In figure 3, when the result calculated in independent process is drawn in newly-built broadcast window, an intervalometer is had in independent process, call IViewObject interface Draw method at predetermined intervals and obtain draw data, the data of calculating to be plotted in newly created flash broadcast window.
When user wishes to show in the flash window of the former page, newly-built broadcast window can be arranged on the flash broadcast window position of the former page, but removable, the scaling of this window etc., to meet the demand of user.
The second, the flash plug-in unit in page process is the situation of the flash plug-in unit having broadcast window.
Fig. 4 shows that the flash plug-in unit in page process according to an embodiment of the invention has the schematic diagram that flash plug-in unit during broadcast window is play.The result calculated in independent process is drawn in newly-built broadcast window, and newly-built broadcast window is set to the parent window of flash broadcast window in the former page.
Specifically, by calling the IOleWindow interface GetWindow method of flash object, obtain the window of its correspondence, then the parent window of flash broadcast window is set by SetParent.
When user wishes to show in the flash window of the former page, newly-built broadcast window can be arranged on the flash broadcast window position of the former page, but removable, the scaling of this window etc., to meet the demand of user.
Further, in former page process, on the opportunity obtaining window, independent process returns sky.Specifically, when page process scroll through pages, the IOleWindow interface GetWindow method that can call flash object judges whether flash object has window, if there being window, by sending WM_MOVE message moving window, returning NULL prohibiting page process by GetWindow and moving flash window.
In summary, a kind of method present embodiments providing player plug-in in a browser, it is achieved that the real stripping of webpage and plug-in unit, and then just solve that the pin function that embeds is complete and plug-in unit and the interactional problem of the page.
Based on same inventive concept, the embodiment of the present invention additionally provides the playing device of plug-in unit in a kind of browser, it is possible to realize the player method of plug-in unit in the browser of any one preferred embodiment above-mentioned.Fig. 5 shows the structural representation of the playing device of plug-in unit in browser according to an embodiment of the invention.Seeing Fig. 5, in browser, the playing device of plug-in unit at least includes:
Creation module 501, is configured to when the page process of browser loads and activates the first plug-in unit, creates the independent process different from page process, loads and activate the second plug-in unit in independent process, and wherein, the second plug-in unit replicates the information of the first plug-in unit;
Computing module 502, is configured in independent process, calculates the information of the second plug-in unit, obtains result of calculation;
Playing module 503, is configured to carry out the second plug-in unit drawing in broadcast window according to result of calculation play.
In a preferred embodiment, creation module 501 is also configured as:
Page process is the first plug-in unit generates the first control object;
Independent process is the second plug-in unit generates the second control object;
Utilize the second control object to interact with the first control object to communicate, obtain the information of the first plug-in unit;
The second control object is utilized to send the information of the first plug-in unit obtained to the second plug-in unit.
In a preferred embodiment, carrying out mutual operation by pointer between the first plug-in unit and the first control object, wherein, this pointer can call multiple standard interface;And
Mutual operation is carried out by the pointer of same type between the second plug-in unit and the second control object.
In a preferred embodiment, creation module 501 is also configured as:
In page process, create the first window associated with the first control object;
In independent process, create the second window associated with the second control object;
First window and the second window is utilized to interact communication.
In a preferred embodiment, the information of interactive communication includes at least one following:
The focus of thread in the size of plug-in unit, page process, the refresh operation of thread of page process, the execution of script.
In a preferred embodiment, playing module 503 is also configured as:
When page process does not exist the broadcast window of the first plug-in unit, utilize the newly-built broadcast window of independent process;
According to the intervalometer of independent process, timing acquisition result of calculation;
Carry out the second plug-in unit drawing in newly-built broadcast window according to result of calculation and play.
In a preferred embodiment, playing module 503 is also configured as:
When page process exists the former broadcast window of the first plug-in unit, utilize the newly-built broadcast window of independent process, and newly-built broadcast window is set to the parent window of former broadcast window;
Carry out the second plug-in unit drawing in newly-built broadcast window according to result of calculation and play.
Newly-built broadcast window can move on a web browser or scaling processes.
In a preferred embodiment, seeing Fig. 5, in browser, the playing device of plug-in unit can also include informing module 504.Receive the page process when initiating the request obtaining broadcast window, inform and module 504 independent process can be utilized to inform page process is without broadcast window.
In a preferred embodiment, the first plug-in unit and/or the second plug-in unit are ActiveX plug-in unit.
Use the player method of plug-in unit and device in the browser that the embodiment of the present invention provides can reach following beneficial effect:
In embodiments of the present invention, the page process of browser loads and activates the first plug-in unit, but not carrying out the first plug-in unit drawing plays, but create an independent process different from page process, and load in independent process and activate the second plug-in unit, utilize the second plug-in unit to realize the duplication to the first plugin information.Owing to the information of the first plug-in unit and the second plug-in unit is consistent, therefore, it is consistent for carrying out the information of the second plug-in unit calculating and the information of the first plug-in unit is calculated acquired result of calculation, then according to result of calculation, the second plug-in unit carries out in broadcast window the content that drafting play and should also be consistent.But, owing to the second plug-in unit is arranged in independent process, share a process with independent process, two different processes it are suitable for respectively from page process, therefore, the operation of the second plug-in unit and the operation of page process are independent, and a side occurs problem can not affect the stability of the opposing party.If the second plug-in unit appearance is stuck or after collapse, is not result in that whole webpage exits, it is possible to increase the stability of page operation, in like manner, after stuck or collapse occurs in page process, the second plug-in unit being also not result in the page exits, and improves the stability of plug-in component operation.As can be seen here, in the browser that the embodiment of the present invention provides, the player method of plug-in unit on the premise of not affecting result of broadcast, can improve the stability of browser execution.
Further, owing to the first plug-in unit is not really performed, and the second plug-in unit is real executive agent, and therefore, it can the first plug-in unit is called agent object, and the second plug-in unit is moving object.The embodiment of the present invention is by running agent object in page process, and in independent process, run moving object, make real browser plug-in, such as real ActiveX plug-in unit separates with page process, so that not interfering with the browser process of embedding browser plug-in unit when browser plug-in goes wrong, i.e. browser plug-in does not interferes with the page process when going wrong, thus improves the stability of browser.Meanwhile, when the problem of the safeties such as virus occurs when browser plug-in, owing to browser plug-in separates with page process, do not interfere with the operation of page process, thus also improve the safety of browser.
Additionally, when browser plug-in goes wrong, the object thread running browser plug-in can be performed hang-up, reduce the operation such as authority or termination, so that the system resources such as the EMS memory occupation of browser plug-in and CPU take can be done the distribution oriented by independent process, realize more preferable resource distribution way of recycling, more reasonably dispatching resource, termination process makes process exit resource reclaim can also be allowed more thorough.
In description mentioned herein, illustrate a large amount of detail.It is to be appreciated, however, that embodiments of the invention can be put into practice in the case of not having these details.In some instances, it is not shown specifically known method, structure and technology, in order to do not obscure the understanding of this description.
Similarly, it is to be understood that, one or more in order to simplify that the disclosure helping understands in each inventive aspect, above in the description of the exemplary embodiment of the present invention, each feature of the present invention is grouped together in single embodiment, figure or descriptions thereof sometimes.But, the method for the disclosure should not being construed to reflect an intention that, i.e. the present invention for required protection requires than the more feature of feature being expressly recited in each claim.More precisely, as the following claims reflect, inventive aspect is all features less than single embodiment disclosed above.Therefore, it then follows claims of detailed description of the invention are thus expressly incorporated in this detailed description of the invention, the most each claim itself is as the independent embodiment of the present invention.
Those skilled in the art are appreciated that and can adaptively change the module in the equipment in embodiment and they are arranged in one or more equipment different from this embodiment.Module in embodiment or unit or assembly can be combined into a module or unit or assembly, and multiple submodule or subelement or sub-component can be put them in addition.In addition at least some in such feature and/or process or unit excludes each other, can use any combination that all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so disclosed any method or all processes of equipment or unit are combined.Unless expressly stated otherwise, each feature disclosed in this specification (including adjoint claim, summary and accompanying drawing) can be replaced by the alternative features providing identical, equivalent or similar purpose.
In addition, those skilled in the art it will be appreciated that, although embodiments more described herein include some feature included in other embodiments rather than further feature, but the combination of the feature of different embodiment means to be within the scope of the present invention and formed different embodiments.Such as, in the following claims, one of arbitrarily can mode the using in any combination of embodiment required for protection.
The all parts embodiment of the present invention can realize with hardware, or realizes with the software module run on one or more processor, or realizes with combinations thereof.It will be understood by those of skill in the art that the some or all functions of the some or all parts that microprocessor or digital signal processor (DSP) can be used in practice to realize in browser according to embodiments of the present invention in the playing device of plug-in unit.The present invention is also implemented as part or all the equipment for performing method as described herein or device program (such as, computer program and computer program).The program of such present invention of realization can store on a computer-readable medium, or can be to have the form of one or more signal.Such signal can be downloaded from internet website and obtain, or provides on carrier signal, or provides with any other form.
The present invention will be described rather than limits the invention to it should be noted above-described embodiment, and those skilled in the art can design alternative embodiment without departing from the scope of the appended claims.In the claims, any reference marks that should not will be located between bracket is configured to limitations on claims.Word " comprises " and does not excludes the presence of the element or step not arranged in the claims.Word "a" or "an" before being positioned at element does not excludes the presence of multiple such element.The present invention by means of including the hardware of some different elements and can realize by means of properly programmed computer.If in the unit claim listing equipment for drying, several in these devices can be specifically to be embodied by same hardware branch.Word first, second and third use do not indicate that any order.Can be title by these word explanations.

Claims (20)

1. a player method for plug-in unit in browser, including:
When the page process of browser loads and activates the first plug-in unit, creating the independent process different from page process, load and activate the second plug-in unit in independent process, wherein, described second plug-in unit replicates the information of described first plug-in unit;
In independent process, the information of described second plug-in unit is calculated, obtain result of calculation;
Carry out described second plug-in unit drawing in broadcast window according to described result of calculation and play.
Method the most according to claim 1, described second plug-in unit replicates the information of described first plug-in unit, including:
Intercept page process and the request of independent process direct interaction;
The first control object is generated for described first plug-in unit in page process;
The second control object is generated for described second plug-in unit in independent process;
Utilize described second control object to interact with described first control object to communicate, obtain the information of described first plug-in unit;
Described second control object is utilized to send the information of described first plug-in unit obtained to described second plug-in unit.
Method the most according to claim 2,
Carrying out mutual operation by pointer between described first plug-in unit and described first control object, wherein, this pointer can call multiple standard interface;And
Mutual operation is carried out by the pointer of same type between described second plug-in unit and described second control object.
Method the most according to claim 2, utilizes described second control object to interact with described first control object and communicates, including:
In page process, create the first window associated with described first control object;
In independent process, create the second window associated with described second control object;
Utilize described first window to interact with described second window to communicate.
5., according to the method described in any one of claim 2 to 4, the information of interactive communication includes at least one following:
The focus of thread in the size of plug-in unit, page process, the refresh operation of thread of page process, the execution of script.
Method the most according to claim 1, carries out described second plug-in unit drawing in broadcast window according to described result of calculation and plays, including:
When page process does not exist the broadcast window of described first plug-in unit, utilize the newly-built broadcast window of described independent process;
According to the intervalometer of described independent process, result of calculation described in timing acquisition;
Carry out described second plug-in unit drawing in newly-built broadcast window according to described result of calculation and play.
Method the most according to claim 1, carries out described second plug-in unit drawing in broadcast window according to described result of calculation and plays, including:
When page process exists the former broadcast window of described first plug-in unit, utilize the newly-built broadcast window of described independent process, and newly-built broadcast window is set to the parent window of former broadcast window;
Carry out described second plug-in unit drawing in newly-built broadcast window according to described result of calculation and play.
8., according to the method described in claim 6 or 7, described newly-built broadcast window can move on a web browser or scale.
Method the most according to claim 7, also includes:
When page process initiates the request obtaining broadcast window, described independent process informs that described page process is without described broadcast window.
Method the most according to claim 1, described first plug-in unit and/or described second plug-in unit are ActiveX plug-in unit.
The playing device of plug-in unit in 11. 1 kinds of browsers, including:
Creation module, is configured to when the page process of browser loads and activates the first plug-in unit, creates the independent process different from page process, loads and activate the second plug-in unit in independent process, and wherein, described second plug-in unit replicates the information of described first plug-in unit;
Computing module, is configured in independent process, calculates the information of described second plug-in unit, obtains result of calculation;
Playing module, is configured to carry out described second plug-in unit drawing in broadcast window according to described result of calculation play.
12. devices according to claim 11, described creation module is additionally configured to:
Intercept page process and the request of independent process direct interaction;
The first control object is generated for described first plug-in unit in page process;
The second control object is generated for described second plug-in unit in independent process;
Utilize described second control object to interact with described first control object to communicate, obtain the information of described first plug-in unit;
Described second control object is utilized to send the information of described first plug-in unit obtained to described second plug-in unit.
13. devices according to claim 12, wherein
Carrying out mutual operation by pointer between described first plug-in unit and described first control object, wherein, this pointer can call multiple standard interface;And
Mutual operation is carried out by the pointer of same type between described second plug-in unit and described second control object.
14. devices according to claim 12, described creation module is additionally configured to:
In page process, create the first window associated with described first control object;
In independent process, create the second window associated with described second control object;
Utilize described first window to interact with described second window to communicate.
15. according to the device described in any one of claim 12 to 14, and the information of interactive communication includes at least one following:
The focus of thread in the size of plug-in unit, page process, the refresh operation of thread of page process, the execution of script.
16. devices according to claim 11, described playing module is additionally configured to:
When page process does not exist the broadcast window of described first plug-in unit, utilize the newly-built broadcast window of described independent process;
According to the intervalometer of described independent process, result of calculation described in timing acquisition;
Carry out described second plug-in unit drawing in newly-built broadcast window according to described result of calculation and play.
17. devices according to claim 11, described playing module is additionally configured to:
When page process exists the former broadcast window of described first plug-in unit, utilize the newly-built broadcast window of described independent process, and newly-built broadcast window is set to the parent window of former broadcast window;
Carry out described second plug-in unit drawing in newly-built broadcast window according to described result of calculation and play.
18. according to the device described in claim 16 or 17, and described newly-built broadcast window can move on a web browser or scaling processes.
19. device according to claim 17, also including informing module, when being configured to the request receiving page process initiation acquisition broadcast window, described page process is without described broadcast window to utilize described independent process to inform.
20. devices according to claim 11, described first plug-in unit and/or described second plug-in unit are ActiveX plug-in unit.
CN201210573078.3A 2012-12-25 2012-12-25 The player method of plug-in unit and device in browser Active CN103064680B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201210573078.3A CN103064680B (en) 2012-12-25 2012-12-25 The player method of plug-in unit and device in browser
PCT/CN2013/083729 WO2014101486A1 (en) 2012-12-25 2013-09-18 Method and device for playing plug-in in browser
US14/655,138 US20150347164A1 (en) 2012-12-25 2013-09-18 Method and Device for Playing Plug-in in Browser

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210573078.3A CN103064680B (en) 2012-12-25 2012-12-25 The player method of plug-in unit and device in browser

Publications (2)

Publication Number Publication Date
CN103064680A CN103064680A (en) 2013-04-24
CN103064680B true CN103064680B (en) 2016-08-03

Family

ID=48107318

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210573078.3A Active CN103064680B (en) 2012-12-25 2012-12-25 The player method of plug-in unit and device in browser

Country Status (1)

Country Link
CN (1) CN103064680B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103077047B (en) * 2012-12-25 2016-08-03 北京奇虎科技有限公司 A kind of plug-in playback method and device
WO2014101486A1 (en) * 2012-12-25 2014-07-03 北京奇虎科技有限公司 Method and device for playing plug-in in browser
CN103226477B (en) * 2013-05-21 2016-12-28 成都云朵技术有限公司 A kind of method and system strengthening flash video image quality in WebBrowser
CN103488967B (en) * 2013-10-14 2016-08-10 张祖锋 A kind of based on visible ray or the Cabinet administration system of infrared location and method
CN103914327A (en) * 2014-04-25 2014-07-09 广东威创视讯科技股份有限公司 Plug-in loading method and plug-in loading module
CN104268019B (en) * 2014-09-23 2018-04-27 广州猎豹网络科技有限公司 A kind of software running method, device and terminal
CN105630507B (en) * 2015-12-29 2020-01-24 Tcl集团股份有限公司 WebView control interface drawing method and device
CN108334779B (en) * 2018-01-30 2023-11-21 上海连尚网络科技有限公司 Application processing method, device and computing storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101706796A (en) * 2008-11-14 2010-05-12 北京搜狗科技发展有限公司 Method and device for showing webpage resources
CN103077047A (en) * 2012-12-25 2013-05-01 北京奇虎科技有限公司 Plug-in playback method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100037317A1 (en) * 2008-08-06 2010-02-11 Jeong Wook Oh Mehtod and system for security monitoring of the interface between a browser and an external browser module
CN102314510A (en) * 2011-09-15 2012-01-11 奇智软件(北京)有限公司 Method and system for executing browser control
CN102436507B (en) * 2011-12-28 2014-07-16 奇智软件(北京)有限公司 Method and device for browsing web pages

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101706796A (en) * 2008-11-14 2010-05-12 北京搜狗科技发展有限公司 Method and device for showing webpage resources
CN103077047A (en) * 2012-12-25 2013-05-01 北京奇虎科技有限公司 Plug-in playback method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
COM程序的简单实现(COM技术内幕笔记之一);shipfi;《http://www.cnblogs.com/shipfi/archive/2007/02/07/643829.html》;20070207;第1-5页 *
详解主流浏览器多进程架构:Chrome、IE;佚名;《http://www.cnbeta.com/articles/109595.htm》;20100426;第1-3页 *

Also Published As

Publication number Publication date
CN103064680A (en) 2013-04-24

Similar Documents

Publication Publication Date Title
CN103064680B (en) The player method of plug-in unit and device in browser
CN110020292B (en) Webpage content extraction method and terminal equipment
TWI690812B (en) Method, device and client for dynamic layout of page elements
EP3816823A1 (en) Webpage rendering method, device, electronic apparatus and storage medium
CN107992301B (en) User interface implementation method, client and storage medium
US9507648B1 (en) Separate plug-in processes in browsers and applications thereof
CN104866327B (en) A kind of PHP development approaches and framework
CN103077047B (en) A kind of plug-in playback method and device
CN101876897A (en) System and method used for processing Widget on Web browser
CN108762956A (en) Obtain method, server, mobile terminal and the storage medium of Native local datas
CN103777967A (en) Page returning method and page generating method and device
US20150149888A1 (en) Systems and methods for executing aspects of a document
US8214815B2 (en) Reducing the run-time cost of invoking a server page
CN103543991A (en) Method for extending functions of browser and browser system
CN103164541A (en) Image presentation method and equipment
CN104954894A (en) Video traffic guiding method and device as well as electronic equipment
CN102662737A (en) Calling method and device of extension program
CN110727429A (en) Front-end page generation method, device and equipment
CN103034503B (en) A kind of script execution, system and browser
CN114217878A (en) Object loading method and system
CN103019734B (en) A kind of activity object implementation, system and browser
CN106843975B (en) Method and device for extending HTML5 application function
US10218767B2 (en) Method, system and browser for executing active object of browser
CN103064709B (en) Execution method, system and the browser of browser moving object
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
TR01 Transfer of patent right

Effective date of registration: 20220721

Address after: Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before: Qizhi software (Beijing) Co.,Ltd.

TR01 Transfer of patent right