[Cast Receiver] Boostrap Protos Integration [chromium/src : main]

0 views
Skip to first unread message

Richard Nichols (Gerrit)

unread,
9:45 AM (1 hour ago) 9:45 AM
to Dewita Sonya, Cooper Chiou, Simeon Anfinrud, Shawn Quereshi, Luke Halliwell, Chromium LUCI CQ, chromium...@chromium.org, halliwe...@chromium.org, inca-eng...@google.com
Attention needed from Dewita Sonya, Luke Halliwell, Shawn Quereshi and Simeon Anfinrud

Richard Nichols added 26 comments

Commit Message
Line 7, Patchset 18 (Latest):[Cast Receiver] Boostrap Protos Integration
Richard Nichols . unresolved

Please fix this WARNING reported by Spellchecker: "Boostrap" is a possible misspelling of "Bootstrap".

To bypass Spellchecker, ad...

"Boostrap" is a possible misspelling of "Bootstrap".

To bypass Spellchecker, add a footer with DISABLE_SPELLCHECKER

File chromecast/cast_core/runtime/browser/core_conversions.cc
Line 63, Patchset 18 (Latest):bool GetExtendedInputSupported(
const cast::common::ApplicationConfig& core_config) {
const auto& extra_features = core_config.extra_features().entries();
auto it =
std::ranges::find(extra_features, feature::kCastCoreRendererFeatures,
&cast::common::Dictionary::Entry::key);
if (it == extra_features.end()) {
return false;
}

if (!it->value().has_dictionary()) {
return false;
}

const auto& entries = it->value().dictionary().entries();
auto feature_it = std::ranges::find(entries, feature::kExtendedInputSupported,
&cast::common::Dictionary::Entry::key);
return feature_it != entries.end();
}
Richard Nichols . unresolved

I don't get why this cl has overlap with https://chromium-review.git.corp.google.com/c/chromium/src/+/7962739

did you mean to chain commits together and upload individual commits? That'd help with the lint/warning about a large cl.

File components/cast_receiver/browser/streaming_runtime_application_unittest.cc
Line 27, Patchset 18 (Latest):class MockEmbedderApplication : public EmbedderApplication {
public:
MOCK_METHOD0(NotifyApplicationStarted, void());
MOCK_METHOD2(NotifyApplicationStopped, void(ApplicationStopReason, int32_t));
MOCK_METHOD1(NotifyMediaPlaybackChanged, void(bool));
MOCK_METHOD1(GetAllBindings, void(GetAllBindingsCallback));
MOCK_METHOD0(GetMessagePortService, MessagePortService*());
MOCK_METHOD0(GetWebContents, content::WebContents*());
MOCK_METHOD0(GetContentWindowControls, ContentWindowControls*());
MOCK_METHOD0(GetStreamingConfigManager, StreamingConfigManager*());
};

class MockMessagePortService : public MessagePortService {
public:
MOCK_METHOD2(ConnectToPortAsync,
void(std::string_view,
std::unique_ptr<cast_api_bindings::MessagePort>));
MOCK_METHOD1(RegisterOutgoingPort,
uint32_t(std::unique_ptr<cast_api_bindings::MessagePort>));
MOCK_METHOD2(RegisterIncomingPort,
void(uint32_t, std::unique_ptr<cast_api_bindings::MessagePort>));
MOCK_METHOD1(Remove, void(uint32_t));
};

class MockContentWindowControls : public ContentWindowControls {
public:
MOCK_METHOD0(ShowWindow, void());
MOCK_METHOD0(HideWindow, void());
MOCK_METHOD0(EnableTouchInput, void());
MOCK_METHOD0(DisableTouchInput, void());
};
Richard Nichols . unresolved

are these useful in other tests? would it be good to have them in a header instead?

File components/cast_receiver/proto/action_invocation.proto
Line 18, Patchset 18 (Latest): // The user id representing the user that the application should be launched
// as. On Android, this is the ID returned by UserHandle.getIdentifier().
Richard Nichols . unresolved

all things that wind up in chromium will be public. I'm not sure if the exo portion is also part of aosp or not. If it isn't, you probably don't want this type of comment here.

basically, be careful about any comments/commit messages/etc that wind up going public at one point or another.

Line 34, Patchset 18 (Latest): // StatusBarNotification.getKey().hashCode().
Richard Nichols . unresolved

this may change in the future I imagine. If this is removed the comment name is pretty low value as it just repeats the name of the field.

Line 44, Patchset 18 (Latest): string data = 3;
Richard Nichols . unresolved

if this is a data payload, it is proto? json? "unknown" - should it be bytes instead of string?

Line 50, Patchset 18 (Latest): // The hashcode of the StatusBarNotification for detecting if the notification
Richard Nichols . unresolved

why is a hash being stored in a string? how many bits of entropy do you need to determine uniqueness?

File components/cast_receiver/proto/app_invocation.proto
Line 18, Patchset 18 (Latest): // The user id representing the user that the application should be launched
// as. On Android, this is the ID returned by UserHandle.getIdentifier().
Richard Nichols . unresolved

whatever happens with the prior android comment do the same here.

Line 23, Patchset 18 (Latest): // The package name of the application to be launched.
string package_name = 2;
Richard Nichols . unresolved

is this a reverse launch as in the receiver launching something on the sender device? I vaguely recall one of the features for Cast being that.

Basically, I don't get why we have what amounts to an android package name here when we're already in chromium and can only handle web urls and not package names.

