[go: up one dir, main page]

CN106933629B - Method for loading browser plug-in icon and browser - Google Patents

Method for loading browser plug-in icon and browser Download PDF

Info

Publication number
CN106933629B
CN106933629B CN201710138985.8A CN201710138985A CN106933629B CN 106933629 B CN106933629 B CN 106933629B CN 201710138985 A CN201710138985 A CN 201710138985A CN 106933629 B CN106933629 B CN 106933629B
Authority
CN
China
Prior art keywords
plug
browser
icon
container
browser plug
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
CN201710138985.8A
Other languages
Chinese (zh)
Other versions
CN106933629A (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 360 Zhiling Technology Co ltd
Original Assignee
Beijing Qihoo Technology 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 filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201710138985.8A priority Critical patent/CN106933629B/en
Publication of CN106933629A publication Critical patent/CN106933629A/en
Application granted granted Critical
Publication of CN106933629B publication Critical patent/CN106933629B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明公开了一种加载浏览器插件图标的方法及浏览器。该方法包括:预先在各网页页面对应的浏览器地址栏中的可用空间内设置用于显示浏览器插件图标的插件容器,构建网页页面与插件容器长度的映射关系集;在监测到浏览器加载网页页面后,查询预先存储的网页页面与插件容器长度的映射关系集,获取加载的网页页面映射的插件容器长度,按照获取的插件容器长度在所述插件容器中加载浏览器插件图标。应用本发明,可以提升浏览器页面中内容显示效果。

Figure 201710138985

The invention discloses a method for loading browser plug-in icons and a browser. The method includes: presetting a plug-in container for displaying browser plug-in icons in the available space in the browser address bar corresponding to each web page, and constructing a mapping relationship set between the web page and the length of the plug-in container; After the web page, query the pre-stored set of mapping relationships between the web page and the plug-in container length, obtain the plug-in container length mapped by the loaded web page, and load the browser plug-in icon in the plug-in container according to the acquired plug-in container length. By applying the present invention, the display effect of the content in the browser page can be improved.

Figure 201710138985

Description

加载浏览器插件图标的方法及浏览器Method for loading browser plug-in icon and browser

技术领域technical field

本发明涉及浏览器插件显示技术,具体涉及一种基于浏览器显示界面加载浏览器插件图标的方法及浏览器。The invention relates to a browser plug-in display technology, in particular to a method for loading a browser plug-in icon based on a browser display interface and a browser.

背景技术Background technique

浏览器插件是一种遵循一定规范的应用程序接口(API,Application Programming Interface)编写的用于补充浏览器功能的程序,可以随着IE浏览器(简称浏览器)的启动而自动执行。例如,浏览器中安装相关的插件后,使得浏览器能够直接调用安装的插件,用于处理特定类型的文件。其中,常见的浏览器插件包括:Flash插件、RealPlayer插件、MMS插件、广告拦截插件、ActiveX插件等。A browser plug-in is a program written in compliance with a certain standard application programming interface (API, Application Programming Interface) and used to supplement the functions of the browser, and can be automatically executed when the IE browser (referred to as the browser) is started. For example, after a related plug-in is installed in the browser, the browser can directly call the installed plug-in to process files of a specific type. Among them, common browser plug-ins include: Flash plug-ins, RealPlayer plug-ins, MMS plug-ins, ad blocking plug-ins, ActiveX plug-ins, and the like.

浏览器是通信设备最经常使用到的客户端程序,一般支持网景插件应用程序接口(NPAPI,Netscape Plugin Application Programming Interface)和Pepper插件应用程序接口(PPAPI,Pepper Plug-in Application Programming I nterface)两种格式的扩展浏览器插件,浏览器插件可以辅助加强浏览器功能。其中,NPAPI插件是由.js/.dll文件等组成的浏览器第三方扩展程序,使Java Script代码能够调用本地二进制代码。运行在NPAPI插件中的代码拥有当前用户的全部权限,不能利用Google Chrome的沙箱技术和其他安全防护技术。PPAPI是在NPAPI基础之上发展起来的,通过对NPAPI进行一些修改,使其更加安全,具有更好的可移植性和性能。Browsers are the most frequently used client programs for communication devices. They generally support Netscape Plug-in Application Programming Interface (NPAPI, Netscape Plug-in Application Programming Interface) and Pepper Plug-in Application Programming Interface (PPAPI, Pepper Plug-in Application Programming Interface). It is an extended browser plug-in in various formats, and the browser plug-in can assist in enhancing the function of the browser. Among them, the NPAPI plug-in is a third-party browser extension program composed of .js/.dll files, etc., so that the Java Script code can call the local binary code. The code running in the NPAPI plug-in has all the permissions of the current user and cannot take advantage of Google Chrome's sandbox technology and other security protection technologies. PPAPI is developed on the basis of NPAPI. By making some modifications to NPAPI, it is more secure and has better portability and performance.

浏览器插件在使用之前,需要进行安装,在安装完之后,还需要重启浏览器才能使安装的插件生效,并在浏览器显示界面加载该浏览器插件图标,以便于用户通过点击显示的浏览器插件图标,启动、停用或升级浏览器插件。其中,加载的浏览器插件图标(ICON)在浏览器显示界面的工具栏中单独占用一行,多个浏览器插件图标依序在该行中排列。Before using the browser plug-in, you need to install it. After installation, you need to restart the browser to make the installed plug-in take effect, and load the browser plug-in icon on the browser display interface, so that the user can click the displayed browser. Plug-in icon to activate, deactivate or upgrade browser plug-ins. The loaded browser plug-in icon (ICON) occupies a separate row in the toolbar of the browser display interface, and multiple browser plug-in icons are sequentially arranged in the row.

由上述可见,现有在浏览器显示界面加载浏览器插件图标的方法,在浏览器显示界面中显示的浏览器插件图标,需要独占一行工具栏,使得浏览器页面中的内容可显示的高度减少,从而影响浏览器页面中内容的显示效果,降低了用户业务体验;进一步地,在浏览器显示界面中加载的浏览器插件图标位置都是固定的,用户只能通过配置来设置是否显示及隐藏该浏览器插件图标,而在选择隐藏该浏览器插件图标后,浏览器显示界面中对应的位置为空区域并预留为后续该浏览器插件图标显示的区域,不能实现浏览器插件图标的动态调整;而且,采用静态的方法设置浏览器插件图标,不能实时反映一些浏览器插件的更新信息,例如,对于广告拦截插件,在启动后,其拦截的广告随着时间而增加,而现有的广告拦截插件,还不能提供相关的广告拦截信息,不能满足用户的个性化需求,降低了用户的业务体验。As can be seen from the above, there is an existing method for loading a browser plug-in icon on a browser display interface. The browser plug-in icon displayed in the browser display interface needs to have an exclusive row of toolbars, so that the displayable height of the content in the browser page is reduced. , thereby affecting the display effect of the content in the browser page and reducing the user's business experience; further, the positions of the browser plug-in icons loaded in the browser display interface are fixed, and the user can only set whether to display or hide it through configuration. The browser plug-in icon, and after choosing to hide the browser plug-in icon, the corresponding position in the browser display interface is an empty area and reserved for the subsequent display area of the browser plug-in icon, which cannot realize the dynamic behavior of the browser plug-in icon. Adjustment; moreover, the static method of setting browser plug-in icons cannot reflect the update information of some browser plug-ins in real time. The ad blocking plug-in cannot yet provide relevant ad blocking information, cannot meet the user's personalized needs, and reduces the user's business experience.

发明内容SUMMARY OF THE INVENTION

鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的加载浏览器插件图标的方法及浏览器。In view of the above problems, the present invention is proposed to provide a method and browser for loading browser plug-in icons that overcome the above problems or at least partially solve the above problems.

依据本发明的一个方面,提供了加载浏览器插件图标的方法,该方法包括:According to one aspect of the present invention, a method for loading a browser plug-in icon is provided, the method comprising:

预先在各网页页面对应的浏览器地址栏中的可用空间内设置用于显示浏览器插件图标的插件容器,构建网页页面与插件容器长度的映射关系集;Pre-setting a plug-in container for displaying browser plug-in icons in the available space in the browser address bar corresponding to each web page, and constructing a mapping relationship set between the web page and the length of the plug-in container;

在监测到浏览器加载网页页面后,查询预先存储的网页页面与插件容器长度的映射关系集,获取加载的网页页面映射的插件容器长度,按照获取的插件容器长度在所述插件容器中加载浏览器插件图标。After monitoring that the browser loads the web page, query the pre-stored set of mapping relationships between the web page and the length of the plug-in container, obtain the length of the plug-in container mapped by the loaded web page, and load and browse the plug-in container according to the acquired length of the plug-in container. plug-in icon.

根据本发明的另一个方面提供了一种浏览器,该浏览器包括:映射关系集构建模块以及浏览器插件图标加载模块,其中,According to another aspect of the present invention, a browser is provided, the browser includes: a mapping relationship set building module and a browser plug-in icon loading module, wherein,

映射关系集构建模块,用于在各网页页面对应的浏览器地址栏中的可用空间内设置用于显示浏览器插件图标的插件容器,构建网页页面与插件容器长度的映射关系集;The mapping relationship set building module is used to set a plug-in container for displaying the browser plug-in icon in the available space in the browser address bar corresponding to each web page, and construct a mapping relationship set between the web page and the length of the plug-in container;

浏览器插件图标加载模块,用于在监测到浏览器加载网页页面后,查询预先存储的网页页面与插件容器长度的映射关系集,获取加载的网页页面映射的插件容器长度,按照获取的插件容器长度在所述插件容器中加载浏览器插件图标。The browser plug-in icon loading module is used to query the pre-stored set of mapping relationships between the web page and the length of the plug-in container after monitoring that the browser loads the web page, and obtain the length of the plug-in container mapped by the loaded web page, according to the obtained plug-in container. Length loads the browser plugin icon in the plugin container.

根据本发明的加载浏览器插件图标的方法及浏览器,可以预先在各网页页面对应的浏览器地址栏中的可用空间内设置用于显示浏览器插件图标的插件容器,构建网页页面与插件容器长度的映射关系集;在监测到浏览器加载网页页面后,查询预先存储的网页页面与插件容器长度的映射关系集,获取加载的网页页面映射的插件容器长度,按照获取的插件容器长度在所述插件容器中加载浏览器插件图标。由此解决了浏览器插件图标需要单独占用工具栏中一行的技术问题,取得了提升浏览器页面中内容显示效果、实现浏览器插件图标的动态调整以及实时反映一些浏览器插件的更新信息的有益效果。According to the method for loading browser plug-in icons and the browser of the present invention, a plug-in container for displaying browser plug-in icons can be set in the available space in the browser address bar corresponding to each web page in advance, and the web page and plug-in container can be constructed. Length mapping relationship set; after monitoring the browser to load the web page, query the pre-stored mapping relationship set between the web page and the plug-in container length, and obtain the plug-in container length mapped by the loaded web page, according to the obtained plug-in container length. Load the browser plug-in icon in the plug-in container described above. This solves the technical problem that the browser plug-in icon needs to occupy a separate row in the toolbar, and achieves the benefits of improving the content display effect in the browser page, realizing the dynamic adjustment of the browser plug-in icon, and reflecting the update information of some browser plug-ins in real time. Effect.

上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solutions of the present invention, in order to be able to understand the technical means of the present invention more clearly, it can be implemented according to the content of the description, and in order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand , the following specific embodiments of the present invention are given.

附图说明Description of drawings

通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are for the purpose of illustrating preferred embodiments only and are not to be considered limiting of the invention. Also, the same components are denoted by the same reference numerals throughout the drawings. In the attached image:

图1为本发明实施例加载浏览器插件图标的方法流程示意图;1 is a schematic flowchart of a method for loading a browser plug-in icon according to an embodiment of the present invention;

图2为本发明实施例浏览器显示界面的第一结构示意图;2 is a schematic diagram of a first structure of a browser display interface according to an embodiment of the present invention;

图3为本发明实施例浏览器显示界面的第二结构示意图;3 is a schematic diagram of a second structure of a browser display interface according to an embodiment of the present invention;

图4为本发明实施例选取插件应用程序图标并点击右键后弹出的操作功能菜单示意图;以及,4 is a schematic diagram of an operation function menu that pops up after selecting a plug-in application program icon and clicking the right button according to an embodiment of the present invention; and,

图5为本发明实施例浏览器结构示意图。FIG. 5 is a schematic structural diagram of a browser according to an embodiment of the present invention.

具体实施方式Detailed ways

下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that the present disclosure will be more thoroughly understood, and will fully convey the scope of the present disclosure to those skilled in the art.

现有在浏览器显示界面中加载的浏览器插件图标,单独占用浏览器显示界面工具栏中的一行,使得浏览器页面中的内容可显示的高度减少,从而影响浏览器页面中内容的显示效果;进一步地,用户安装的浏览器插件一般不会超过五个,而占用的一行工具栏,在安装的浏览器插件数量有限的情况下,该行工具栏空间未得到有效利用,降低了浏览器页面的空间利用率。The existing browser plug-in icon loaded in the browser display interface occupies a row in the toolbar of the browser display interface alone, so that the displayable height of the content in the browser page is reduced, thereby affecting the display effect of the content in the browser page. ; Further, the number of browser plug-ins installed by the user generally does not exceed five, and a row of toolbars is occupied. Under the circumstance that the number of installed browser plug-ins is limited, the space of the toolbar in this row is not effectively utilized, which reduces the number of browser plug-ins. The space utilization of the page.

目前,浏览器显示界面中,通常加载操作系统默认的所有界面组件,包括浏览器插件以及非浏览器插件。其中,非浏览器插件对应的界面组件包括:浏览器地址栏、浏览器搜索栏、Tab页、起始页、状态栏、工具栏等,浏览器插件对应的界面组件包括浏览器插件栏。其中,Currently, in a browser display interface, all default interface components of the operating system are usually loaded, including browser plug-ins and non-browser plug-ins. The interface components corresponding to non-browser plug-ins include: browser address bar, browser search bar, Tab page, start page, status bar, toolbar, etc., and the interface components corresponding to browser plug-ins include browser plug-in bars. in,

浏览器地址栏用于输入网址信息,例如,统一资源定位符(URL,UniformResourceLocator)信息以访问网站,在浏览器显示界面中占据有固定的长度,且浏览器地址栏长度较长,一般为200字符长度。The browser address bar is used to input website information, for example, Uniform Resource Locator (URL, Uniform Resource Locator) information to access the website, occupies a fixed length in the browser display interface, and the length of the browser address bar is longer, generally 200 character length.

本发明实施例中,考虑到浏览器地址栏的长度较长,在输入网址信息,例如,统一资源定位符信息后,还具有较长的可用空间没有被有效利用,因而,可以利用该可用空间设置浏览器插件图标。这样,无需另行设置浏览器插件图标单独占用工具栏中的一行,可以增加浏览器页面中的内容可显示的高度,从而提升浏览器页面中内容的显示效果。In the embodiment of the present invention, considering that the length of the address bar of the browser is relatively long, after inputting the website information, for example, the uniform resource locator information, there is still a relatively long available space that is not effectively used. Therefore, the available space can be used. Set browser plug-in icons. In this way, it is not necessary to separately set the browser plug-in icon to occupy a row in the toolbar, and the displayable height of the content in the browser page can be increased, thereby improving the display effect of the content in the browser page.

图1为本发明实施例加载浏览器插件图标的方法流程示意图。参见图1,该流程包括:FIG. 1 is a schematic flowchart of a method for loading a browser plug-in icon according to an embodiment of the present invention. Referring to Figure 1, the process includes:

步骤101,预先在各网页页面对应的浏览器地址栏中的可用空间内设置用于显示浏览器插件图标的插件容器,构建网页页面与插件容器长度的映射关系集;Step 101, pre-setting a plug-in container for displaying the browser plug-in icon in the available space in the browser address bar corresponding to each web page, and constructing a mapping relationship set between the web page and the length of the plug-in container;

本步骤中,基于同一浏览器,在不同的网页页面中,由于不同网页页面对应的网址信息长度不同,而浏览器地址栏的长度在各网页页面中是相同的,因而,不同的网页页面对应的浏览器地址栏中的可用空间可能相同,也可能不同。映射关系集中,包括每一网页页面与相应插件容器长度的映射关系。这样,作为可选实施例,构建网页页面与插件容器(BrowserActionsContainer)长度的映射关系集包括:In this step, based on the same browser, in different web pages, since the length of the URL information corresponding to different web pages is different, and the length of the browser address bar is the same in each web page, therefore, different web pages correspond to The available space in the address bar of your browser may or may not be the same. The mapping relationship set includes the mapping relationship between each web page and the length of the corresponding plug-in container. In this way, as an optional embodiment, constructing a set of mapping relationships between web pages and the length of a plug-in container (BrowserActionsContainer) includes:

A11,获取网页页面对应的网址信息占用的字符长度;A11, obtain the character length occupied by the URL information corresponding to the webpage;

本步骤中,每一网页页面对应有一网址信息。例如,对于360导航页面,对应的网址信息为:http://hao.360.cn/?1004,对于最全招聘信息页面,对应的网址信息为:http://www.liepin.com/event/landingpage/sojob2.shtml?mscid=t_dx_013&utm_source=360cainixihuan&utm_medium=cpc&utm_campaign=信息类-工作&utm_content=通用词&utm_term=最全招聘信息。In this step, each web page corresponds to a website information. For example, for the 360 navigation page, the corresponding URL information is: http://hao.360.cn/? 1004. For the most complete recruitment information page, the corresponding website information is: http://www.liepin.com/event/landingpage/sojob2.shtml? mscid=t_dx_013&utm_source=360cainixihuan&utm_medium=cpc&utm_campaign=information-job&utm_content=general term&utm_term=the most complete recruitment information.

本发明实施例中,网址信息长度以字符长度进行标识。对于每一确定的网页页面,对应的网址信息的字符长度也可以确定。In the embodiment of the present invention, the length of the website information is identified by the length of characters. For each determined web page, the character length of the corresponding URL information can also be determined.

A12,根据浏览器地址栏的字符长度以及所述网页页面对应的网址信息占用的字符长度,计算所述网页页面对应的插件容器的字符长度。A12: Calculate the character length of the plug-in container corresponding to the web page according to the character length of the browser address bar and the character length occupied by the web address information corresponding to the web page.

本步骤中,由于网址信息长度的不同,因而,每一网址信息所在的浏览器地址栏中可用的空间也不同。也就是说,不同网页页面对应(映射)的插件容器的字符长度也会不同。In this step, due to the different lengths of the website information, the available space in the address bar of the browser where each website information is located is also different. That is to say, the character lengths of the plug-in containers corresponding to (mapped) different web pages will also be different.

本发明实施例中,由于可确定网页页面对应的网址信息长度,因而,可以为每一网页页面计算相应插件容器的字符长度,即构建网页页面与插件容器长度的映射关系。其中,插件容器长度可通过如下公式进行计算:In the embodiment of the present invention, since the length of the URL information corresponding to the web page can be determined, the character length of the corresponding plug-in container can be calculated for each web page, that is, the mapping relationship between the web page and the length of the plug-in container can be constructed. Among them, the length of the plug-in container can be calculated by the following formula:

Li=L-Lurli L i =LL urli

式中,In the formula,

Li为第i网页页面对应的插件容器长度,其中,i为自然数;Li is the length of the plug-in container corresponding to the i -th web page, where i is a natural number;

L为浏览器地址栏长度;L is the length of the browser address bar;

Lurli为第i网页页面对应的网址信息长度。L urli is the length of the URL information corresponding to the i-th web page.

实际应用中,在浏览器升级过程中,常通过内置功能的方式实现升级,而内置功能也就是浏览器中内置的程序,为了便于用户的浏览及操作习惯,本发明实施例中,可以将浏览器内置的程序也在浏览器地址栏中进行展示,因而,作为另一可选实施例,该方法可以进一步包括:In practical applications, in the browser upgrade process, the upgrade is often implemented by means of built-in functions, and the built-in functions are programs built into the browser. The built-in program of the browser is also displayed in the address bar of the browser. Therefore, as another optional embodiment, the method may further include:

在浏览器地址栏中的可用空间内设置用于显示浏览器内置功能程序图标的浏览器内置功能容器。A browser built-in function container for displaying the browser built-in function program icon is set in the available space in the browser address bar.

本步骤中,由于浏览器内置功能程序图标具有确定的数目,因而,浏览器内置功能程序图标占据的长度可为一常值。In this step, since the browser built-in function program icons have a certain number, the length occupied by the browser built-in function program icons may be a constant value.

作为可选实施例,所述浏览器内置功能容器设置在浏览器地址栏中的末端并朝前延伸预定设置的长度,其中,浏览器地址栏中的始端用于输入网址信息,即浏览器地址栏的左侧,预定设置的长度为浏览器内置功能容器中一个或多个浏览器内置功能程序图标的总长度。As an optional embodiment, the browser built-in function container is set at the end of the browser address bar and extends forward by a predetermined length, wherein the beginning end of the browser address bar is used to input website information, that is, the browser address On the left side of the column, the preset length is the total length of one or more browser built-in function program icons in the browser built-in function container.

这样,插件容器长度可通过如下公式进行计算:In this way, the plug-in container length can be calculated by the following formula:

Li=L-Lurli-Ln L i =LL urli -L n

式中,In the formula,

Ln为浏览器内置功能容器长度。本发明实施例中,为了进一步提升浏览器页面中内容的显示效果,还可以对浏览器显示界面中的其它相关图标进行聚合处理,即对浏览器显示界面中的图标进行模块化管理。该方法进一步包括:L n is the length of the browser built-in function container. In the embodiment of the present invention, in order to further improve the display effect of the content in the browser page, other related icons in the browser display interface can also be aggregated, that is, the icons in the browser display interface can be managed modularly. The method further includes:

在与浏览器地址栏同行的可用空间位置,设置工具栏按钮以及搜索栏。Set the toolbar buttons and search bar in the available space along with the browser's address bar.

本步骤中,由于浏览器地址栏长度一般为200,因而,没有覆盖浏览器显示界面的屏幕宽度,即在浏览器地址栏的左右两侧,存留有一定的可用空间,从而可以在可用空间内设置相应的工具栏按钮以及搜索栏,用以对各图标进行聚合处理。通过将浏览器显示界面中的其它相关图标聚合至工具栏或搜索栏中。这样,可以有效提升浏览器显示界面的可用空间,使得浏览器页面中内容的显示空间更大、显示效果更佳。关于将浏览器显示界面中的其它相关图标聚合至工具栏或搜索栏,为公知技术,在此略去详述。In this step, since the length of the address bar of the browser is generally 200, the screen width of the display interface of the browser is not covered, that is, there is a certain available space on the left and right sides of the address bar of the browser, so that the available space can be used within the available space. Set the corresponding toolbar button and search bar to aggregate each icon. By aggregating other related icons in the browser display interface into the toolbar or search bar. In this way, the available space of the browser display interface can be effectively increased, so that the display space of the content in the browser page is larger and the display effect is better. It is a well-known technology to aggregate other related icons in the browser display interface into a toolbar or a search bar, and details are omitted here.

作为可选实施例,设置的工具栏位于浏览器地址栏左侧作为始端的左侧,搜索栏位于浏览器地址栏右侧作为末端的右侧。也就是说,工具栏右侧与浏览器地址栏左侧相邻,搜索栏左侧与浏览器地址栏右侧相邻。As an optional embodiment, the set toolbar is located on the left side of the browser address bar as the left side of the beginning, and the search bar is located on the right side of the browser address bar as the right side of the end. That is, the right side of the toolbar is adjacent to the left side of the browser address bar, and the left side of the search bar is adjacent to the right side of the browser address bar.

本发明实施例中,浏览器插件包括但不限于:聊天软件客户端插件、虚拟机桌面插件、邮件提醒插件、其他具有消息提醒功能的插件、Flash插件、RealPlayer插件、MMS插件、广告拦截插件以及ActiveX插件等。In this embodiment of the present invention, browser plug-ins include but are not limited to: chat software client plug-ins, virtual machine desktop plug-ins, email reminder plug-ins, other plug-ins with message reminder functions, Flash plug-ins, RealPlayer plug-ins, MMS plug-ins, ad blocking plug-ins, and ActiveX plugins, etc.

图2为本发明实施例浏览器显示界面的第一结构示意图。参见图2,该浏览器显示界面设置有三个相互独立的部分,分别为:工具栏按钮、(浏览器)地址栏以及搜索栏。其中,在地址栏中,在预留网址信息的可用空间后,还设置有插件容器以及浏览器内置功能。FIG. 2 is a schematic diagram of a first structure of a browser display interface according to an embodiment of the present invention. Referring to FIG. 2 , the browser display interface is provided with three independent parts, namely: toolbar buttons, (browser) address bar and search bar. Among them, in the address bar, after reserving the available space for the website information, a plug-in container and a built-in function of the browser are also provided.

插件容器的位置可以设置于浏览器内置功能的左侧,如果用户取消显示(隐藏)浏览器内置功能,则插件容器可以直接从浏览器地址栏末端(右侧)开始排列,如果设置有浏览器内置功能,则插件容器从浏览器内置功能的左侧开始排列。The location of the plug-in container can be set on the left side of the built-in function of the browser. If the user cancels the display (hide) of the built-in function of the browser, the plug-in container can be arranged directly from the end (right side) of the browser address bar. Built-in functions, the plug-in container is arranged from the left side of the browser's built-in functions.

在逻辑结构上,插件容器(BrowserActionsContainer)属于浏览器地址栏的子元素,因而,插件容器的布局受浏览器地址栏位置及大小的控制。具体来说,本发明实施例中,插件容器最大可用空间长度为:浏览器地址栏总长度减去浏览器内置功能长度,再减去网址信息(URL)长度。其中,浏览器地址栏总长度一般为200,如果插件容器的可用空间不足以容纳全部插件的显示,则可以压缩网址信息长度,只要能够优先保障URL显示为原则即可,并隐藏插件容器中一些浏览器插件图标的显示。Logically, the plug-in container (BrowserActionsContainer) is a child element of the browser address bar, so the layout of the plug-in container is controlled by the location and size of the browser address bar. Specifically, in the embodiment of the present invention, the maximum available space length of the plug-in container is: the total length of the address bar of the browser minus the length of the built-in function of the browser, and then minus the length of the website information (URL). Among them, the total length of the browser address bar is generally 200. If the available space of the plug-in container is not enough to accommodate the display of all plug-ins, the length of the URL information can be compressed, as long as the URL display can be prioritized, and some parts of the plug-in container are hidden. Display of browser plug-in icons.

工具栏按钮包括:主页按钮、前进按钮、后退按钮、刷新按钮、恢复关闭按钮、收藏夹按钮以及功能大全按钮。作为可选实施例,工具栏按钮设置于浏览器工具栏的左侧,并显示“工具栏按钮”字样。Toolbar buttons include: home button, forward button, back button, refresh button, resume close button, favorite button and full-featured button. As an optional embodiment, the toolbar button is arranged on the left side of the browser toolbar, and the words "toolbar button" are displayed.

本发明的实施例中,浏览器可以是火狐浏览器(Firefox)、谷歌浏览器(GoogleChrome)、360安全浏览器等,当然可以理解的是,在本发明的实施例中并不限定浏览器的具体类型。In the embodiment of the present invention, the browser may be a Firefox browser (Firefox), a Google Chrome (Google Chrome), a 360 security browser, etc. Of course, it can be understood that the embodiments of the present invention do not limit the browser's specific type.

所应说明的是,步骤101只需要执行一次,而无需在每次加载浏览器插件图标时都执行。It should be noted that step 101 only needs to be executed once, and does not need to be executed every time the browser plug-in icon is loaded.

步骤102,在监测到浏览器加载网页页面后,查询预先存储的网页页面与插件容器长度的映射关系集,获取加载的网页页面映射的插件容器长度,按照获取的插件容器长度在所述插件容器中加载浏览器插件图标。Step 102, after monitoring that the browser loads the web page, query a pre-stored set of mapping relationships between the web page and the length of the plug-in container, obtain the length of the plug-in container mapped by the loaded web page, and store the length of the plug-in container in the plug-in container according to the acquired length of the plug-in container. Loading browser plug-in icon in .

本步骤中,作为可选实施例,可以在浏览器中设置用于对浏览器插件图标进行统一管理的管理页面,管理页面中设置有用户需要显示的浏览器插件图标信息,即待加载浏览器插件图标集,在待加载浏览器插件图标集中,存储有用户设置的需要显示以及不需要显示的各浏览器插件图标。这样,在每次启动浏览器后,对于各不同的网页页面,待加载浏览器插件图标集都相同,不同的是,基于不同网页页面对应的插件容器长度,从而使得在插件容器中能够加载的浏览器插件数量也不同。In this step, as an optional embodiment, a management page for unified management of browser plug-in icons may be set in the browser, and the management page is set with the browser plug-in icon information that the user needs to display, that is, the browser to be loaded. The plug-in icon set, in the to-be-loaded browser plug-in icon set, stores the browser plug-in icons set by the user that need to be displayed and those that do not need to be displayed. In this way, each time the browser is started, the icon sets of the browser plug-ins to be loaded are the same for different web pages. The number of browser plug-ins also varies.

作为可选实施例,按照获取的插件容器长度在所述插件容器中加载浏览器插件图标包括:As an optional embodiment, loading a browser plug-in icon in the plug-in container according to the obtained plug-in container length includes:

计算待加载浏览器插件图标集中所有浏览器插件图标的总长度;Calculate the total length of all browser plug-in icons in the browser plug-in icon set to be loaded;

判断计算的总长度是否大于所述获取的插件容器长度,如果是,从所述待加载浏览器插件图标集中,选取符合预先设置的加载策略的浏览器插件图标,并加载到所述插件容器中;否则,将所述待加载浏览器插件图标集中的所有浏览器插件图标加载到所述插件容器中。Determine whether the calculated total length is greater than the obtained length of the plug-in container, and if so, select the browser plug-in icon that conforms to the preset loading strategy from the set of browser plug-in icons to be loaded, and load it into the plug-in container ; otherwise, load all browser plug-in icons in the to-be-loaded browser plug-in icon set into the plug-in container.

本步骤中,作为可选实施例,选取符合预先设置的加载策略的浏览器插件图标包括:In this step, as an optional embodiment, selecting a browser plug-in icon that conforms to a preset loading policy includes:

按照浏览器插件图标的优先级,对待加载浏览器插件图标集中设置为显示的浏览器插件图标进行排序;According to the priority of browser plug-in icons, sort the browser plug-in icons set to be displayed in the browser plug-in icon set to be loaded;

本步骤中,用户可以在待加载浏览器插件图标集中为浏览器插件图标设置优先级。这样,在插件容器中空间有限的情况下,优先加载优先级高的浏览器插件图标。当然,浏览器插件图标优先级也可以由浏览器根据插件的功能、插件被下载的次数等信息进行设置。In this step, the user may set a priority for the browser plug-in icon in the set of browser plug-in icons to be loaded. In this way, when the space in the plug-in container is limited, the browser plug-in icon with a high priority is loaded first. Of course, the browser plug-in icon priority may also be set by the browser according to information such as the function of the plug-in, the number of times the plug-in is downloaded, and the like.

计算排序前N位的浏览器插件图标的聚合长度,使得计算的聚合长度不大于所述获取的插件容器长度,并将所述排序前N位的浏览器插件图标作为所述符合预先设置的加载策略的浏览器插件图标,其中,N为自然数。Calculate the aggregate length of the top N browser plug-in icons in the sorting, so that the calculated aggregate length is not greater than the obtained plug-in container length, and use the top N browser plug-in icons in the sorting as the load conforming to the preset The browser plug-in icon for the policy, where N is a natural number.

当然,实际应用中,作为另一可选实施例,选取符合预先设置的加载策略的浏览器插件图标包括:Of course, in practical applications, as another optional embodiment, selecting a browser plug-in icon that conforms to a preset loading policy includes:

按照浏览器插件图标的加载计数值,对待加载浏览器插件图标集中的浏览器插件图标进行排序;Sort the browser plug-in icons in the browser plug-in icon set to be loaded according to the loading count value of the browser plug-in icon;

本步骤中,在每次启动浏览器后,对加载的浏览器插件图标进行计数,根据计数值对设置为显示的浏览器图标进行排序,可以反映用户对浏览器插件的需要程度。In this step, after each startup of the browser, the loaded browser plug-in icons are counted, and the browser icons set to be displayed are sorted according to the count value, which can reflect the user's demand for browser plug-ins.

计算排序前N位的浏览器插件图标的聚合长度,使得计算的聚合长度不大于所述获取的插件容器长度,并将所述排序前N位的浏览器插件图标作为所述符合预先设置的加载策略的浏览器插件图标。Calculate the aggregate length of the top N browser plug-in icons in the sorting, so that the calculated aggregate length is not greater than the obtained plug-in container length, and use the top N browser plug-in icons in the sorting as the load conforming to the preset Policy browser plugin icon.

较佳地,在显示的浏览器插件图标中,用户可以根据实际需要,对显示的浏览器插件图标执行隐藏处理。因而,作为可选实施例,该方法进一步包括:Preferably, among the displayed browser plug-in icons, the user can perform hiding processing on the displayed browser plug-in icons according to actual needs. Thus, as an optional embodiment, the method further includes:

步骤103,接收所述插件容器中浏览器插件图标输出的隐藏指令,隐藏输出隐藏指令的浏览器插件图标,并调整所述插件容器中的浏览器插件图标位置。Step 103: Receive the hiding instruction output by the browser plug-in icon in the plug-in container, hide the browser plug-in icon outputting the hidden instruction, and adjust the position of the browser plug-in icon in the plug-in container.

本步骤中,用户如果需要隐藏浏览器地址栏中的一个或多个浏览器插件图标,则可以在选取需要隐藏的浏览器插件图标后,触发弹出下拉菜单,或者,通过点击右键弹出下拉菜单,并从弹出的下拉菜单中选取隐藏,则可以将该浏览器插件图标从当前位置隐藏。In this step, if the user needs to hide one or more browser plug-in icons in the browser address bar, after selecting the browser plug-in icon to be hidden, a pop-up drop-down menu can be triggered, or a drop-down menu can be popped up by right-clicking, And select Hide from the pop-up drop-down menu, you can hide the browser plug-in icon from the current location.

具体来说,用户在显示的插件容器菜单栏下的扩展子菜单上点击右键,可以选择隐藏控件(按钮),从而触发将该动态添加的子元素,即待隐藏的浏览器插件图标BrowserActionView类的属性从可见(visible)变更为false,然后,通知插件类的父View,即浏览器地址栏进行浏览器插件图标的重新布局。也就是说,接收所述插件容器中浏览器插件图标输出的隐藏指令,隐藏输出隐藏指令的浏览器插件图标包括:Specifically, the user right-clicks on the extension submenu under the menu bar of the displayed plugin container, and can choose to hide the control (button), thereby triggering the dynamically added sub-element, that is, the browser plugin icon to be hidden BrowserActionView class The property is changed from visible to false, and then the parent View of the plug-in class, that is, the browser address bar, is notified to re-layout the browser plug-in icon. That is to say, receiving the hidden instruction output by the browser plug-in icon in the plug-in container, the hidden browser plug-in icon outputting the hidden instruction includes:

监测到用户点击隐藏按钮,浏览器由JS向HANDLER发送extensionSettingsEnable消息传递List参数;It is detected that the user clicks the hide button, and the browser sends the extensionSettingsEnable message to the HANDLER from JS to pass the List parameter;

本步骤中,List参数是ListValue*args,是一个字符串列表,包含两项内容,第一项内容是浏览器插件图标的ID,第二项内容是该ID对应的状态,状态以字符串进行表示,其中,字符串为"true",表示启用浏览器插件,即决定启用(EnableExtension),字符串为"false",表示为禁用或隐藏浏览器插件,即决定禁用或隐藏(DisableExtension)。In this step, the List parameter is ListValue*args, which is a list of strings, including two items, the first item is the ID of the browser plug-in icon, the second item is the state corresponding to the ID, and the state is represented by a string. Represents, among them, the string is "true", which means that the browser plug-in is enabled, that is, it is decided to enable (EnableExtension), and the string is "false", which means that the browser plug-in is disabled or hidden, that is, it is decided to disable or hide (DisableExtension).

本发明实施例中,List参数中的字符串为"false"。In this embodiment of the present invention, the string in the List parameter is "false".

浏览器中的ExtensionSerivce类接收List参数,发出通知给插件容器(BrowserActionsContainer),通知中包含接收的List参数;The ExtensionSerivce class in the browser receives the List parameter and sends a notification to the plug-in container (BrowserActionsContainer), and the notification contains the received List parameter;

插件容器的BrowserActionRemoved函数或BrowserActionAdded函数根据接收的List参数中的"false"字符串隐藏对应的浏览器插件图标。The BrowserActionRemoved function or BrowserActionAdded function of the plug-in container hides the corresponding browser plug-in icon according to the "false" string in the received List parameter.

本步骤中,BrowserActionRemoved函数或BrowserActionAdded函数用于动态地对选定的浏览器插件进行添加或隐藏(启用或禁用)操作。最后调用地址栏的重新布局,以重新排布地址栏及其子元素(插件容器、浏览器内置功能)的相对位置。In this step, the BrowserActionRemoved function or the BrowserActionAdded function is used to dynamically add or hide (enable or disable) the selected browser plug-in. Finally call the address bar's re-layout to rearrange the relative position of the address bar and its child elements (plug-in containers, browser built-in functions).

作为可选实施例,调整所述插件容器中的浏览器插件图标位置包括:As an optional embodiment, adjusting the position of the browser plug-in icon in the plug-in container includes:

将位于所述隐藏的浏览器插件图标左侧的浏览器插件图标依序右移。这样,在浏览器显示界面中对应的浏览器插件图标位置为空区域后,能够实现浏览器插件图标的动态调整。具体来说,本发明实施例中,插件容器的布局遍历子元素,对于停用的,隐藏的扩展不会安排布局。例如,从当前显示的插件中隐藏一插件时,剩余插件的布局如下:Move the browser plug-in icons located to the left of the hidden browser plug-in icons to the right in sequence. In this way, after the position of the corresponding browser plug-in icon in the browser display interface is an empty area, the dynamic adjustment of the browser plug-in icon can be realized. Specifically, in the embodiment of the present invention, the layout of the plug-in container traverses the child elements, and the layout is not arranged for the disabled or hidden extension. For example, when a plugin is hidden from the currently displayed plugins, the layout of the remaining plugins is as follows:

插件容器最大可用空间=地址栏总长度-浏览器内置功能长度-std::max(地址栏的URL长度,200)。插件容器的起始点X值就是浏览器第一个内置功能X值-插件容器总长度。The maximum free space of the plug-in container = the total length of the address bar - the length of the browser's built-in function - std::max (the URL length of the address bar, 200). The X value of the starting point of the plug-in container is the X value of the first built-in function of the browser - the total length of the plug-in container.

作为另一可选实施例,在隐藏浏览器插件图标并将位于所述隐藏的浏览器插件图标左侧的浏览器插件图标依序右移后,该方法可以进一步包括:As another optional embodiment, after hiding the browser plug-in icon and moving the browser plug-in icon on the left side of the hidden browser plug-in icon to the right in sequence, the method may further include:

读取浏览器插件图标集中排序在所述隐藏的浏览器插件图标后的浏览器插件图标,加载到插件容器中最左侧的位置。The browser plug-in icons that are centrally sorted after the hidden browser plug-in icons are read, and loaded into the leftmost position in the plug-in container.

本发明实施例中,作为可选实施例,为了便于用户对浏览器插件图标进行统一管理和设置,每一浏览器插件图标具有相同的尺寸。当然,实际应用中,也可以设置不同的浏览器插件图标具有不同的尺寸。In this embodiment of the present invention, as an optional embodiment, in order to facilitate the user to uniformly manage and set browser plug-in icons, each browser plug-in icon has the same size. Of course, in practical applications, different browser plug-in icons may also be set to have different sizes.

进一步地,对于浏览器插件包含有更新信息的情形,本发明实施例中,还可以在浏览器地址栏中显示该浏览器插件的更新信息,以满足用户个性化的业务需求和体验。例如,对于广告拦截插件,由于其在启动后,其拦截的广告随着时间而增加,因而,可以在显示的该广告拦截插件图标上,动态显示该广告拦截插件拦截到的广告数。该方法进一步包括:Further, in the case where the browser plug-in contains update information, in this embodiment of the present invention, the update information of the browser plug-in may also be displayed in the browser address bar to meet the user's personalized business needs and experience. For example, for an ad blocking plug-in, since the ads blocked by the ad blocking plug-in increase with time after it is activated, the number of advertisements blocked by the ad blocking plug-in may be dynamically displayed on the displayed icon of the ad blocking plug-in. The method further includes:

浏览器获取显示的浏览器插件图标对应的浏览器插件的动态更新信息,并将获取的动态更新信息加载到相应的浏览器插件图标上。The browser acquires the dynamic update information of the browser plug-in corresponding to the displayed browser plug-in icon, and loads the acquired dynamic update information on the corresponding browser plug-in icon.

本步骤中,以广告拦截插件为例,动态更新信息可以是该广告拦截插件拦截到的广告数,也可以是该广告拦截插件的版本升级信息等。In this step, taking the ad blocking plug-in as an example, the dynamic update information can be the number of advertisements blocked by the ad blocking plug-in, or the version upgrade information of the ad blocking plug-in.

作为另一可选实施例,该方法还可以进一步包括:As another optional embodiment, the method may further include:

读取浏览器地址栏插件容器中显示的浏览器插件图标对应的更新信息;Read the update information corresponding to the browser plug-in icon displayed in the plug-in container of the browser address bar;

根据读取的更新信息更新管理页面待加载浏览器插件图标集中对应的浏览器插件图标。The browser plug-in icon corresponding to the browser plug-in icon set to be loaded on the management page is updated according to the read update information.

本步骤中,管理页面通过待加载浏览器插件图标集,对所有网页页面对应的浏览器插件图标进行统一管理,例如,在待加载浏览器插件图标集中,将浏览器地址栏插件容器中显示的浏览器插件图标设置为显示,而将其它浏览器插件图标设置为隐藏,并对浏览器插件图标中的数字进行实时更新。这样,用户通过管理页面,可以选择需要显示的浏览器插件图标以满足用户个性化的业务需求。实际应用中,也可以从浏览器侧保存的配置文件获取扩展插件的信息,并实时或定时更新对应的扩展插件的信息。In this step, the management page uniformly manages the browser plug-in icons corresponding to all web pages through the browser plug-in icon set to be loaded. For example, in the browser plug-in icon set to be loaded, the browser plug-in container displayed in the browser address bar The browser plug-in icons are set to be displayed, and other browser plug-in icons are set to be hidden, and the numbers in the browser plug-in icons are updated in real time. In this way, through the management page, the user can select the icon of the browser plug-in that needs to be displayed to meet the user's personalized business needs. In practical applications, the information of the extension plug-in may also be obtained from the configuration file saved on the browser side, and the information of the corresponding extension plug-in may be updated in real time or regularly.

作为可选实施例,浏览器插件图标还包含有浏览器插件名称。As an optional embodiment, the browser plug-in icon further includes a browser plug-in name.

作为可选实施例,浏览器通过创建Chrome内置域名(chrome://myextensions/)来生成(WEB)管理页面。As an optional embodiment, the browser generates a (WEB) management page by creating a Chrome built-in domain name (chrome://myextensions/).

图3为本发明实施例浏览器显示界面的第二结构示意图。参见图3,该浏览器显示界面为优酷(www.youku.com)网页页面,其中,在优酷网页页面对应的(浏览器)地址栏中,显示有星图标、雷电图标、二维码图标、内置广告过滤数字图标以及插件应用程序(App)数字图标,其中,FIG. 3 is a schematic diagram of a second structure of a browser display interface according to an embodiment of the present invention. Referring to Figure 3, the browser display interface is a Youku ( www.youku.com) web page, wherein, in the (browser) address bar corresponding to the Youku web page, there are displayed a star icon, a lightning icon, a two-dimensional code icon, Built-in advertisement filtering digital icons and plug-in application (App) digital icons, among which,

星图标、雷电图标、二维码图标、内置广告过滤数字图标为浏览器内置功能中的图标,插件应用程序图标为插件容器中的图标。也就是说,以浏览器地址栏窗口作为父窗口,将星图标、雷电图标、二维码图标、内置广告过滤数字图标以及插件应用程序数字图标对应的窗口作为子窗口,绘制在作为父窗口的浏览器地址栏中。星图标为收藏夹图标,雷电图标为模式切换按钮图标,二维码图标为移动设备二维码地址识别图标,内置广告过滤数字图标为浏览器内置广告过滤,数字2表示浏览器内置的程序过滤的广告数为2,插件应用程序图标可以设置为红底APP,以与浏览器内置功能相区别,数字10表示过滤的广告数为10。其中,内置广告过滤数字图标以及插件应用程序图标中的数字可根据过滤的广告数进行实时更新。The star icon, thunderbolt icon, QR code icon, and built-in advertisement filtering digital icon are the icons in the built-in function of the browser, and the plug-in application icon is the icon in the plug-in container. That is to say, the browser address bar window is used as the parent window, and the window corresponding to the star icon, thunderbolt icon, QR code icon, built-in advertisement filtering digital icon, and plug-in application digital icon is used as the child window, and is drawn on the parent window. browser address bar. The star icon is the favorite icon, the thunderbolt icon is the mode switch button icon, the QR code icon is the mobile device QR code address recognition icon, the built-in advertisement filter number icon is the browser's built-in advertisement filter, and the number 2 represents the browser's built-in program filter The number of advertisements is 2, the plug-in application icon can be set as a red background APP to distinguish it from the built-in function of the browser, and the number 10 means that the number of filtered advertisements is 10. Among them, the numbers in the built-in advertisement filtering digital icon and the plug-in application icon can be updated in real time according to the number of filtered advertisements.

图4为本发明实施例选取插件应用程序图标并点击右键后弹出的操作功能菜单示意图。参见图4,插件应用程序图标对应的广告过滤插件设置的右键操作功能菜单包括:Adblock Plus控件、选项控件、停用控件、删除控件、隐藏按钮控件、管理控件以及审查弹出内容控件。例如,用户点击停用控件,可以中止该广告过滤插件的运行以节约内存资源,再例如,用户点击隐藏按钮控件,则可以将该当前显示的广告过滤插件进行隐藏处理,并触发动态调整插件容器中当前显示的浏览器插件图标。FIG. 4 is a schematic diagram of an operation function menu that pops up after selecting a plug-in application icon and clicking the right button according to an embodiment of the present invention. Referring to FIG. 4 , the right-click operation function menu of the ad filtering plug-in setting corresponding to the plug-in application icon includes: Adblock Plus control, option control, deactivation control, delete control, hide button control, management control and review pop-up content control. For example, if the user clicks the disable control, the operation of the ad filtering plug-in can be stopped to save memory resources. For another example, if the user clicks the hide button control, the currently displayed ad filtering plug-in can be hidden and trigger the dynamic adjustment of the plug-in container. The browser plug-in icon currently displayed in .

本发明实施例中,由于不同的网页页面映射的插件容器长度不同,因而,在进行网页页面切换时,可以动态调整浏览器显示界面的浏览器地址栏中显示的浏览器插件图标,该方法进一步包括:In the embodiment of the present invention, since the lengths of the plug-in containers mapped to different webpage pages are different, when switching between webpage pages, the browser plug-in icon displayed in the browser address bar of the browser display interface can be dynamically adjusted. The method further include:

步骤104,监测到网页页面切换,根据切换的网页页面映射的插件容器长度,在所述切换的网页页面对应的插件容器中加载浏览器插件图标。Step 104 , monitoring the page switching, and loading a browser plug-in icon in the plug-in container corresponding to the switched webpage according to the length of the plug-in container mapped by the switched webpage.

本发明实施例中,需要在每一网页页面独立展现浏览器插件自身数据状态,例如,浏览器插件的特殊ICON(如天气预报的天气),相关文字或者数据(如广告拦截的数目)。In this embodiment of the present invention, each web page needs to independently display the data status of the browser plug-in, for example, a special ICON of the browser plug-in (such as weather forecast), related text or data (such as the number of ad blocks).

作为可选实施例,该步骤具体包括:As an optional embodiment, this step specifically includes:

为待加载浏览器插件图标集中的每一网页页面创建相应的数据结构,并在创建的数据结构中,存储浏览器插件更新信息;Create a corresponding data structure for each web page in the icon set of the browser plug-in to be loaded, and store the browser plug-in update information in the created data structure;

本步骤中,在相应网页页面即WebContents创建对应的数据结构。作为可选实施例,在网页页面打开时,同时创建对应网页页面的数据结构。创建数据结构可以通过创建网页页面的类对应的数据结构语句,例如,为实现功能编写的C++类代码,并继承content::WebContentsUserData模板类即可实现。最后,将创建的数据结构语句(如AdfilterTabHelper::CreateForWebContents(web_contents);)添加到BrowserTabContents::AttachTabHelpers浏览器页面初始化静态过程中。这样,每创建一个浏览器页面,插件管理类(如AdfilterTabHelper)即自动创建。In this step, a corresponding data structure is created on the corresponding web page, that is, WebContents. As an optional embodiment, when the web page is opened, a data structure corresponding to the web page is created at the same time. Creating a data structure can be achieved by creating a data structure statement corresponding to the class of the web page, for example, a C++ class code written to implement the function and inheriting the content::WebContentsUserData template class. Finally, add the created data structure statement (such as AdfilterTabHelper::CreateForWebContents(web_contents);) to the BrowserTabContents::AttachTabHelpers browser page initialization static process. In this way, each time a browser page is created, a plug-in management class (such as AdfilterTabHelper) is automatically created.

作为可选实施例,在与Tab相关的类中,保存浏览器插件自身数据状态,即更新信息。As an optional embodiment, in the class related to Tab, the data state of the browser plug-in itself, that is, the update information, is saved.

浏览器监测到调用系统TabStripModel::ActivateTabAt函数,向浏览器地址栏发出ActiveTabChanged的消息通知;The browser detects that the system TabStripModel::ActivateTabAt function is called, and sends a message notification of ActiveTabChanged to the browser address bar;

本步骤中,浏览器标签(网页页面)切换时,会发生调用系统TabStripModel::ActivateTabAt函数,接而发出ActiveTabChanged的消息通知。In this step, when the browser tab (web page) is switched, the system TabStripModel::ActivateTabAt function will be called, and then a message notification of ActiveTabChanged will be sent out.

浏览器地址栏接收ActiveTabChanged的消息通知,调用插件容器的Update函数,遍历待加载浏览器插件图标集中的每一网页页面对应的数据结构;The browser address bar receives the ActiveTabChanged message notification, calls the Update function of the plug-in container, and traverses the data structure corresponding to each web page in the icon set of the browser plug-in to be loaded;

本步骤中,由于插件容器属于浏览器地址栏view的子元素,因此,浏览器地址栏收到ActiveTabChanged的消息通知后,调用插件容器的Update函数,遍历各个子元素进行更新,即可完成随标签切换,实现浏览器插件图标更新。In this step, since the plug-in container is a child element of the browser address bar view, after the browser address bar receives the ActiveTabChanged message notification, it calls the Update function of the plug-in container, traverses each sub-element to update, and completes the follow-up tag Toggle to update the browser plug-in icon.

获取切换的网页页面对应的数据结构,读取存储的浏览器插件更新信息,根据读取的所述浏览器插件更新信息,生成浏览器插件图标并加载至插件容器中。The data structure corresponding to the switched web page is acquired, the stored browser plug-in update information is read, and a browser plug-in icon is generated and loaded into the plug-in container according to the read browser plug-in update information.

本步骤中,获取个性化浏览器插件图标相关数据。即在获取了需要更新的通知(Update函数的调用)后,可以通过当前页面(切换的网页页面)提取到对应的数据结构(如AdfilterTabHelper类)。相关代码为:In this step, data related to the icon of the personalized browser plug-in is obtained. That is, after obtaining the notification that needs to be updated (the call of the Update function), the corresponding data structure (such as the AdfilterTabHelper class) can be extracted through the current page (switched web page). The relevant code is:

AdfilterTabHelper*ad_filter=AdfilterTabHelper::FromWebContents(web_contents);AdfilterTabHelper*ad_filter=AdfilterTabHelper::FromWebContents(web_contents);

通过提取到的页面对应的数据结构,即可取出相关数据(浏览器插件更新信息)。例如,如果浏览器插件更新信息为N条拦截信息,则可以在内存中生成的浏览器插件图标中,显示数字N。Through the data structure corresponding to the extracted page, the relevant data (the browser plug-in update information) can be extracted. For example, if the browser plug-in update information is N pieces of interception information, the number N may be displayed in the browser plug-in icon generated in the memory.

从页面对应数据结构中取出相关数据的具体流程如下:由于数据保存在与TAB相关类中,该相关类为AdfilterTabHelper,通过获取该相关类的指针,即通过AdfilterTabHelper*ad_filter=AdfilterTabHelper::FromWebContents(web_contents)获取类指针,利用类指针访问类成员,从而获取相关的数据。The specific process of extracting the relevant data from the corresponding data structure of the page is as follows: Since the data is stored in the TAB-related class, the related class is AdfilterTabHelper, by obtaining the pointer of the related class, that is, through AdfilterTabHelper*ad_filter=AdfilterTabHelper::FromWebContents(web_contents ) to obtain the class pointer, and use the class pointer to access class members to obtain related data.

作为可选实施例,生成浏览器插件图标包括:As an optional embodiment, generating a browser plug-in icon includes:

创建与背景图大小相同的空白图(gfx::Canvas),并将背景图画在创建的空白图Canvas上;Create a blank image (gfx::Canvas) with the same size as the background image, and place the background image on the created blank image Canvas;

将数字背景(按要显示数字的位数大小来取绘制红色背景的宽度)绘制在空白图Canvas的右下角上,以实现叠加覆盖;Draw the digital background (the width of the red background drawn according to the number of digits to be displayed) on the lower right corner of the blank canvas Canvas to achieve overlay coverage;

利用数字背景的位置来计算数字开始绘制的XY坐标值,将数字图片继续叠加到空白图Canvas上。Use the position of the digital background to calculate the XY coordinate value of the digital drawing, and continue to superimpose the digital image on the blank canvas Canvas.

这样,经过上述三部流程,可以得到经过上述三层绘制后得到的最终用于显示的浏览器插件图标ICON。将该ICON重新设置为插件按钮的ICON图片,从而完成整个的实时更新操作。由于这一切操作都在内存的Canvas上操作,因此处理速度方面非常快,用户不会感觉出有任何卡顿。In this way, through the above three processes, the browser plug-in icon ICON finally used for display obtained after the above three layers of drawing can be obtained. Reset the ICON to the icon picture of the plugin button, thus completing the entire real-time update operation. Since all these operations are performed on the Canvas in memory, the processing speed is very fast, and users will not feel any lag.

作为可选实施例,用户通过浏览器安装浏览器插件后,可以在浏览器地址栏中实时显示安装完成的浏览器插件图标。该方法进一步包括:As an optional embodiment, after the user installs the browser plug-in through the browser, the icon of the installed browser plug-in may be displayed in real time in the address bar of the browser. The method further includes:

在监听到浏览器插件安装完成后,获取浏览器插件图标,并将获取的浏览器插件图标置于所述插件容器中。After monitoring that the installation of the browser plug-in is completed, the icon of the browser plug-in is obtained, and the obtained icon of the browser plug-in is placed in the plug-in container.

本步骤中,将获取的浏览器插件图标置于所述插件容器中包括:In this step, placing the obtained browser plug-in icon in the plug-in container includes:

判断浏览器地址栏中的插件容器内的可用长度是否能够匹配所述浏览器插件图标,如果是,将所述浏览器插件图标置于所述插件容器中,否则,删除所述插件容器中的浏览器插件图标,以使所述插件容器内的可用长度能够匹配所述获取的浏览器插件图标,并将所述获取的浏览器插件图标置于所述插件容器中。Determine whether the available length in the plug-in container in the browser address bar can match the browser plug-in icon, if so, place the browser plug-in icon in the plug-in container, otherwise, delete the plug-in container. A browser plug-in icon, so that the available length in the plug-in container can match the obtained browser plug-in icon, and the obtained browser plug-in icon is placed in the plug-in container.

具体来说,BrowserActionsContainer通过监听用于加载浏览器插件的扩展模块的事件消息,例如,安装事件消息(BrowserActionAdded)或卸载事件消息(BrowserActionRemoved),从而动态添加、删除浏览器地址栏中的子元素(BrowserActionView),即浏览器插件图标。Specifically, BrowserActionsContainer dynamically adds and deletes child elements in the browser address bar by listening to the event messages of the extension modules used to load browser plug-ins, such as installation event messages (BrowserActionAdded) or uninstallation event messages (BrowserActionRemoved). BrowserActionView), the browser plug-in icon.

由上述可见,本发明实施例加载浏览器插件图标的方法,通过对浏览器插件(扩展程序)进行统一管理(显示、隐藏、禁用、卸载),提供了便利的维护管理,减少了用户操作浏览器插件的时间成本;同时,有效地利用了浏览器地址栏的剩余空间布局,不会创建多余的一片区域来挤压工具栏空间,使得浏览器页面中的内容可显示的高度增加,从而提升浏览器页面中内容的显示效果,从视觉角度上来看更加合理,更加简约;进一步地,可通过右击对应浏览器插件图标选择隐藏来简化工具栏的界面,并通过配合统一管理页面快捷维护浏览器插件图标的显示、启用状态,从而实现浏览器插件图标的动态调整;而且,浏览器插件可针对每个TAB页面(网页页面)维护对应的一套数据结构,以使得切换TAB标签可保存本页面相关插件的数据状态,使得浏览器插件的状态可随当前显示页面的不同,而显示不同的状态,页面切换时自动变化,能够实时反映浏览器插件的更新信息,满足了用户的个性化需求,提升了用户的业务体验,尤其可用于广告拦截数目显示。It can be seen from the above that the method for loading a browser plug-in icon in the embodiment of the present invention provides convenient maintenance and management by uniformly managing (displaying, hiding, disabling, and uninstalling) browser plug-ins (extension programs) and reduces user operation and browsing. At the same time, the layout of the remaining space of the browser address bar is effectively used, and an extra area is not created to squeeze the toolbar space, so that the content in the browser page can be displayed at a higher height, thereby improving the The display effect of the content in the browser page is more reasonable and simple from the visual point of view; further, the interface of the toolbar can be simplified by right-clicking the corresponding browser plug-in icon and selecting to hide, and by cooperating with the unified management page to quickly maintain the browsing The browser plug-in icon can be displayed and enabled, so as to realize the dynamic adjustment of the browser plug-in icon; moreover, the browser plug-in can maintain a corresponding set of data structures for each TAB page (web page), so that switching TAB tags can save this The data status of page-related plug-ins enables the status of browser plug-ins to display different states depending on the currently displayed page, and changes automatically when pages are switched, which can reflect the update information of browser plug-ins in real time and meet the personalized needs of users. , which improves the user's business experience, especially for display of ad blocking numbers.

图5为本发明实施例浏览器结构示意图。参见图5,该浏览器包括:映射关系集构建模块以及浏览器插件图标加载模块,其中,FIG. 5 is a schematic structural diagram of a browser according to an embodiment of the present invention. Referring to FIG. 5, the browser includes: a mapping relationship set building module and a browser plug-in icon loading module, wherein,

映射关系集构建模块,用于在各网页页面对应的浏览器地址栏中的可用空间内设置用于显示浏览器插件图标的插件容器,构建网页页面与插件容器长度的映射关系集;The mapping relationship set building module is used to set a plug-in container for displaying the browser plug-in icon in the available space in the browser address bar corresponding to each web page, and construct a mapping relationship set between the web page and the length of the plug-in container;

本发明实施例中,映射关系集构建模块包括:插件容器设置单元、长度获取单元以及映射关系集构建单元(图中未示出),其中,In this embodiment of the present invention, the mapping relationship set building module includes: a plug-in container setting unit, a length obtaining unit, and a mapping relationship set building unit (not shown in the figure), wherein,

插件容器设置单元,用于在各网页页面对应的浏览器地址栏中的可用空间内设置用于显示浏览器插件图标的插件容器;A plug-in container setting unit, configured to set a plug-in container for displaying browser plug-in icons in the available space in the browser address bar corresponding to each web page;

长度获取单元,用于获取网页页面对应的网址信息占用的字符长度;The length obtaining unit is used to obtain the character length occupied by the URL information corresponding to the webpage;

映射关系集构建单元,用于根据浏览器地址栏的字符长度以及所述网页页面对应的网址信息占用的字符长度,计算所述网页页面对应的插件容器的字符长度,并构建对应的映射关系,依据多个映射关系生成映射关系集。a mapping relationship set construction unit, configured to calculate the character length of the plug-in container corresponding to the webpage page according to the character length of the browser address bar and the character length occupied by the website information corresponding to the webpage page, and construct a corresponding mapping relationship, Generate a mapping relationship set according to multiple mapping relationships.

作为可选实施例,映射关系集构建模块进一步包括:As an optional embodiment, the mapping relationship set building module further includes:

内置单元,用于在浏览器地址栏中的可用空间内设置用于显示浏览器内置功能程序图标的浏览器内置功能容器。The built-in unit is used to set a browser built-in function container for displaying the browser built-in function program icon in the available space in the browser address bar.

浏览器插件图标加载模块,用于在监测到浏览器加载网页页面后,查询预先存储的网页页面与插件容器长度的映射关系集,获取加载的网页页面映射的插件容器长度,按照获取的插件容器长度在所述插件容器中加载浏览器插件图标。The browser plug-in icon loading module is used to query the pre-stored set of mapping relationships between the web page and the length of the plug-in container after monitoring that the browser loads the web page, and obtain the length of the plug-in container mapped by the loaded web page. Length loads the browser plugin icon in the plugin container.

本发明实施例中,浏览器插件图标加载模块包括:查询单元、计算单元以及加载处理单元(图中未示出),其中,In this embodiment of the present invention, the browser plug-in icon loading module includes: a query unit, a calculation unit, and a loading processing unit (not shown in the figure), wherein,

查询单元,用于在监测到浏览器加载网页页面后,查询预先存储的网页页面与插件容器长度的映射关系集,获取加载的网页页面映射的插件容器长度;a query unit, configured to query a pre-stored set of mapping relationships between the web page and the length of the plug-in container after monitoring that the browser loads the web page, and obtain the length of the plug-in container mapped by the loaded web page;

计算单元,用于计算待加载浏览器插件图标集中所有浏览器插件图标的总长度;a calculation unit, used to calculate the total length of all browser plug-in icons in the set of browser plug-in icons to be loaded;

加载处理单元,用于判断计算的总长度是否大于所述获取的插件容器长度,如果是,从所述待加载浏览器插件图标集中,选取符合预先设置的加载策略的浏览器插件图标,并加载到所述插件容器中;否则,将所述待加载浏览器插件图标集中的所有浏览器插件图标加载到所述插件容器中。A loading processing unit, configured to determine whether the calculated total length is greater than the obtained plug-in container length, and if so, select a browser plug-in icon that conforms to a preset loading policy from the set of browser plug-in icons to be loaded, and load into the plug-in container; otherwise, load all browser plug-in icons in the set of browser plug-in icons to be loaded into the plug-in container.

本发明实施例中,作为可选实施例,选取符合预先设置的加载策略的浏览器插件图标包括:In this embodiment of the present invention, as an optional embodiment, selecting a browser plug-in icon that conforms to a preset loading policy includes:

按照浏览器插件图标的优先级,对待加载浏览器插件图标集中设置为显示的浏览器插件图标进行排序;According to the priority of browser plug-in icons, sort the browser plug-in icons set to be displayed in the browser plug-in icon set to be loaded;

计算排序前N位的浏览器插件图标的聚合长度,使得计算的聚合长度不大于所述获取的插件容器长度,并将所述排序前N位的浏览器插件图标作为所述符合预先设置的加载策略的浏览器插件图标。Calculate the aggregate length of the top N browser plug-in icons in the sorting, so that the calculated aggregate length is not greater than the obtained plug-in container length, and use the top N browser plug-in icons in the sorting as the load conforming to the preset Policy browser plugin icon.

作为另一可选实施例,选取符合预先设置的加载策略的浏览器插件图标包括:As another optional embodiment, selecting a browser plug-in icon that conforms to a preset loading policy includes:

按照浏览器插件图标的加载计数值,对待加载浏览器插件图标集中的浏览器插件图标进行排序;Sort the browser plug-in icons in the browser plug-in icon set to be loaded according to the loading count value of the browser plug-in icon;

计算排序前N位的浏览器插件图标的聚合长度,使得计算的聚合长度不大于所述获取的插件容器长度,并将所述排序前N位的浏览器插件图标作为所述符合预先设置的加载策略的浏览器插件图标。Calculate the aggregate length of the top N browser plug-in icons in the sorting, so that the calculated aggregate length is not greater than the obtained plug-in container length, and use the top N browser plug-in icons in the sorting as the load conforming to the preset Policy browser plugin icon.

作为可选实施例,该浏览器进一步包括:As an optional embodiment, the browser further includes:

浏览器插件图标隐藏处理模块,用于接收插件容器中浏览器插件图标输出的隐藏指令,隐藏输出隐藏指令的浏览器插件图标,并调整所述插件容器中的浏览器插件图标位置。The browser plug-in icon hiding processing module is used for receiving the hiding instruction output by the browser plug-in icon in the plug-in container, hiding the browser plug-in icon outputting the hiding instruction, and adjusting the position of the browser plug-in icon in the plug-in container.

本发明实施例中,浏览器插件图标隐藏处理模块包括:监测单元、通知单元、隐藏单元以及调整单元(图中未示出),其中,In the embodiment of the present invention, the browser plug-in icon hiding processing module includes: a monitoring unit, a notification unit, a hiding unit, and an adjustment unit (not shown in the figure), wherein,

监测单元,用于在监测到用户点击隐藏按钮后,浏览器由JS向HANDLER发送extensionSettingsEnable消息传递List参数;The monitoring unit is used to send the extensionSettingsEnable message from JS to the HANDLER to pass the List parameter after monitoring that the user clicks the hidden button;

通知单元,用于接收List参数,发出通知给插件容器(BrowserActionsContainer),通知中包含接收的List参数;The notification unit is used to receive the List parameter and send a notification to the plug-in container (BrowserActionsContainer), and the notification contains the received List parameter;

隐藏单元,用于根据接收的List参数中的"false"字符串隐藏对应的浏览器插件图标;The hiding unit is used to hide the corresponding browser plug-in icon according to the "false" string in the received List parameter;

调整单元,用于将位于所述隐藏的浏览器插件图标左侧的浏览器插件图标依序右移。An adjustment unit, configured to sequentially move the browser plug-in icons on the left side of the hidden browser plug-in icons to the right.

作为可选实施例,浏览器插件图标隐藏处理模块进一步包括:As an optional embodiment, the browser plug-in icon hiding processing module further includes:

再加载单元,用于读取浏览器插件图标集中排序在所述隐藏的浏览器插件图标后的浏览器插件图标,加载到插件容器中最左侧的位置。The reloading unit is configured to read the browser plug-in icons sorted after the hidden browser plug-in icons in a centralized manner, and load them into the leftmost position in the plug-in container.

作为另一可选实施例,该浏览器进一步包括:As another optional embodiment, the browser further includes:

页面切换处理模块,用于在监测到网页页面切换后,根据切换的网页页面映射的插件容器长度,在所述切换的网页页面对应的插件容器中加载浏览器插件图标。The page switching processing module is configured to load a browser plug-in icon in the plug-in container corresponding to the switched webpage according to the length of the plug-in container mapped by the switched webpage after monitoring the webpage switching.

本发明实施例中,页面切换处理模块包括:创建单元、监测单元、遍历单元以及页面切换处理单元(图中未示出),其中,In this embodiment of the present invention, the page switching processing module includes: a creation unit, a monitoring unit, a traversal unit, and a page switching processing unit (not shown in the figure), wherein,

创建单元,用于为待加载浏览器插件图标集中的每一网页页面创建相应的数据结构,并在创建的数据结构中,存储插件长度信息以及浏览器插件更新信息;The creation unit is used to create a corresponding data structure for each web page in the icon set of the browser plug-in to be loaded, and store the plug-in length information and the browser plug-in update information in the created data structure;

监测单元,用于在监测到调用系统TabStripModel::ActivateTabAt函数后,向浏览器地址栏发出ActiveTabChanged的消息通知;The monitoring unit is used to send a message notification of ActiveTabChanged to the browser address bar after monitoring the calling system TabStripModel::ActivateTabAt function;

遍历单元,用于接收ActiveTabChanged的消息通知,调用插件容器的Update函数,遍历待加载浏览器插件图标集中的每一网页页面对应的数据结构;The traversal unit is used to receive the message notification of ActiveTabChanged, call the Update function of the plug-in container, and traverse the data structure corresponding to each web page in the icon set of the browser plug-in to be loaded;

页面切换处理单元,用于获取切换的网页页面对应的数据结构,读取存储的浏览器插件更新信息,根据读取的所述浏览器插件更新信息以及插件长度信息,生成浏览器插件图标并加载至插件容器中。The page switching processing unit is used to obtain the data structure corresponding to the switched webpage, read the stored browser plug-in update information, and generate and load the browser plug-in icon according to the read browser plug-in update information and plug-in length information. into the plugin container.

本发明实施例中,从页面对应数据结构中取出相关数据的具体流程如下:由于数据保存在与TAB相关类中,该相关类为AdfilterTabHelper,通过获取该相关类的指针,即通过AdfilterTabHelper*ad_filter=AdfilterTabHelper::FromWebContents(web_contents)获取类指针,利用类指针访问类成员,从而获取相关的数据。In the embodiment of the present invention, the specific process of retrieving the relevant data from the data structure corresponding to the page is as follows: since the data is stored in the TAB-related class, and the relevant class is AdfilterTabHelper, by obtaining the pointer of the relevant class, that is, through AdfilterTabHelper*ad_filter= AdfilterTabHelper::FromWebContents(web_contents) gets the class pointer, and uses the class pointer to access the class members to obtain the relevant data.

作为可选实施例,该浏览器还可以进一步包括:As an optional embodiment, the browser may further include:

管理页面模块,用于读取浏览器地址栏插件容器中显示的浏览器插件图标对应的更新信息;根据读取的更新信息更新管理页面待加载浏览器插件图标集中对应的浏览器插件图标。The management page module is used to read the update information corresponding to the browser plug-in icon displayed in the plug-in container of the browser address bar; update the browser plug-in icon corresponding to the browser plug-in icon set to be loaded on the management page according to the read update information.

在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used with teaching based on this. The structure required to construct such a system is apparent from the above description. Furthermore, the present invention is not directed to any particular programming language. It is to be understood that various programming languages may be used to implement the inventions described herein, and that the descriptions of specific languages above are intended to disclose the best mode for carrying out the invention.

在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. It will be understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.

类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it is to be understood that in the above description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together into a single embodiment, figure, or its description. However, this disclosure should not be construed as reflecting an intention that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.

本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art will understand that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. The modules or units or components in the embodiments may be combined into one module or unit or component, and further they may be divided into multiple sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings) and any method so disclosed may be employed in any combination, unless at least some of such features and/or procedures or elements are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.

