Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cobalt_shell_apk target #4286

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions content/shell/android/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,16 @@ content_shell_apk_tmpl("content_shell_apk") {
command_line_flags_file = "content-shell-command-line"
}

content_shell_apk_tmpl("cobalt_shell_apk") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add this under /cobalt directory somewhere please ?

target_type = "android_apk"
apk_name = "CobaltShell"
android_manifest = content_shell_manifest
android_manifest_dep = ":content_shell_manifest"
shared_libraries = [ ":libcontent_shell_content_view" ]
command_line_flags_file = "content-shell-command-line"
}


content_shell_apk_tmpl("content_shell_test_apk") {
target_type = "instrumentation_test_apk"
apk_name = "ContentShellTest"
Expand Down
12 changes: 7 additions & 5 deletions content/shell/browser/shell_content_browser_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -300,13 +300,15 @@ std::unique_ptr<PrefService> CreateLocalState() {
} // namespace

std::string GetShellUserAgent() {
if (base::FeatureList::IsEnabled(blink::features::kFullUserAgent))
return GetShellFullUserAgent();
// TODO: we need a Cobalt UA to load Kabuki. Revert the change here when we figure out the proper UA format and injection method.
return "Mozilla/5.0 (LINUX) Cobalt/24.lts.10.1032622-gold (unlike Gecko) v8/8.8.278.8-jit gles Evergreen/4.10.2 Evergreen-Full Evergreen-Uncompressed Starboard/15, odm_TV_chipset_2024/fw-01-23.45 (brand, model)";
// if (base::FeatureList::IsEnabled(blink::features::kFullUserAgent))
// return GetShellFullUserAgent();

if (base::FeatureList::IsEnabled(blink::features::kReduceUserAgent))
return GetShellReducedUserAgent();
// if (base::FeatureList::IsEnabled(blink::features::kReduceUserAgent))
// return GetShellReducedUserAgent();

return GetShellFullUserAgent();
// return GetShellFullUserAgent();
}

std::string GetShellLanguage() {
Expand Down
Loading