Convert Figma logo to code with AI

chromium logochromium

The official GitHub mirror of the Chromium source

21,340
7,834
21,340
124

Top Related Projects

SUPERSEDED by https://github.com/mozilla-firefox/firefox. Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org

Brave browser for Android, iOS, Linux, macOS, Windows.

118,535

:electron: Build cross-platform desktop apps with JavaScript, HTML, and CSS

8,865

Home of the WebKit project, the browser engine used by Safari, Mail, App Store and many other applications on macOS, iOS and Linux.

A keyboard-driven, vim-like browser based on Python and Qt.

Quick Overview

Chromium is the open-source web browser project that serves as the foundation for Google Chrome and many other browsers. It provides a fast, secure, and stable web browsing experience while offering developers a platform to build and test web applications and browser extensions.

Pros

  • Open-source and highly customizable
  • Frequent updates and cutting-edge web technologies
  • Strong security features and regular patches
  • Large community and extensive documentation

Cons

  • High resource usage, especially RAM consumption
  • Privacy concerns due to Google's involvement
  • Complex codebase, which can be challenging for new contributors
  • Some features may be unstable in development versions

Getting Started

To get started with Chromium development:

  1. Clone the repository:

    git clone https://chromium.googlesource.com/chromium/src.git
    
  2. Install dependencies (on Ubuntu):

    sudo apt-get install git-core python3 curl
    
  3. Run the setup script:

    cd src
    ./build/install-build-deps.sh
    
  4. Configure the build:

    gn gen out/Default
    
  5. Build Chromium:

    autoninja -C out/Default chrome
    
  6. Run Chromium:

    out/Default/chrome
    

For more detailed instructions and platform-specific guides, refer to the official Chromium documentation.

Competitor Comparisons

SUPERSEDED by https://github.com/mozilla-firefox/firefox. Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org

Pros of gecko-dev

  • More permissive licensing (MPL 2.0) allows for easier code reuse and modification
  • Stronger focus on privacy features and user control
  • Smaller codebase may be easier to navigate for some contributors

Cons of gecko-dev

  • Smaller developer community and ecosystem compared to Chromium
  • Less market share, potentially leading to fewer real-world testing scenarios
  • May have slower adoption of cutting-edge web technologies

Code Comparison

Chromium (C++):

void RenderFrameHostImpl::UpdateSubresourceLoaderFactories() {
  if (!IsActive())
    return;
  GetContentClient()->browser()->UpdateSubresourceLoaderFactories(
      this, associated_registry_.get());
}

gecko-dev (C++):

nsresult
nsDocShell::CreateAboutBlankContentViewer() {
  nsCOMPtr<nsIContentViewer> viewer;
  nsresult rv = CreateContentViewer(nullptr, nullptr, getter_AddRefs(viewer));
  if (NS_FAILED(rv)) {
    return rv;
  }
  return SetContentViewer(viewer);
}

Both repositories use C++ for core functionality, but their coding styles and specific implementations differ. Chromium's code tends to be more concise, while gecko-dev's code often includes more detailed error handling and Mozilla-specific conventions.

Brave browser for Android, iOS, Linux, macOS, Windows.

Pros of Brave Browser

  • Enhanced privacy features, including built-in ad and tracker blocking
  • Integrated cryptocurrency wallet and rewards system
  • More user-friendly interface for privacy settings

Cons of Brave Browser

  • Smaller developer community compared to Chromium
  • Some features may lag behind Chromium due to the additional development layer
  • Potential conflicts between privacy features and certain website functionalities

Code Comparison

Brave Browser extends Chromium's codebase with additional privacy features. Here's a simplified example of how Brave implements its ad-blocking functionality:

Chromium:

// No built-in ad-blocking

Brave Browser:

bool ShouldBlockAd(const GURL& url) {
  return ad_block_service_->ShouldBlockAd(url);
}

Brave adds layers of privacy-enhancing code on top of Chromium's base. This includes ad-blocking, fingerprint protection, and cryptocurrency features.

Both projects use Chromium's core rendering engine, but Brave modifies the user interface and adds privacy-focused features. Chromium serves as the foundation for many browsers, including Brave, offering a robust and well-maintained codebase. Brave builds upon this to create a more privacy-centric browsing experience, appealing to users concerned about online tracking and data collection.

118,535

:electron: Build cross-platform desktop apps with JavaScript, HTML, and CSS

Pros of Electron

  • Easier to develop cross-platform desktop applications using web technologies
  • Simplified API for native OS integration and features
  • Faster development cycle for desktop apps

Cons of Electron

  • Larger application size due to bundled Chromium and Node.js
  • Higher memory usage compared to native applications
  • Potential security vulnerabilities from outdated Chromium versions

Code Comparison

Chromium (C++):

#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"

Browser* browser = new Browser(Browser::CreateParams(profile, false));
browser->window()->Show();

Electron (JavaScript):

const { BrowserWindow } = require('electron')

let win = new BrowserWindow({ width: 800, height: 600 })
win.loadFile('index.html')
win.show()

Summary

Electron simplifies desktop app development using web technologies, while Chromium provides a more low-level, performant foundation for web browsers. Electron trades off some performance and resource efficiency for ease of development and cross-platform compatibility. The code comparison illustrates the difference in complexity and language between the two projects, with Electron offering a more accessible API for creating windows and loading content.

8,865

Home of the WebKit project, the browser engine used by Safari, Mail, App Store and many other applications on macOS, iOS and Linux.

Pros of WebKit

  • Lighter weight and more focused codebase
  • Stronger emphasis on web standards compliance
  • Better performance on Apple devices due to tight integration

Cons of WebKit

  • Smaller developer community and ecosystem
  • Less frequent updates and slower feature adoption
  • More limited cross-platform support

Code Comparison

WebKit (JavaScript Core):

JSValue jsNumber(ExecState* exec, double d)
{
    return JSValue(JSValue::EncodeAsDouble, d);
}

Chromium (V8 Engine):

Local<Number> v8::Number::New(Isolate* isolate, double value) {
  return internal::Factory::NewNumber(value);
}

Both examples show number creation, but Chromium's V8 uses a more modern C++ approach with templates and isolates, while WebKit's JavaScript Core uses a simpler C-style function.

WebKit focuses on a cleaner, more standards-compliant implementation, while Chromium's approach offers more flexibility and performance optimizations at the cost of increased complexity.

A keyboard-driven, vim-like browser based on Python and Qt.

Pros of qutebrowser

  • Lightweight and minimalist design, focusing on keyboard-driven navigation
  • Highly customizable through a Python configuration file
  • Built-in ad-blocking and privacy features

Cons of qutebrowser

  • Smaller user base and community compared to Chromium
  • Limited extension support
  • May lack some advanced features found in more mainstream browsers

Code Comparison

qutebrowser (Python):

@cmdutils.register(instance='main-window', scope='window')
@cmdutils.argument('count', count=True)
def tab_close(self, count=None, force=False):
    """Close the current tab."""
    tab = self._tabbed_browser.widget.currentWidget()
    if tab is None:
        return

Chromium (C++):

void Browser::CloseTab() {
  if (!CanCloseTab())
    return;
  TabStripModel* tab_strip_model = tabstrip_model();
  if (tab_strip_model->count() > 1)
    tab_strip_model->CloseSelectedTabs();
}

Both repositories showcase different approaches to browser development. qutebrowser focuses on a minimalist, keyboard-driven experience with Python-based customization, while Chromium offers a more feature-rich and widely-used browser engine with a larger codebase written in C++. The code snippets demonstrate the different languages and structures used in each project for similar functionality (closing tabs).

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

GitHub Copilot Integration in Chromium

This directory provides instructions and prompts for integrating GitHub Copilot with the chromium codebase.

This directory is currently in a prototyping state and may be removed in the future. As we add support for multiple coding IDE/agents, we will likely pull common prompts and instructions into a central directory with stubs for bespoke IDE/agent integration. Please check with your organization before using GitHub Copilot.

Where is copilot-instructions.md?

copilot-intructions.md is typically a single instruction file that contains default instructions for a workspace. These instructions are automatically included in every chat request.

Until the prompt in copilot-intructions.md is generally agreed upon for the chromium repo, this file is intentionally excluded from the repo, and added to the .gitignore for your customization.

For generating your own copilot-intructions.md, type /create_copilot_instructions in GitHub Copilot to get started.

Code Layout

  • .github/instructions: Custom instructions for specific tasks. For example, you can create instruction files for different programming languages, frameworks, or project types. You can attach individual prompt files to a chat request, or you can configure them to be automatically included for specific files or folders with applyTo syntax.
  • .github/prompts: Prompt files can be easily triggered from chat with / and allow you to craft complete prompts in Markdown files. Unlike custom instructions that supplement your chat queries prompts, prompt files are standalone prompts that you can store within your workspace and share with others. With prompt files, you can create reusable templates for common tasks, store domain expertise in the codebase, and standardize AI interactions across your team.
  • .github/resources: Prompt files that are resources for use by other prompts and instructions.

User Specific Prompts

Users can create their own prompts or instructions that match the regex .github/**/user_.md which is captured in the .gitignore.

Contributing Guidelines

Use /git_commit_ghc

  • .github/instructions: Instructions that are automatically picked up using applyTo syntax will have a much higher review bar then those without it.
  • .github/prompts: All prompts should specify a mode and description.
  • .github/resources: All prompt resources should have an active reference or usecase a file in instructions or prompts, and should be cleaned up if their references are modified or removed.