此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, those skilled in the art will appreciate that although some of the embodiments described herein include certain features, but not others, included in other embodiments, that combinations of features of different embodiments are intended to be within the scope of the invention within and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.

本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的浏览器中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站服务器上下载得到,或者在载体信号上提供,或者以任何其他形式提供。Various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the browser according to the embodiments of the present invention. The present invention can also be implemented as apparatus or apparatus programs (eg, computer programs and computer program products) for performing part or all of the methods described herein. Such a program implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such signals may be downloaded from Internet web servers, or provided on carrier signals, or in any other form.

应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-described embodiments illustrate rather than limit the invention, and that alternative embodiments may be devised by those skilled in the art without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. do not denote any order. These words can be interpreted as names.

Claims (29)

1.一种加载浏览器插件图标的方法,包括:1. A method for loading a browser plug-in icon, comprising: 预先在各网页页面对应的浏览器地址栏中的可用空间内设置用于显示浏览器插件图标的插件容器,构建网页页面与插件容器长度的映射关系集;Pre-setting a plug-in container for displaying browser plug-in icons in the available space in the browser address bar corresponding to each web page, and constructing a mapping relationship set between the web page and the length of the plug-in container; 在监测到浏览器加载网页页面后,查询预先存储的网页页面与插件容器长度的映射关系集,获取加载的网页页面映射的插件容器长度,按照获取的插件容器长度在所述插件容器中加载浏览器插件图标。After monitoring the loading of the webpage by the browser, query the pre-stored mapping relationship set between the webpage and the length of the plug-in container, obtain the length of the plug-in container mapped by the loaded webpage, and load and browse the plug-in container according to the obtained length of the plug-in container. plug-in icon. 2.如权利要求1所述的方法,所述构建网页页面与插件容器长度的映射关系集包括:2. The method according to claim 1, wherein said constructing a set of mapping relationships between web pages and plug-in container lengths comprises: 获取网页页面对应的网址信息占用的字符长度;Get the character length occupied by the URL information corresponding to the webpage; 根据浏览器地址栏的字符长度以及所述网页页面对应的网址信息占用的字符长度,计算所述网页页面对应的插件容器的字符长度。According to the character length of the address bar of the browser and the character length occupied by the web address information corresponding to the webpage, the character length of the plug-in container corresponding to the webpage is calculated. 3.如权利要求2所述的方法,所述方法进一步包括:3. The method of claim 2, further comprising: 在浏览器地址栏中的可用空间内设置用于显示浏览器内置功能程序图标的浏览器内置功能容器。A browser built-in function container for displaying the browser built-in function program icon is set in the available space in the browser address bar. 4.如权利要求1所述的方法,所述方法进一步包括:4. The method of claim 1, further comprising: 在与浏览器地址栏同行的可用空间位置,设置工具栏按钮以及搜索栏。Set the toolbar buttons and search bar in the available space along with the browser's address bar. 5.如权利要求3所述的方法,所述按照获取的插件容器长度在所述插件容器中加载浏览器插件图标包括:5. The method of claim 3, wherein loading a browser plug-in icon in the plug-in container according to the obtained plug-in container length comprises: 计算待加载浏览器插件图标集中所有浏览器插件图标的总长度;Calculate the total length of all browser plug-in icons in the browser plug-in icon set to be loaded; 判断计算的总长度是否大于所述获取的插件容器长度,如果是,从所述待加载浏览器插件图标集中,选取符合预先设置的加载策略的浏览器插件图标,并加载到所述插件容器中;否则,将所述待加载浏览器插件图标集中的所有浏览器插件图标加载到所述插件容器中。Determine whether the calculated total length is greater than the obtained length of the plug-in container, and if so, select the browser plug-in icon that conforms to the preset loading strategy from the set of browser plug-in icons to be loaded, and load it into the plug-in container ; otherwise, load all browser plug-in icons in the to-be-loaded browser plug-in icon set into the plug-in container. 6.如权利要求5所述的方法,所述选取符合预先设置的加载策略的浏览器插件图标包括:6. The method according to claim 5, wherein said selecting a browser plug-in icon conforming to a preset loading policy comprises: 按照浏览器插件图标的优先级,对待加载浏览器插件图标集中设置为显示的浏览器插件图标进行排序;According to the priority of browser plug-in icons, sort the browser plug-in icons set to be displayed in the browser plug-in icon set to be loaded; 计算排序前N位的浏览器插件图标的聚合长度,使得计算的聚合长度不大于所述获取的插件容器长度,并将所述排序前N位的浏览器插件图标作为所述符合预先设置的加载策略的浏览器插件图标。Calculate the aggregate length of the top N browser plug-in icons in the sorting, so that the calculated aggregate length is not greater than the obtained plug-in container length, and use the top N browser plug-in icons in the sorting as the load conforming to the preset Policy browser plugin icon. 7.如权利要求5所述的方法,所述选取符合预先设置的加载策略的浏览器插件图标包括:7. The method according to claim 5, wherein said selecting a browser plug-in icon conforming to a preset loading policy comprises: 按照浏览器插件图标的加载计数值,对待加载浏览器插件图标集中的浏览器插件图标进行排序;Sort the browser plug-in icons in the browser plug-in icon set to be loaded according to the loading count value of the browser plug-in icon; 计算排序前N位的浏览器插件图标的聚合长度,使得计算的聚合长度不大于所述获取的插件容器长度,并将所述排序前N位的浏览器插件图标作为所述符合预先设置的加载策略的浏览器插件图标。Calculate the aggregate length of the top N browser plug-in icons in the sorting, so that the calculated aggregate length is not greater than the obtained plug-in container length, and use the top N browser plug-in icons in the sorting as the load conforming to the preset Policy browser plugin icon. 8.如权利要求1至7任一项所述的方法,所述方法进一步包括:8. The method of any one of claims 1 to 7, further comprising: 接收所述插件容器中浏览器插件图标输出的隐藏指令,隐藏输出隐藏指令的浏览器插件图标,并调整所述插件容器中的浏览器插件图标位置。Receive the hidden instruction output by the browser plug-in icon in the plug-in container, hide the browser plug-in icon outputting the hidden instruction, and adjust the position of the browser plug-in icon in the plug-in container. 9.如权利要求8所述的方法,所述接收所述插件容器中浏览器插件图标输出的隐藏指令,隐藏输出隐藏指令的浏览器插件图标包括:9. The method of claim 8, wherein receiving a hidden instruction output by a browser plug-in icon in the plug-in container, hiding the browser plug-in icon outputting the hidden instruction comprises: 监测到用户点击隐藏按钮,浏览器由JS向HANDLER发送extensionSettingsEnable消息传递List参数;It is detected that the user clicks the hide button, and the browser sends the extensionSettingsEnable message to the HANDLER from JS to pass the List parameter; 浏览器中的ExtensionSerivce类接收List参数,发出通知给插件容器,通知中包含接收的List参数;The ExtensionSerivce class in the browser receives the List parameter and sends a notification to the plug-in container, and the notification contains the received List parameter; 插件容器的BrowserActionRemoved函数或BrowserActionAdded函数根据接收的List参数中的"false"字符串隐藏对应的浏览器插件图标。The BrowserActionRemoved function or BrowserActionAdded function of the plug-in container hides the corresponding browser plug-in icon according to the "false" string in the received List parameter. 10.如权利要求9所述的方法,所述方法进一步包括:10. The method of claim 9, further comprising: 读取浏览器插件图标集中排序在所述隐藏的浏览器插件图标后的浏览器插件图标,加载到插件容器中最左侧的位置。The browser plug-in icons that are centrally sorted after the hidden browser plug-in icons are read, and loaded into the leftmost position in the plug-in container. 11.如权利要求8所述的方法,所述调整所述插件容器中的浏览器插件图标位置包括:11. The method of claim 8, wherein adjusting the position of a browser plug-in icon in the plug-in container comprises: 将位于所述隐藏的浏览器插件图标左侧的浏览器插件图标依序右移。Move the browser plug-in icons located to the left of the hidden browser plug-in icons to the right in sequence. 12.如权利要求1至7任一项所述的方法,所述方法进一步包括:12. The method of any one of claims 1 to 7, further comprising: 浏览器获取显示的浏览器插件图标对应的浏览器插件的动态更新信息,并将获取的动态更新信息加载到相应的浏览器插件图标上。The browser acquires the dynamic update information of the browser plug-in corresponding to the displayed browser plug-in icon, and loads the acquired dynamic update information on the corresponding browser plug-in icon. 13.如权利要求1至7任一项所述的方法,所述方法进一步包括:13. The method of any one of claims 1 to 7, further comprising: 读取浏览器地址栏插件容器中显示的浏览器插件图标对应的更新信息;Read the update information corresponding to the browser plug-in icon displayed in the plug-in container of the browser address bar; 根据读取的更新信息更新管理页面待加载浏览器插件图标集中对应的浏览器插件图标。The browser plug-in icon corresponding to the browser plug-in icon set to be loaded on the management page is updated according to the read update information. 14.如权利要求13所述的方法,所述方法进一步包括:14. The method of claim 13, further comprising: 浏览器通过创建Chrome内置域名生成所述管理页面。The browser generates the management page by creating a Chrome built-in domain name. 15.如权利要求1至7任一项所述的方法,所述方法进一步包括:15. The method of any one of claims 1 to 7, further comprising: 监测到网页页面切换,根据切换的网页页面映射的插件容器长度,在所述切换的网页页面对应的插件容器中加载浏览器插件图标。When a webpage page switch is detected, a browser plug-in icon is loaded in the plug-in container corresponding to the switched webpage page according to the length of the plug-in container mapped by the switched webpage page. 16.如权利要求15所述的方法,所述监测到网页页面切换,根据切换的网页页面映射的插件容器长度,在所述切换的网页页面对应的插件容器中加载浏览器插件图标包括:16. The method according to claim 15, wherein the monitoring of webpage page switching, according to the plug-in container length mapped by the switched webpage page, loading the browser plug-in icon in the plug-in container corresponding to the switched webpage page comprises: 为待加载浏览器插件图标集中的每一网页页面创建相应的数据结构,并在创建的数据结构中,存储浏览器插件更新信息;Create a corresponding data structure for each web page in the icon set of the browser plug-in to be loaded, and store the browser plug-in update information in the created data structure; 浏览器监测到调用系统TabStripModel::ActivateTabAt函数,向浏览器地址栏发出ActiveTabChanged的消息通知;The browser detects that the system TabStripModel::ActivateTabAt function is called, and sends a message notification of ActiveTabChanged to the browser address bar; 浏览器地址栏接收ActiveTabChanged的消息通知,调用插件容器的Update函数,遍历待加载浏览器插件图标集中的每一网页页面对应的数据结构;The browser address bar receives the ActiveTabChanged message notification, calls the Update function of the plug-in container, and traverses the data structure corresponding to each web page in the icon set of the browser plug-in to be loaded; 获取切换的网页页面对应的数据结构,读取存储的浏览器插件更新信息,根据读取的所述浏览器插件更新信息,生成浏览器插件图标并加载至插件容器中。The data structure corresponding to the switched web page is acquired, the stored browser plug-in update information is read, and a browser plug-in icon is generated and loaded into the plug-in container according to the read browser plug-in update information. 17.如权利要求16所述的方法,所述生成浏览器插件图标包括:17. The method of claim 16, the generating a browser plug-in icon comprising: 创建与背景图大小相同的空白图,并将背景图画在创建的空白图上;Create a blank image with the same size as the background image, and place the background image on the created blank image; 将数字背景绘制在空白图的右下角上,以实现叠加覆盖;Draw the digital background on the lower right corner of the blank figure for overlay overlay; 利用数字背景的位置来计算数字开始绘制的XY坐标值,将数字图片继续叠加到空白图上。Use the position of the digital background to calculate the XY coordinate value at which the number starts to be drawn, and continue to superimpose the digital picture on the blank map. 18.如权利要求1至7任一项所述的方法,所述方法进一步包括:18. The method of any one of claims 1 to 7, further comprising: 在监听到浏览器插件安装完成后,获取浏览器插件图标,并将获取的浏览器插件图标置于所述插件容器中。After monitoring that the installation of the browser plug-in is completed, the icon of the browser plug-in is obtained, and the obtained icon of the browser plug-in is placed in the plug-in container. 19.如权利要求18所述的方法,所述将获取的浏览器插件图标置于所述插件容器中包括:19. The method of claim 18, wherein placing the obtained browser plug-in icon in the plug-in container comprises: 判断浏览器地址栏中的插件容器内的可用长度是否能够匹配所述浏览器插件图标,如果是,将所述浏览器插件图标置于所述插件容器中,否则,删除所述插件容器中的浏览器插件图标,以使所述插件容器内的可用长度能够匹配所述获取的浏览器插件图标,并将所述获取的浏览器插件图标置于所述插件容器中。Determine whether the available length in the plug-in container in the browser address bar can match the browser plug-in icon, if so, place the browser plug-in icon in the plug-in container, otherwise, delete the plug-in container in the plug-in container. A browser plug-in icon, so that the available length in the plug-in container can match the obtained browser plug-in icon, and the obtained browser plug-in icon is placed in the plug-in container. 20.一种浏览器,该浏览器包括:映射关系集构建模块以及浏览器插件图标加载模块,其中,20. A browser, comprising: a mapping relationship set building module and a browser plug-in icon loading module, wherein, 映射关系集构建模块,用于在各网页页面对应的浏览器地址栏中的可用空间内设置用于显示浏览器插件图标的插件容器,构建网页页面与插件容器长度的映射关系集;The mapping relationship set building module is used to set a plug-in container for displaying the browser plug-in icon in the available space in the browser address bar corresponding to each web page, and construct a mapping relationship set between the web page and the length of the plug-in container; 浏览器插件图标加载模块,用于在监测到浏览器加载网页页面后,查询预先存储的网页页面与插件容器长度的映射关系集,获取加载的网页页面映射的插件容器长度,按照获取的插件容器长度在所述插件容器中加载浏览器插件图标。The browser plug-in icon loading module is used to query the pre-stored set of mapping relationships between the web page and the length of the plug-in container after monitoring that the browser loads the web page, and obtain the length of the plug-in container mapped by the loaded web page, according to the obtained plug-in container. Length loads the browser plugin icon in the plugin container. 21.如权利要求20所述的浏览器,所述映射关系集构建模块包括:插件容器设置单元、长度获取单元以及映射关系集构建单元,其中,21. The browser according to claim 20, wherein the mapping relationship set building module comprises: a plug-in container setting unit, a length acquiring unit, and a mapping relationship set building unit, wherein, 插件容器设置单元,用于在各网页页面对应的浏览器地址栏中的可用空间内设置用于显示浏览器插件图标的插件容器;A plug-in container setting unit, configured to set a plug-in container for displaying browser plug-in icons in the available space in the browser address bar corresponding to each web page; 长度获取单元,用于获取网页页面对应的网址信息占用的字符长度;The length obtaining unit is used to obtain the character length occupied by the URL information corresponding to the webpage; 映射关系集构建单元,用于根据浏览器地址栏的字符长度以及所述网页页面对应的网址信息占用的字符长度,计算所述网页页面对应的插件容器的字符长度,并构建对应的映射关系,依据多个映射关系生成映射关系集。a mapping relationship set construction unit, configured to calculate the character length of the plug-in container corresponding to the webpage page according to the character length of the browser address bar and the character length occupied by the website information corresponding to the webpage page, and construct a corresponding mapping relationship, Generate a mapping relationship set according to multiple mapping relationships. 22.如权利要求21所述的浏览器,所述映射关系集构建模块进一步包括:22. The browser of claim 21, the mapping relationship set building module further comprising: 内置单元,用于在浏览器地址栏中的可用空间内设置用于显示浏览器内置功能程序图标的浏览器内置功能容器。The built-in unit is used to set a browser built-in function container for displaying the browser built-in function program icon in the available space in the browser address bar. 23.如权利要求22所述的浏览器,所述浏览器插件图标加载模块包括:查询单元、计算单元以及加载处理单元,其中,23. The browser according to claim 22, wherein the browser plug-in icon loading module comprises: a query unit, a calculation unit and a loading processing unit, wherein, 查询单元,用于在监测到浏览器加载网页页面后,查询预先存储的网页页面与插件容器长度的映射关系集,获取加载的网页页面映射的插件容器长度;a query unit, configured to query a pre-stored set of mapping relationships between the web page and the length of the plug-in container after monitoring that the browser loads the web page, and obtain the length of the plug-in container mapped by the loaded web page; 计算单元,用于计算待加载浏览器插件图标集中所有浏览器插件图标的总长度;a calculation unit, used to calculate the total length of all browser plug-in icons in the set of browser plug-in icons to be loaded; 加载处理单元,用于判断计算的总长度是否大于所述获取的插件容器长度,如果是,从所述待加载浏览器插件图标集中,选取符合预先设置的加载策略的浏览器插件图标,并加载到所述插件容器中;否则,将所述待加载浏览器插件图标集中的所有浏览器插件图标加载到所述插件容器中。A loading processing unit, configured to determine whether the calculated total length is greater than the obtained plug-in container length, and if so, select a browser plug-in icon that conforms to a preset loading strategy from the set of browser plug-in icons to be loaded, and load into the plug-in container; otherwise, load all browser plug-in icons in the set of browser plug-in icons to be loaded into the plug-in container. 24.如权利要求20至23任一项所述的浏览器,所述浏览器进一步包括:24. The browser of any one of claims 20 to 23, further comprising: 浏览器插件图标隐藏处理模块,用于接收插件容器中浏览器插件图标输出的隐藏指令,隐藏输出隐藏指令的浏览器插件图标,并调整所述插件容器中的浏览器插件图标位置。The browser plug-in icon hiding processing module is used for receiving the hiding instruction output by the browser plug-in icon in the plug-in container, hiding the browser plug-in icon outputting the hiding instruction, and adjusting the position of the browser plug-in icon in the plug-in container. 25.如权利要求24所述的浏览器,所述浏览器插件图标隐藏处理模块包括:监测单元、通知单元、隐藏单元以及调整单元,其中,25. The browser according to claim 24, wherein the browser plug-in icon hiding processing module comprises: a monitoring unit, a notification unit, a hiding unit and an adjustment unit, wherein, 监测单元,用于在监测到用户点击隐藏按钮后,浏览器由JS向HANDLER发送extensionSettingsEnable消息传递List参数;The monitoring unit is used to send the extensionSettingsEnable message from JS to the HANDLER to pass the List parameter after monitoring that the user clicks the hidden button; 通知单元,用于接收List参数,发出通知给插件容器,通知中包含接收的List参数;The notification unit is used to receive the List parameter and send a notification to the plug-in container, and the notification contains the received List parameter; 隐藏单元,用于根据接收的List参数中的"false"字符串隐藏对应的浏览器插件图标;The hiding unit is used to hide the corresponding browser plug-in icon according to the "false" string in the received List parameter; 调整单元,用于将位于所述隐藏的浏览器插件图标左侧的浏览器插件图标依序右移。An adjustment unit, configured to sequentially move the browser plug-in icons on the left side of the hidden browser plug-in icons to the right. 26.如权利要求25所述的浏览器,所述浏览器插件图标隐藏处理模块进一步包括:26. The browser of claim 25, wherein the browser plug-in icon hiding processing module further comprises: 再加载单元,用于读取浏览器插件图标集中排序在所述隐藏的浏览器插件图标后的浏览器插件图标,加载到插件容器中最左侧的位置。The reloading unit is configured to read the browser plug-in icons that are centrally sorted after the hidden browser plug-in icons, and load them into the leftmost position in the plug-in container. 27.如权利要求20至23任一项所述的浏览器,所述浏览器进一步包括:27. The browser of any one of claims 20 to 23, further comprising: 页面切换处理模块,用于在监测到网页页面切换后,根据切换的网页页面映射的插件容器长度,在所述切换的网页页面对应的插件容器中加载浏览器插件图标。The page switching processing module is configured to load a browser plug-in icon in the plug-in container corresponding to the switched webpage according to the length of the plug-in container mapped by the switched webpage after monitoring the webpage switching. 28.如权利要求27所述的浏览器,所述页面切换处理模块包括:创建单元、监测单元、遍历单元以及页面切换处理单元,其中,28. The browser according to claim 27, wherein the page switching processing module comprises: a creating unit, a monitoring unit, a traversing unit and a page switching processing unit, wherein, 创建单元,用于为待加载浏览器插件图标集中的每一网页页面创建相应的数据结构,并在创建的数据结构中,存储插件长度信息以及浏览器插件更新信息;The creation unit is used to create a corresponding data structure for each web page in the icon set of the browser plug-in to be loaded, and store the plug-in length information and the browser plug-in update information in the created data structure; 监测单元,用于在监测到调用系统TabStripModel::ActivateTabAt函数后,向浏览器地址栏发出ActiveTabChanged的消息通知;The monitoring unit is used to send a message notification of ActiveTabChanged to the browser address bar after monitoring the calling system TabStripModel::ActivateTabAt function; 遍历单元,用于接收ActiveTabChanged的消息通知,调用插件容器的Update函数,遍历待加载浏览器插件图标集中的每一网页页面对应的数据结构;The traversal unit is used to receive the message notification of ActiveTabChanged, call the Update function of the plug-in container, and traverse the data structure corresponding to each web page in the icon set of the browser plug-in to be loaded; 页面切换处理单元,用于获取切换的网页页面对应的数据结构,读取存储的浏览器插件更新信息,根据读取的所述浏览器插件更新信息以及插件长度信息,生成浏览器插件图标并加载至插件容器中。The page switching processing unit is used to obtain the data structure corresponding to the switched webpage, read the stored browser plug-in update information, and generate and load the browser plug-in icon according to the read browser plug-in update information and plug-in length information. into the plugin container. 29.如权利要求20至23任一项所述的浏览器,所述浏览器进一步包括:29. The browser of any one of claims 20 to 23, further comprising: 管理页面模块,用于读取浏览器地址栏插件容器中显示的浏览器插件图标对应的更新信息;根据读取的更新信息更新管理页面待加载浏览器插件图标集中对应的浏览器插件图标。The management page module is used to read the update information corresponding to the browser plug-in icon displayed in the plug-in container of the browser address bar; update the browser plug-in icon corresponding to the browser plug-in icon set to be loaded on the management page according to the read update information.
CN201710138985.8A 2014-06-13 2014-06-13 Method for loading browser plug-in icon and browser Active CN106933629B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710138985.8A CN106933629B (en) 2014-06-13 2014-06-13 Method for loading browser plug-in icon and browser

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710138985.8A CN106933629B (en) 2014-06-13 2014-06-13 Method for loading browser plug-in icon and browser
CN201410265195.2A CN104021016B (en) 2014-06-13 2014-06-13 Method and browser for loading browser plug-in icons

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201410265195.2A Division CN104021016B (en) 2014-06-13 2014-06-13 Method and browser for loading browser plug-in icons

