chromium

Run a specified function when the user opens a new tab in Chromium

狂风中的少年 提交于 2019-12-10 11:37:54
问题 I want to remove the most visited thumbnails from Chromium's “New Tab” page. After inspecting the contents of that page, I determined that the following line of JavaScript does the trick: document.getElementById("most-visited").remove(); But I still have one remaining problem: How do make it so that this line runs automatically when I open a new tab? Presumably I have to wrap it in a function and register an event handler, but I've been unable to find more precise information. EDIT: It seems

Background process on the native function at Chromium Embedded Framework

廉价感情. 提交于 2019-12-10 11:05:34
问题 I'm testing a CEF3 program on Visual Studio 2013(C++) and Windows 8.1. I want to process the native function called from JavaScript. However, while the native function is executing, a browser freezes. PostTask is not effective, either. In the case of a thread is made with CreateThread(Win32 API), it occurs an error when getting CefV8Value in the other thread. Isn't there any good way of processing a function asynchronously? CefSettings settings; settings.single_process = true; void App:

Passing information from command line into Chrome extension

和自甴很熟 提交于 2019-12-10 10:54:16
问题 I want to be able to change the behaviour of my Chrome extension in certain cases. I control the launch of Chrome so I can add any command line flag to achieve this (preferably not one that changes the behaviour of Chrome). I need this information to be available in the background page of the extension (not in content pages). One thing I thought of was adding an environment variable, but apparently this isn't directly available from the extensions context. I tried looking through the command

How to dump more than <body> on chrome / chromium headless?

放肆的年华 提交于 2019-12-10 04:17:00
问题 Chrome's documentation states: The --dump-dom flag prints document.body.innerHTML to stdout: As per the title, how can more of the DOM object (ideally all) be dumped with Chromium headless? I can manually save the entire DOM via the developer tools, but I want a programmatic solution. 回答1: Update 2019-04-23 Google was very active on headless front and many updates happened The answer below is valid for the v62 current version is v73 and it's updating all the time. https://www.chromestatus.com

ubuntu14.04下chromium的编译

心不动则不痛 提交于 2019-12-10 02:05:01
1、下载depot_tools: 首先安装 git-core: sudo apt-get install git-core 执行命令: git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git 2、更新depot_tools: 直接在当前shell环境输入: export PATH="$PATH:depot_tools_dir/depot_tools"; 或加如系统环境变量: vim ~/.bashrc 文件,在最后加入 export PATH="$PATH:depot_tools_dir/depot_tools",  保存执行source ~/.bashrc 3、配置代码分支  进入自己本地要保存源码的目录,执行 gclient config http://src.chromium.org/svn/releases/36.0.1985.135 可根据自己需要下载相应版本。如果不需要下载一些文件如LayoutTest修改目录下的.gclient : 1 solutions = [ 2 { "name" : "36.0.1985.135", 3 "url" : "http://src.chromium.org/svn/releases/36.0.1985.135", 4 "deps_file"

Does “Empty Cache and Hard Reload” empty the entire cache or just parts relevant to the current site?

泄露秘密 提交于 2019-12-10 02:04:17
问题 Does "Empty Cache and Hard Reload" in Chromium/Chrome empty the entire cache or just parts relevant to the current site? My inkling is that it empties absolutely all cached resources (as suggested in the comment to this answer). However, a definitive answer would be helpful. 回答1: It empties the entire cache. You can verify this with these steps: Browse through a few sites (reddit, stack overflow, ...) Enter chrome://cache into the omnibox Save the list of files Go to a basic website with no

Could someone once and for all please explain Cannot call determinedVisibility() - never saw a connection for the pid

人走茶凉 提交于 2019-12-10 01:37:09
问题 I'm currently working on graphing data via d3 into a webview. Naturally, things are breaking as soon as I try to reload the graph and feed it new data. This lovely line keeps popping up: W/cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid . I've scoured SO for an explanation, but there doesn't seem to be anything conclusive. People are just suggesting to turn on DOM storage in webview settings (which obviously doesn't fix the issue). I'm suspecting

Failed to load because no supported source was found. when playing HTML5 audio element [duplicate]

匆匆过客 提交于 2019-12-10 01:11:57
问题 This question already has answers here : Videos no longer streaming with mediaelement.js in Chrome (3 answers) Closed 3 years ago . I have HTML5 audio element <audio src="/sounds/call.wav" id="audio1" repeated="0" repetitions="1" class="audio_sound"></audio> If I try to call element.play() strange error appears in Chrome web console. Uncaught (in promise) DOMException: Failed to load because no supported source was found. I haven't found any clues why this error appears and how to fix it. 回答1

Serverless 实战 —— 快速开发一个分布式 Puppeteer 网页截图服务

此生再无相见时 提交于 2019-12-09 17:51:20
通俗描述就是:Puppeteer 可以将 Chrome 或者 Chromium 以无界面的方式运行(当然也可以运行在有界面的服务器上),然后可以通过代码控制浏览器的行为,即使是非界面的模式运行,Chrome 或 Chromium 也可以在内存中正确渲染网页的内容。 那么 Puppeteer 能做什么呢?其实有很多地方都可以受用 Puppeteer,比如: 生成网页截图或者 PDF 抓取 SPA(Single-Page Application) 进行服务器渲染(SSR) 高级爬虫,可以爬取大量异步渲染内容的网页 模拟键盘输入、表单自动提交、登录网页等,实现 UI 自动化测试 捕获站点的时间线,以便追踪你的网站,帮助分析网站性能问题 本文选择截图场景作为演示。 如何快速部署一个分布式 Puppeteer Web 应用? 为了快速部署分布式 Puppeteer Web 应用,这里我们选择 函数计算服务 。 函数计算(Function Compute) : 函数计算是一个事件驱动的服务,通过函数计算,用户无需管理服务器等运行情况,只需编写代码并上传。函数计算准备计算资源,并以弹性伸缩的方式运行用户代码,而用户只需根据实际代码运行所消耗的资源进行付费。函数计算更多信息 参考 。 有了函数计算服务,我们这里目标是搭建一个分布式应用,但做的事情其实很简单,那就是写好业务代码,部署到函数计算

Chromium webview does not seems to work with Android applyOverrideConfiguration

一笑奈何 提交于 2019-12-09 14:51:53
问题 Following my change describe in Force locale for Android flavor with resConfig I am facing a problem with webviews containing video. The issue is only on API21+ and really disappear when removing the call to applyOverrideConfiguration. Not so sure how to get around that. java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference at com.android.webview.chromium.WebViewContentsClientAdapter.getDefaultVideoPoster