If this is the first assumption this file could use some clarifying, if it's the second you probably need to trim off the protos values or include a link/reference to where it is copied from and what it needs to stay in sync with.

File components/cast_receiver/proto/display_info.proto
Line 31, Patchset 18 (Latest): int32 height_px = 2;
Richard Nichols . unresolved

in rendering we usually care about the offsets too. Is there any chance that there needs to be a buffer space on the window (as in, we're not starting the render from 0,0 and instead some other biased offset).

may be overkill, but I'm always a fan of trying to stick named types in that're as close to a normal gpu rep for graphics code as we can. (e.g. vec2, vec3, vec4)

Line 41, Patchset 18 (Latest): // The device's density.
Richard Nichols . unresolved

which device?

Line 46, Patchset 18 (Latest): // game is launched or a video is played in full screen in Youtube), no
Richard Nichols . unresolved

I don't think we should be referencing a single product type here. Also this sounds like Youtube has a commitment to this feature already and/or that it's already in. Which they probably don't have.

File components/cast_receiver/proto/exo_bootstrap.proto
Line 31, Patchset 18 (Latest): // Error information if bootstrapping failed.
Richard Nichols . unresolved

this and the above comment are self explanatory based on the field name.

Line 38, Patchset 18 (Latest): UID uid = 1;
Richard Nichols . unresolved

remove the need for a comment, just label the field `device_uid`. ideally _what_ device.

Line 41, Patchset 18 (Latest): repeated ResolutionInfo resolutions = 2;
Richard Nichols . unresolved

similarly, `supported_resolutions` makes reading the code clearer, rather than having to look at comments which may be a royal pain to even look up depending on how the code is being investigated. e.g. if we're stuck using vscode to look at src finding where a definition is can be extremely tedious.

Line 43, Patchset 18 (Latest): // Supported input simulation capabilities (Touch, Keyboard, Mouse).
Richard Nichols . unresolved

to..? This may just be me not knowing exo. is this the receiver/sender input capabilities? allowed input capabilities? what's it doing. whatever the answer is, rename the field to have the intent.

Line 62, Patchset 18 (Latest): int32 version = 3;
Richard Nichols . unresolved

`bootstrap_protocol_version`/`bootstrap_version`?

Line 71, Patchset 18 (Latest): NO_CDM_ASSOCIATION_ERROR = 1;
Richard Nichols . unresolved

I hate it, but protos generally don't handle enum class like we'd want in C++. Typically we have them prefixed with what enum type name too.

File components/cast_receiver/proto/launch_info.proto
Line 32, Patchset 18 (Latest): // Deprectated field ActionInvocation is unused as we launch notifications
Richard Nichols . unresolved

Please fix this WARNING reported by Spellchecker: "Deprectated" is a possible misspelling of "Deprecated".

To bypass Spellchecker...

"Deprectated" is a possible misspelling of "Deprecated".

To bypass Spellchecker, add a footer with DISABLE_SPELLCHECKER

Line 34, Patchset 18 (Latest): ActionInvocation action_invocation = 2 [deprecated = true];
Richard Nichols . unresolved

if it's deprecated why are we including it? where is this copied from?

Line 44, Patchset 18 (Latest): bool any_accessibility_features_enabled = 6;
Richard Nichols . unresolved

do we not need to care about what accessibility feature is enabled?

Line 46, Patchset 18 (Latest): // New field containing client details.
Richard Nichols . unresolved

low value comment.

Line 63, Patchset 18 (Latest): BootstrappingSystem system = 1;
Richard Nichols . unresolved

`system_type` + rename enum to match (and fix enum not including `BOOTSTRAPPING_`

Line 69, Patchset 18 (Latest): string user_agent = 3;
Richard Nichols . unresolved

is this _actually_ needed, or is this for metrics? I know there's always a pile of PII stuff. does this need some PII consideration or are we fine?

File components/cast_receiver/proto/uid.proto
Line 18, Patchset 18 (Latest):message UID {
Richard Nichols . unresolved

what's wrong with using a uuid instead?

Line 28, Patchset 18 (Latest): SIMPLE_RANDOM = 2;
Richard Nichols . unresolved

is there any functional reason why we shouldn't stick to 1 random type? what happens if they're mixed? are there some statistical guarantees we need to be worried about here?

Open in Gerrit

Related details

Attention is currently required from:
  • Dewita Sonya
  • Luke Halliwell
  • Shawn Quereshi
  • Simeon Anfinrud
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I36dba81ffceb98af2706592d08b40806ee89736a
Gerrit-Change-Number: 8022445
Gerrit-PatchSet: 18
Gerrit-Owner: Dewita Sonya <dso...@google.com>
Gerrit-Reviewer: Dewita Sonya <dso...@google.com>
Gerrit-Reviewer: Luke Halliwell <hall...@chromium.org>
Gerrit-Reviewer: Richard Nichols <rkni...@google.com>
Gerrit-Reviewer: Shawn Quereshi <sha...@google.com>
Gerrit-Reviewer: Simeon Anfinrud <san...@chromium.org>
Gerrit-CC: Cooper Chiou <coope...@google.com>
Gerrit-Attention: Simeon Anfinrud <san...@chromium.org>
Gerrit-Attention: Shawn Quereshi <sha...@google.com>
Gerrit-Attention: Luke Halliwell <hall...@chromium.org>
Gerrit-Attention: Dewita Sonya <dso...@google.com>
Gerrit-Comment-Date: Wed, 08 Jul 2026 13:45:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages