-
Notifications
You must be signed in to change notification settings - Fork 900
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
[Tabs]: Add BraveTabFeatures #27322
base: master
Are you sure you want to change the base?
[Tabs]: Add BraveTabFeatures #27322
Conversation
8ba47b0
to
a0e8135
Compare
browser/sources.gni
Outdated
"//brave/browser/android/brave_tab_features_android.cc", | ||
"//brave/browser/android/brave_tab_features_android.h", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: this is what upstream does. I imagine they'll change it at some point in the future but I think its good to match them for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's probably because there is a circular dependency in theirs? If we can avoid adding new sources to sources.gni directly, we should
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can put these in their own target, but I'll need to add a dep on //chrome/browser/android
and allow_circular_includes_from
- is that okay?
public: | ||
TabFeaturesAndroid(content::WebContents* web_contents, Profile* profile); | ||
- ~TabFeaturesAndroid(); | ||
+ virtual ~TabFeaturesAndroid(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should rename the base class so we don't need this patch. So change TabFeaturesAndroid -> TabFeaturesAndroid_ChromiumImpl and call our subclass TabFeaturesAndroid so there are no base class pointers? If we do that here we should do the same for TabFeatures for consistency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually we can still name ours BraveTabFeatures*
and typedef/using to also be TabFeatures*
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think its better to subclass here - that way if upstream adds some new public methods (highly likely, judging by the look of TabFeatures
on desktop) it won't break our overrides.
Additionally if we do that we'll need a std::unique_ptr<TabFeaturesAndroid_ChromiumImpl>
on our class to ensure everything its instantiating still exists?
8cde2ed
to
e8d84d5
Compare
e8d84d5
to
452ed92
Compare
Resolves brave/brave-browser#43437
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
wikinpm run presubmit
wiki,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan:
N/A - no changes to existing behavior