博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Chrome Foundation Services
阅读量:6496 次
发布时间:2019-06-24

本文共 2855 字,大约阅读时间需要 9 分钟。

 

Chrome Foundation Services

Contents

Overview

This directory contains Chrome Foundation Services. If you think of Chrome as a “portable OS,” Chrome Foundation Services can be thought of as that OS' foundational “system services” layer.

Roughly each subdirectory here corresponds to a service that:

  • is a client of //services/service_manager with its own unique Identity.
  • could logically run a standalone process for security/performance isolation benefits depending on the constraints of the host OS.

API Standards

As illustrated above, the individual services in //services are intended for graceful reusability across a broad variety of use cases. To enable this goal, we have rigorous  on services' public APIs. Before doing significant work in //services (and especially before becoming an owner of a service), please internalize these standards -- you are responsible for upholding them.

Service Directory Structure

Individual services are structured like so:

//services/foo/                   <-- Implementation code, may have subdirs.              /public/                     /cpp/        <-- C++ client libraries (optional)                     /mojom/      <-- Mojom interfaces

Dependencies

Code within //services may only depend on each other via each other's /public/ directories, i.e. implementation code may not be shared directly.

Service code should also take care to tightly limit the dependencies on static libraries from outside of //services. Dependencies to large platform layers like //content//chrome or //third_party/WebKit must be avoided.

Physical Packaging

Note that while it may be possible to build a discrete physical package (DSO) for each service, products consuming these services may package them differently, e.g. by combining them into a single package.

Additional Documentation

Relationship To Other Top-Level Directories

Services can be thought of as integrators of library code from across the Chromium repository, most commonly //base and //mojo (obviously) but for each service also //components//uietc. in accordance with the functionality they provide.

Not everything in //components is automatically a service in its own right. Think of //components as sort of like a //lib. Individual //components can define, implement and use Mojom interfaces, but only //services have unique identities with the Service Manager and so only //services make it possible for Mojom interfaces to be acquired.

Adding a new service

See the  for more details regarding how to define a service and expose or consume interfaces to and from other services.

Please start a thread on  if you want to introduce a new service.

If you are servicifying existing Chromium code: Please first read the , which contains information that will hopefully make your task easier.

转载于:https://www.cnblogs.com/huangguanyuan/p/9800462.html

你可能感兴趣的文章
[Array]189. Rotate Array
查看>>
iuap
查看>>
inkscape
查看>>
关于C语言中单双引号的问题
查看>>
HDU1200 POJ2039 ZOJ2208 UVALive3084 To and Fro【密码】
查看>>
CCF201403-1 相反数(100分)
查看>>
表单通过连接数据库数据进行验证
查看>>
redis hash操作 list列表操作
查看>>
利用Hibernate 框架,实现对数据库的增删改查
查看>>
mysql开启远程连接权限
查看>>
关于商米D1S,USB默认权限在关机后丢失的FAQ
查看>>
css3 text-transform变形动画
查看>>
scikit-learn中文api
查看>>
迭代器和生成器
查看>>
Vue 组件之间传值
查看>>
指向方法之委托(一)
查看>>
2013 Multi-University Training Contest 3 部分解题报告
查看>>
Linux 网桥配置命令:brctl
查看>>
jQuery中异步操作对象Deferred
查看>>
MVC设计模式
查看>>