Publications (2)

Publication Number Publication Date
CN106933629A CN106933629A (en) 2017-07-07
CN106933629B true CN106933629B (en) 2021-01-15

Family

ID=51437788

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201410265195.2A Active CN104021016B (en) 2014-06-13 2014-06-13 Method and browser for loading browser plug-in icons
CN201710138985.8A Active CN106933629B (en) 2014-06-13 2014-06-13 Method for loading browser plug-in icon and browser

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN201410265195.2A Active CN104021016B (en) 2014-06-13 2014-06-13 Method and browser for loading browser plug-in icons

Country Status (1)

Country Link
CN (2) CN104021016B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104021016B (en) * 2014-06-13 2017-04-12 北京奇虎科技有限公司 Method and browser for loading browser plug-in icons
CN107087230A (en) * 2016-02-16 2017-08-22 阿里巴巴集团控股有限公司 Player plug-in loading method and its device
CN108121484A (en) * 2016-11-29 2018-06-05 北京嘀嘀无限科技发展有限公司 Order generation method and by bus order generating means by bus
CN106921657A (en) * 2017-02-10 2017-07-04 北京浩瀚深度信息技术股份有限公司 A kind of online website anti-hijacking analysis method and device based on BS structures
CN108536540B (en) * 2017-03-01 2022-02-22 腾讯科技(深圳)有限公司 Method and device for acquiring mouse message of desktop icon
CN110362416B (en) * 2018-03-26 2022-03-25 腾讯科技(深圳)有限公司 Page component loading method and device, electronic equipment and storage medium
CN113590995B (en) * 2019-01-14 2023-08-01 广州虎牙信息科技有限公司 Page display method, device and storage medium
CN110321178A (en) * 2019-06-28 2019-10-11 百度在线网络技术(北京)有限公司 Starting processing method, device, equipment and the storage medium of attached application end
CN114117185A (en) * 2021-11-10 2022-03-01 博泰雄森(北京)网络科技有限公司 A method, device, computer equipment and storage medium for determining a website address

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8091042B2 (en) * 2001-11-15 2012-01-03 Siebel Systems, Inc. Apparatus and method for displaying selectable icons in a toolbar for a user interface
US8370766B2 (en) * 2007-01-30 2013-02-05 Oracle International Corporation Menu creation browser extension
CN101582039A (en) * 2009-06-18 2009-11-18 深圳市汇海科技开发有限公司 Plug-in loading method for saving memory cost
CN102043645B (en) * 2009-10-20 2014-01-08 阿里巴巴集团控股有限公司 Plug-in loading method and device
JP5510147B2 (en) * 2010-07-22 2014-06-04 株式会社リコー Image forming apparatus and screen control method
US9378297B2 (en) * 2011-03-07 2016-06-28 Microsoft Technology Licensing, Llc Task-based address bar and tabs scaling
CN103218425B (en) * 2013-04-03 2016-04-13 北京奇虎科技有限公司 The disposal route of browser extension item and device
CN103677823B (en) * 2013-12-06 2017-05-24 北京奇虎科技有限公司 Method and device for managing browser plug-ins
CN104021016B (en) * 2014-06-13 2017-04-12 北京奇虎科技有限公司 Method and browser for loading browser plug-in icons

