Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: headless/README.md

Issue 1674263002: headless: Initial headless embedder API implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fine, no console logging Mr. Presubmit. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « headless/DEPS ('k') | headless/app/headless_shell.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Headless Chromium
2
3 Headless Chromium is a library for running Chromium in a headless/server
4 environment. Expected use cases include loading web pages, extracting metadata
5 (e.g., the DOM) and generating bitmaps from page contents -- using all the
6 modern web platform features provided by Chromium and Blink.
7
8 ## Headless shell
9
10 The headless shell is a sample application which demonstrates the use of the
11 headless API. To run it, first open the build configuration editor:
12
13 ```
14 $ gn args out/Release
15 ```
16
17 and enable headless mode with `is_headless = true`.
18
19 Then build the shell:
20
21 ```
22 $ ninja -C out/Release headless_shell
23 ```
24
25 After the build completes, the headless shell can be run with the following
26 command:
27
28 ```
29 $ out/Release/headless_shell https://www.google.com
30 ```
31
32 To attach a [DevTools](https://developer.chrome.com/devtools) debugger to the
33 shell, start it with an argument specifying the debugging port:
34
35 ```
36 $ out/Release/headless_shell --remote-debugging-port=9222 https://youtube.com
37 ```
38
39 Then navigate to `http://127.0.0.1:9222` with your browser.
40
41 ## Embedder API
42
43 The embedder API allows developers to integrate the headless library into their
44 application. The API provides default implementations for low level adaptation
45 points such as networking and the run loop.
46
47 The main embedder API classes are:
48
49 - `HeadlessBrowser::Options::Builder` - Defines the embedding options, e.g.:
50 - `SetMessagePump` - Replaces the default base message pump. See
51 `base::MessagePump`.
52
53 ## Headless API
54
55 The headless API is used to drive the browser and interact with the loaded web
56 pages. Its main classes are:
57
58 - `HeadlessBrowser` - Represents the global headless browser instance.
59 - `HeadlessWebContents` - Represents a single "tab" within the browser.
OLDNEW
« no previous file with comments | « headless/DEPS ('k') | headless/app/headless_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698