Method and device for changing pop-up window into tab page, equipment and medium

By modifying the Chromium kernel code in the browser, the behavior of pop-ups can be dynamically controlled, changing them to tabs or independent windows. This solves the problem of plugin pop-ups affecting synchronous operations, improves user experience and operational smoothness, and adapts to different usage scenarios.

CN121560423APending Publication Date: 2026-02-24FUJIAN ZIXUN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511363473.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-23
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

In browsers, changes in the position of plugin pop-ups can interfere with synchronization operations, affecting the synchronization effect of the synchronizer, a problem that current technology cannot effectively solve.

Method used

By modifying the Chromium kernel code and adding the parameter `window_to_tab`, the behavior of the pop-up can be dynamically controlled, changing it to a tab or an independent window. This is achieved by using the IPC mechanism to adjust it in real time, avoiding the need to restart the browser.

Benefits of technology

Enhance user experience flexibility and operational smoothness, reduce resource consumption, adapt to different usage scenarios, and maintain functional consistency and predictability of user operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121560423A_ABST
    Figure CN121560423A_ABST
Patent Text Reader

Abstract

The invention provides a method and a device for changing a pop-up window into a tab page, equipment and a medium. The method comprises the following steps: adding a parameter windowtab in browser startup parameters; when the windowtab is a set value, a label page is newly created according to chrome.windows.create provided by the Chromium kernel, and otherwise, an independent window is newly created; when the tab page is closed, only the currently active tab page is closed; according to the method, the pop-up box is opened in an additional tab mode by modifying a chromium bottom layer code, so that when a browser uses a synchronizer, it is guaranteed that the synchronization process is uniform and is not affected by a pop-up window.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of browser loading technology, and in particular to a method, apparatus, device, and medium for converting a pop-up window into a tab page. Background Technology

[0002] Existing browsers contain pop-up plugins whose position changes (top or bottom) depending on the zoom level. When using a synchronizer for browser testing, multiple browsers need to be opened on one screen for synchronization. However, the pop-up plugins interfere with the synchronizer's operation because they block other browsers, causing invalid clicks and rendering some browser operations ineffective. Summary of the Invention

[0003] The technical problem to be solved by the present invention is to provide a method, apparatus, device and medium for changing a pop-up window into a tab page. By modifying the underlying code of Chromium, the pop-up box is opened as an additional tab, so that when the browser uses the synchronizer, the synchronization process is consistent and not affected by the pop-up window.

[0004] In a first aspect, the present invention provides a method for converting a pop-up window into a tab page, comprising the following steps:

[0005] Step 1: Add a parameter `window_to_tab` to the browser's startup parameters;

[0006] Step 2: When window_to_tab is set, a new tab is created according to chrome.windows.create provided by the Chromium kernel; otherwise, a new independent window is created. When closing a tab, only the currently active tab is closed.

[0007] Secondly, the present invention provides an apparatus for converting a pop-up window into a tab page, comprising:

[0008] In the parameter settings module, add a parameter `window_to_tab` to the browser startup parameters;

[0009] The display module is modified so that when window_to_tab is set, a new tab is created according to chrome.windows.create provided by the Chromium kernel; otherwise, a new independent window is created. When a tab is closed, only the currently active tab is closed.

[0010] Thirdly, the present invention provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in the first aspect.

[0011] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect.

[0012] One or more technical solutions provided by this invention have at least the following technical effects or advantages:

[0013] 1. Enhance user experience flexibility

[0014] Allow users to choose the pop-up behavior (new window / new tab) based on their usage habits to meet different scenario needs. For example, use a new window when independent operation is required, and use a new tab when you want to maintain browsing continuity.

[0015] 2. Intuitive browser design

[0016] Converting plugin pop-ups into tabs allows for better integration into the browser's tab management system, enabling users to switch, group, and manage them just like regular web pages, reducing cognitive load.

[0017] 3. Dynamic switching without restarting

[0018] The window_to_tab parameter can be modified in real time via the IPC mechanism, and the changes will take effect without restarting the plugin or browser, thus improving the responsiveness of the function and the smoothness of user operation.

[0019] 4. Maintain functional consistency

[0020] The behavior logic for creating and closing operations remains consistent (either both are window-based or tab-based), avoiding confusion in user behavior and enhancing the predictability of the functionality.

[0021] 5. Adaptable to different usage scenarios

[0022] Multi-window workflow: Suitable for scenarios that require displaying multiple independent plugin interfaces simultaneously.

[0023] Tab management: Suitable for scenarios where you want to centrally manage all content and reduce window switching.

[0024] 6. Enhance scalability

[0025] This parameterized control design pattern makes it easy to add more behavioral options later. New operation modes can be supported simply by expanding the judgment conditions, without the need for major code refactoring.

[0026] 7. Optimize resource usage

[0027] Tabbed mode typically saves more system resources than standalone windows. For users who frequently use plugins, switching modes can reduce memory usage.

[0028] Overall, this design, through configurable behavior patterns and a seamless switching mechanism, maximizes its adaptability to different user preferences and scenario needs without sacrificing functional integrity.

[0029] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0030] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0031] Figure 1 This is a flowchart of the method in Embodiment 1 of the present invention;

[0032] Figure 2 This is a schematic diagram of the device in Embodiment 2 of the present invention. Detailed Implementation

[0033] The overall concept of the technical solution in this application is as follows:

[0034] This solution provides a way to change the behavior of browser plugin pop-ups in real time without restarting the browser (specifically, a Chromium-based browser); the specific steps are as follows:

[0035] Step 1: Add a parameter `window_to_tab`, a boolean type, to control whether to change the behavior of the standalone pop-up to tab mode.

[0036] Step 2: If `window_to_tab` is true, the kernel-provided plugin API `chrome.windows.create` will create a new tab; otherwise, it will create a new independent window.

[0037] Step 3: Provide an IPC method to dynamically change the value of window_to_tab to achieve real-time control.

[0038] Instructions on how to change the behavior of the pop-up window for the operation.

[0039] 1. In the `chrome.windows.create` method, check if the `window_to_tab` parameter is true, which is used to determine the behavior of the plugin pop-up.

[0040]

[0041] 2. In the `chrome.windows.remove` method, modify the closing behavior based on the `window_to_tab` parameter.

[0042]

[0043] 3: Dynamically change the value of window_to_tab using IPC.

[0044]

[0045] Example 1

[0046] like Figure 1 As shown, this embodiment provides a method for changing a pop-up window into a tab page, including the following steps:

[0047] Step 1: Add a parameter `window_to_tab` to the browser's startup parameters;

[0048] Step 2: When window_to_tab is set, a new tab is created according to chrome.windows.create provided by the Chromium kernel; otherwise, a new independent window is created. When closing a tab, only the currently active tab is closed.

[0049] In this embodiment, preferably, step 3 is also included: changing the value of the parameter window_to_tab via IPC.

[0050] In this embodiment, preferably, step 1 specifically involves adding a parameter `window_to_tab` to the browser startup parameters. The parameter `window_to_tab` is of type boolean. When `window_to_tab` is true, the behavior of the independent pop-up window is changed to tab mode; when `window_to_tab` is false, the behavior of the independent pop-up window is not changed.

[0051] In this embodiment, preferably, step 2 specifically involves: obtaining the window_to_tab parameter through Setting::GetWindowToTab.

[0052] When `window_to_tab` is true, a new browser window will not be created; instead, a new tab will be created in the current window. Specifically:

[0053] Get the current window controller (WindowController) and the browser instance (Browser);

[0054] Construct the tab opening parameters OpenTabParams, including the URL to be opened;

[0055] Use ExtensionTabUtil::OpenTab to open a new tab in the current window;

[0056] The system returns the result of the operation, including information about the current browser window, indicating that the new tab has been created.

[0057] When window_to_tab is false, a new browser window is created;

[0058] When closing a tab, check if the window_to_tab parameter is true;

[0059] If the window_to_tab parameter is true, the entire browser window will not be closed; only the currently active tab will be closed.

[0060] Based on the same inventive concept, this application also provides an apparatus corresponding to the method in Embodiment 1, as detailed in Embodiment 2.

[0061] Example 2

[0062] like Figure 2 As shown, this embodiment provides a device for changing a pop-up window into a tab page, including:

[0063] In the parameter settings module, add a parameter `window_to_tab` to the browser startup parameters;

[0064] The display module is modified so that when window_to_tab is set, a new tab is created according to chrome.windows.create provided by the Chromium kernel; otherwise, a new independent window is created. When a tab is closed, only the currently active tab is closed.

[0065] In this embodiment, preferably, it also includes a parameter modification module to change the value of the parameter window_to_tab via IPC.

[0066] In this embodiment, preferably, the setting parameter module specifically adds a parameter window_to_tab to the browser startup parameters. The parameter window_to_tab is of type bool. When window_to_tab is true, the behavior of the independent pop-up window is changed to tab mode; when window_to_tab is false, the behavior of the independent pop-up window is not changed.

[0067] In this embodiment, preferably, the change of the display module specifically involves: obtaining the window_to_tab parameter through Setting::GetWindowToTab.

[0068] When `window_to_tab` is true, a new browser window will not be created; instead, a new tab will be created in the current window. Specifically:

[0069] Get the current window controller (WindowController) and the browser instance (Browser);

[0070] Construct the tab opening parameters OpenTabParams, including the URL to be opened;

[0071] Use ExtensionTabUtil::OpenTab to open a new tab in the current window;

[0072] The system returns the result of the operation, including information about the current browser window, indicating that the new tab has been created.

[0073] When window_to_tab is false, a new browser window is created;

[0074] When closing a tab, check if the window_to_tab parameter is true;