Also Published As

Publication number Publication date
CN104021016A (en) 2014-09-03
CN106933629A (en) 2017-07-07
CN104021016B (en) 2017-04-12

Similar Documents

Publication Publication Date Title
CN106933629B (en) Method for loading browser plug-in icon and browser
CN103034517B (en) Browser controls tool loads method and apparatus
US8266544B1 (en) HTML pop-up control
CN103685528B (en) Information displaying method and device
WO2018077085A1 (en) Application processing method, device and storage medium
CN103677823B (en) Method and device for managing browser plug-ins
US20150074561A1 (en) Customizable themes for browsers and web content
US9633208B2 (en) Apparatus and method for displaying computer health index
CN104866318B (en) Method and device for displaying tab pages in multiple windows
US20150220496A1 (en) Dynamic sprite based theme switching
US20130151937A1 (en) Selective image loading in mobile browsers
CN102999613B (en) A kind of method of the class of loading tool in a browser window and device thereof
WO2012055764A1 (en) Interactive element management in a web page
CN103019703B (en) Tool window loading method and device for browser
CN105260421A (en) Webpage loading method and apparatus
CN106155654B (en) Method and device for shielding webpage operation and electronic equipment
CN115309470A (en) Method, device and equipment for loading widgets and storage medium
WO2012128947A2 (en) On-demand image spriting
CN106599257B (en) Method for realizing page shortcut and electronic equipment
CN103617055A (en) Browser and method and device of starting applications in browser
CN103544271B (en) Load Image in a kind of browser the method and apparatus for processing window
CN112068828A (en) Method, apparatus, system, device and medium for generating title control
CN102915378B (en) In webpage, content show state changes method and apparatus
US9043464B1 (en) Automatically grouping resources accessed by a user
CN108345683A (en) Webpage display method, device, terminal and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220728

Address after: 300450 No. 9-3-401, No. 39, Gaoxin 6th Road, Binhai Science Park, Binhai New Area, Tianjin

Patentee after: 3600 Technology Group 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.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230713

Address after: 1765, floor 17, floor 15, building 3, No. 10 Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee after: Beijing Hongxiang Technical Service Co.,Ltd.

Address before: 300450 No. 9-3-401, No. 39, Gaoxin 6th Road, Binhai Science Park, Binhai New Area, Tianjin

Patentee before: 3600 Technology Group Co.,Ltd.

CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 1765, floor 17, floor 15, building 3, No. 10 Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee after: Beijing 360 Zhiling Technology Co.,Ltd.

Country or region after: China

Address before: 1765, floor 17, floor 15, building 3, No. 10 Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee before: Beijing Hongxiang Technical Service Co.,Ltd.

Country or region before: China