ee1f3acf7b
Anonymous namespace should be forbidden in header files even for the forward declarations: * As declarations defined in anonymous namespace are internal linkage, each translation unit which includes this header will get unique copy, which wastes space. * It is easy to violate C++ ODR rule. Consider the following "foo.h": ```cpp namespace { class Foo; } class Bar { public: Foo* getFoo(); Foo* foo; } ``` If the 'foo.h' is included in multiple `.cc` files, the compiler will put `Foo` into a different anonymous namespace in each `.cc`, which means there are different definitions of `Foo` in the program (a violation of the ODR). |
||
---|---|---|
.. | ||
browser | ||
common | ||
script | ||
tools/mac | ||
vendor | ||
.clang-format | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
.travis.yml | ||
appveyor.yml | ||
brightray.gyp | ||
brightray.gypi | ||
CPPLINT.cfg | ||
filename_rules.gypi | ||
filenames.gypi | ||
LICENSE | ||
LICENSE-CHROMIUM | ||
README.md |
Brightray
Brightray is a static library that makes libchromiumcontent easier to use in applications.
Using it in your app
See electron for example of an application written using Brightray.
Development
Prerequisites
- Python 2.7
- Linux:
- Clang 3.0
- Mac:
- Xcode
- Windows:
- Visual Studio 2010 SP1
One-time setup
You must previously have built and uploaded libchromiumcontent using its
script/upload
script.
$ script/bootstrap http://base.url.com/used/by/script/upload
Building
$ script/build
Building Brightray on its own isn’t all that interesting, since it’s just a static library. Building it into an application is the only way to test it.
License
In general, everything is covered by the LICENSE
file. Some files
specify at the top that they are covered by the
LICENSE-CHROMIUM
file instead.