RefreshType in task_manager_observer.h is a real example of the enums
needing this handling. Unless we generate it with the flag attribute,
we can't concatenate the constants with `|`, seeing the error like this:
```
../../chrome/browser/task_manager/internal/android/java/src/org/chromium/chrome/browser/task_manager/TaskManagerActivity.java:32: Error: Flag not allowed here [WrongConstant]
observer, REFRESH_TIME_MS, RefreshType.MEMORY_FOOTPRINT | RefreshType.CPU);
```
Bug: 353596679
Change-Id: I382678b39dd9ff85e619cc1881eb087b463d22bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6034170
Auto-Submit: Keigo Oka <oka@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1384981}
No change to logic. This updates the doc for java_cpp_enum:
* Explains how to correctly include
//third_party/androidx:androidx_annotation_annotation_java in the
dependencies
* Updates the doc to use androidx.annotation.IntDef instead of the
legacy android.support package name
* Consolidates two steps for easier copy-pasting and consistency with
the docs for java_cpp_features and java_cpp_switches
* Adds some troubleshooting steps in case the reader hits build errors
Test: I followed these steps to add a new java_cpp_enum rule
Test: review content: upload to gerrit > open file > click "gitiles"
Change-Id: Ib2de0d5be6a4b04a9efc101d8a3b52ee5ffaa471
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3025844
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Auto-Submit: Nate Fischer <ntfschr@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#901323}
This adds the java_cpp_features GN rule to autogenerate Java String
constants representing C++ features. This refactors parts of
java_cpp_strings so java_cpp_features can share it.
This aims to address the most common syntaxes for declaring C++
features (string literal names, "brace" and "equals brace"
initialization, with & without the "base::" namespace).
Design: http://go/autogen-java-features
Bug: 1060097
Fixed: 1091031
Test: vpython build/android/gpy/java_cpp_strings_tests.py
Test: vpython build/android/gpy/java_cpp_features_tests.py
Test: tools/md_browser/md_browser.py docs/android_accessing_cpp_features_in_java.md
Change-Id: I5311f72f8837c122186148cf183f4219087df96a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2412840
Auto-Submit: Nate Fischer <ntfschr@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Peter Wen <wnwen@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#812889}
No change to logic, only docs. This is a mechanical docs change which
should not impact content (but will improve readability).
This edits some Android docs to use fenced code blocks more
consistently:
* Prefer fenced code blocks over indented code blocks
* Fix indentation issues (see coverage.md)
* Specify a language for syntax highlighting where it makes sense
(particularly, use the "gn" language where it was omitted)
R=agrieve@chromium.org
Bug: 918221
Test: Upload to gerrit > open file > click "gitiles"
Change-Id: I2a4aa292d3bd1cf67bd0a7bcfb0cb01f7b8ede98
Reviewed-on: https://chromium-review.googlesource.com/c/1451357
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#628981}
Removed the redundant ActivityStateEnum intdef definition and resolved
lint warnings in the ActivityState and ApplicationStatus classes.
Also updated the c++ enum conversion doc about the new IntDef
declaration style that was added in
https://crrev.com/14f477472e0e8612c98763b68e9a51bcae954c24
BUG=707186
Review-Url: https://codereview.chromium.org/2877743002
Cr-Commit-Position: refs/heads/master@{#471432}
This includes spelling mistakes like:
accomodate->accommodate
ommited->omitted
unuseable->unusable
dependant->dependent
enviroment->environment
preceed->precede
occurrance->occurrence
occurrances->occurrences
intergrated->integrated
altough->although
appriopriate->appropriate
corresponing->corresponding
dependecies->dependencies
leniant->lenient
overriden->overridden
persisten->persistent
specifyinhg->specifying
As well as capitalization changes like:
javascript->JavaScript
Webkit->WebKit
linux->Linux
A couple other minor things:
the the -> the
trybot -> try bot
etc.
Review-Url: https://codereview.chromium.org/2551513002
Cr-Commit-Position: refs/heads/master@{#436046}