Brian R. Bondy a8214ba5c9 Wire up BraveOrigin startup dialog to browser launch (#34555)
* Add BraveOrigin startup dialog view

Adds BraveOriginStartupView, a standalone modal window that hosts
the startup WebUI dialog. Manages system profile creation, web
contents lifecycle, and buy window navigation.

* Address review feedback for BraveOrigin startup view

- Use WidgetDelegate instead of deprecated WidgetDelegateView
- Use WebView(profile) + LoadInitialURL instead of manual WebContents
- Remove redundant GetAccessibleWindowTitle/CalculatePreferredSize overrides
- Simplify SetTitle to use message ID directly
- Fix g_startup_view leak with unique_ptr + cleanup in WindowClosing
- Remove chromium_src WidgetDelegateView friend class override

* Wire up BraveOrigin startup dialog to browser launch

Intercepts StartupBrowserCreator::Start to show the purchase
validation dialog before any browser window opens. Blocks Mac
app commands while the dialog is showing.

* Address review feedback and add test coverage for startup view

Refactor BraveOriginStartupView to use a Delegate interface instead of
raw callbacks, making the code more testable and readable. Move the
--test-type guard into ShouldShowDialog() and add
SetShouldShowDialogForTesting() for browser test support. Use
__VA_ARGS__ in the startup_browser_creator.h macros. Add unit tests
covering ShouldShowDialog with various pref/SKU credential states.

* Add browser tests for BraveOrigin startup dialog

* Add integration tests for StartupBrowserCreator::Start override

Exercise the real startup interception logic that shows the
BraveOrigin dialog, covering both validation and close paths.
2026-03-13 08:25:32 -04:00
2026-03-03 14:24:22 +00:00
2026-03-13 12:03:03 +00:00
2026-03-13 12:03:03 +00:00
2026-03-13 12:03:03 +00:00

Brave Core

Brave Core is a set of changes, APIs, and scripts used for customizing Chromium to make the Brave browser. Please also check https://github.com/brave/brave-browser

Follow @brave on Twitter for important announcements.

Resources

Community

You can ask questions and interact with the community in the following locations:

S
Description
No description provided
Readme MPL-2.0
3.8 GiB
Languages
C++ 36.9%
HTML 31.6%
Swift 9.4%
TypeScript 9%
Java 4.8%
Other 8.1%