[0075] If the window_to_tab parameter is true, the entire browser window will not be closed; only the currently active tab will be closed.

[0076] Since the apparatus described in Embodiment 2 of the present invention is an apparatus used to implement the method of Embodiment 1 of the present invention, those skilled in the art can understand the specific structure and variations of the apparatus based on the method described in Embodiment 1 of the present invention, and therefore will not be described again here. All apparatuses used in the method of Embodiment 1 of the present invention fall within the scope of protection of the present invention.

[0077] Based on the same inventive concept, this application provides an electronic device embodiment corresponding to Embodiment 1, as detailed in Embodiment 3.

[0078] Example 3

[0079] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it can implement any of the implementation methods in Embodiment 1.

[0080] Since the electronic device described in this embodiment is the device used to implement the method in Embodiment 1 of this application, those skilled in the art can understand the specific implementation method and various variations of the electronic device in this embodiment based on the method described in Embodiment 1 of this application. Therefore, how the electronic device implements the method in the embodiment of this application will not be described in detail here. Any device used by those skilled in the art to implement the method in the embodiment of this application falls within the scope of protection of this application.

[0081] Based on the same inventive concept, this application provides a storage medium corresponding to Embodiment 1, as detailed in Embodiment 4.

[0082] Example 4

[0083] This embodiment provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it can implement any of the implementation methods in Embodiment 1.

[0084] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0085] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0086] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0087] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0088] While specific embodiments of the present invention have been described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and not intended to limit the scope of the present invention. Equivalent modifications and variations made by those skilled in the art in accordance with the spirit of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A method for changing a pop-up window into a tab page, characterized in that: Includes the following steps: Step 1: Add a parameter `window_to_tab` to the browser's startup parameters; Step 2: When window_to_tab is set, a new tab is created according to chrome.windows.create provided by the Chromium kernel; otherwise, a new independent window is created. When closing a tab, only the currently active tab is closed.

2. The method for changing a pop-up window to a tab page according to claim 1, characterized in that: It also includes step 3, changing the value of the parameter window_to_tab via IPC.

3. The method for changing a pop-up window to a tab page according to claim 1, characterized in that: Step 1 specifically involves adding a parameter `window_to_tab` to the browser startup parameters. The parameter `window_to_tab` is of type boolean. When `window_to_tab` is true, the behavior of the independent pop-up window is changed to tab mode; when `window_to_tab` is false, the behavior of the independent pop-up window is not changed.

4. The method for changing a pop-up window to a tab page according to claim 1, characterized in that: Step 2 specifically involves obtaining the `window_to_tab` parameter using `Setting::GetWindowToTab`. When `window_to_tab` is true, a new browser window will not be created; instead, a new tab will be created in the current window. Specifically: Get the current window controller (WindowController) and the browser instance (Browser); Construct the tab opening parameters OpenTabParams, including the URL to be opened; Use ExtensionTabUtil::OpenTab to open a new tab in the current window; The system returns the result of the operation, including information about the current browser window, indicating that the new tab has been created. When window_to_tab is false, a new browser window is created; When closing a tab, check if the window_to_tab parameter is true; If the window_to_tab parameter is true, the entire browser window will not be closed; only the currently active tab will be closed.

5. A device for converting a pop-up window into a tab page, characterized in that: include: In the parameter settings module, add a parameter `window_to_tab` to the browser startup parameters; The display module is modified so that when window_to_tab is set, a new tab is created according to chrome.windows.create provided by the Chromium kernel; otherwise, a new independent window is created. When a tab is closed, only the currently active tab is closed.

6. The apparatus for converting a pop-up window into a tab page according to claim 5, characterized in that: It also includes a parameter modification module that changes the value of the parameter window_to_tab via IPC.

7. The apparatus for converting a pop-up window into a tab page according to claim 5, characterized in that: Specifically, the parameter setting module adds a parameter `window_to_tab` to the browser startup parameters. The parameter `window_to_tab` is of type boolean. When `window_to_tab` is true, the behavior of the independent pop-up window is changed to tab mode; when `window_to_tab` is false, the behavior of the independent pop-up window is not changed.

8. The apparatus for converting a pop-up window into a tab page according to claim 5, characterized in that: The change to the display module specifically involves obtaining the `window_to_tab` parameter via `Setting::GetWindowToTab`. When `window_to_tab` is true, a new browser window will not be created; instead, a new tab will be created in the current window. Specifically: Get the current window controller (WindowController) and the browser instance (Browser); Construct the tab opening parameters OpenTabParams, including the URL to be opened; Use ExtensionTabUtil::OpenTab to open a new tab in the current window; The system returns the result of the operation, including information about the current browser window, indicating that the new tab has been created. When window_to_tab is false, a new browser window is created; When closing a tab, check if the window_to_tab parameter is true; If the window_to_tab parameter is true, the entire browser window will not be closed; only the currently active tab will be closed.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 4.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 4.