diff --git a/branding_assets/icons/openbrowserlogo.png b/branding_assets/icons/openbrowserlogo.png index 247963d..033e1df 100644 Binary files a/branding_assets/icons/openbrowserlogo.png and b/branding_assets/icons/openbrowserlogo.png differ diff --git a/branding_assets/mac/AppIcon.icns b/branding_assets/mac/AppIcon.icns new file mode 100644 index 0000000..079d3dd Binary files /dev/null and b/branding_assets/mac/AppIcon.icns differ diff --git a/branding_assets/mac/Assets.car b/branding_assets/mac/Assets.car new file mode 100644 index 0000000..23b6d37 Binary files /dev/null and b/branding_assets/mac/Assets.car differ diff --git a/branding_assets/mac/Assets.xcassets/AppIcon.appiconset/appicon_1024.png b/branding_assets/mac/Assets.xcassets/AppIcon.appiconset/appicon_1024.png new file mode 100644 index 0000000..033e1df Binary files /dev/null and b/branding_assets/mac/Assets.xcassets/AppIcon.appiconset/appicon_1024.png differ diff --git a/branding_assets/mac/Assets.xcassets/AppIcon.appiconset/appicon_128.png b/branding_assets/mac/Assets.xcassets/AppIcon.appiconset/appicon_128.png new file mode 100644 index 0000000..c88bc31 Binary files /dev/null and b/branding_assets/mac/Assets.xcassets/AppIcon.appiconset/appicon_128.png differ diff --git a/branding_assets/mac/Assets.xcassets/AppIcon.appiconset/appicon_16.png b/branding_assets/mac/Assets.xcassets/AppIcon.appiconset/appicon_16.png new file mode 100644 index 0000000..d5c9122 Binary files /dev/null and b/branding_assets/mac/Assets.xcassets/AppIcon.appiconset/appicon_16.png differ diff --git a/branding_assets/mac/Assets.xcassets/AppIcon.appiconset/appicon_256.png b/branding_assets/mac/Assets.xcassets/AppIcon.appiconset/appicon_256.png new file mode 100644 index 0000000..d4a41bf Binary files /dev/null and b/branding_assets/mac/Assets.xcassets/AppIcon.appiconset/appicon_256.png differ diff --git a/branding_assets/mac/Assets.xcassets/AppIcon.appiconset/appicon_32.png b/branding_assets/mac/Assets.xcassets/AppIcon.appiconset/appicon_32.png new file mode 100644 index 0000000..111ee74 Binary files /dev/null and b/branding_assets/mac/Assets.xcassets/AppIcon.appiconset/appicon_32.png differ diff --git a/branding_assets/mac/Assets.xcassets/AppIcon.appiconset/appicon_512.png b/branding_assets/mac/Assets.xcassets/AppIcon.appiconset/appicon_512.png new file mode 100644 index 0000000..d7a0534 Binary files /dev/null and b/branding_assets/mac/Assets.xcassets/AppIcon.appiconset/appicon_512.png differ diff --git a/branding_assets/mac/Assets.xcassets/AppIcon.appiconset/appicon_64.png b/branding_assets/mac/Assets.xcassets/AppIcon.appiconset/appicon_64.png new file mode 100644 index 0000000..f4435c5 Binary files /dev/null and b/branding_assets/mac/Assets.xcassets/AppIcon.appiconset/appicon_64.png differ diff --git a/branding_assets/mac/Assets.xcassets/Icon.iconset/icon_256x256.png b/branding_assets/mac/Assets.xcassets/Icon.iconset/icon_256x256.png new file mode 100644 index 0000000..d4a41bf Binary files /dev/null and b/branding_assets/mac/Assets.xcassets/Icon.iconset/icon_256x256.png differ diff --git a/branding_assets/mac/Assets.xcassets/Icon.iconset/icon_256x256@2x.png b/branding_assets/mac/Assets.xcassets/Icon.iconset/icon_256x256@2x.png new file mode 100644 index 0000000..d7a0534 Binary files /dev/null and b/branding_assets/mac/Assets.xcassets/Icon.iconset/icon_256x256@2x.png differ diff --git a/branding_assets/mac/app.icns b/branding_assets/mac/app.icns index 2ec93f2..ba0fc0e 100644 Binary files a/branding_assets/mac/app.icns and b/branding_assets/mac/app.icns differ diff --git a/chromium/config/patches.list b/chromium/config/patches.list index 1bb567f..be4d80e 100644 --- a/chromium/config/patches.list +++ b/chromium/config/patches.list @@ -27,3 +27,9 @@ patches/openbrowser_integration/openbrowser-assistant-integration.patch # OpenBrowser product branding patches/branding/openbrowser_product_branding.patch + +# Startup page customization +patches/branding/startup_page.patch + +# Tab search URL replacement (chrome:// to openbrowser://) +patches/branding/tab_search_url_replacement.patch diff --git a/chromium/contributing.md b/chromium/contributing.md index b65bcc0..5186e46 100644 --- a/chromium/contributing.md +++ b/chromium/contributing.md @@ -56,16 +56,17 @@ fetch --nohooks chromium # 5. Checkout the correct version cd src -git checkout 144.0.7543.1 +git checkout 146.0.7647.0 -# 6. Sync dependencies -gclient sync -D +# 6. Pin version in .gclient (recommended for persistence) +cd .. +# Edit .gclient and add: "revision": "f2722c85cc7f44f035bfc91b40406883e8f3b07d" -# 7. Run hooks -gclient runhooks +# 7. Sync dependencies (this also runs hooks automatically) +gclient sync --with_branch_heads --with_tags -r src@f2722c85cc7f44f035bfc91b40406883e8f3b07d # 8. Apply OpenBrowser patches and assets -cd ../../openbrowser +cd ../openbrowser bash chromium/scripts/setup_openbrowser.sh # 9. Build Chromium @@ -73,7 +74,7 @@ cd ../chromium/src autoninja -C out/fast chrome # 10. Run OpenBrowser -./out/fast/OpenBrowser.app/Contents/MacOS/OpenBrowser +./out/fast/OpenBrowser.app/Contents/MacOS/OpenBrowser ``` ## Detailed Setup @@ -135,21 +136,42 @@ fetch --nohooks chromium #### 4.2. Checkout Correct Version -OpenBrowser is based on Chromium version **144.0.7543.1**: +OpenBrowser is based on Chromium version **146.0.7647.0**: ```bash cd src -git checkout 144.0.7543.1 +git checkout 146.0.7647.0 ``` -#### 4.3. Sync Dependencies +#### 4.3. Pin Version in .gclient + +To ensure gclient syncs to the exact version, add the revision to your `.gclient` file: ```bash -# Sync all dependencies for this version -gclient sync -D +cd .. +``` -# Run build hooks -gclient runhooks +Edit `/Users/user/OpenBrowser/chromium/.gclient` and add the revision field to the solutions array: + +```python +solutions = [ + { + "name": "src", + "url": "https://chromium.googlesource.com/chromium/src.git", + "managed": False, + "custom_deps": {}, + "custom_vars": {}, + "revision": "f2722c85cc7f44f035bfc91b40406883e8f3b07d", # Add this line + }, +] +``` + +#### 4.4. Sync Dependencies + +```bash +# Sync dependencies to exact revision f2722c85cc7f44f035bfc91b40406883e8f3b07d +# This automatically runs hooks (downloads Rust, Clang, etc.) +gclient sync --with_branch_heads --with_tags -r src@f2722c85cc7f44f035bfc91b40406883e8f3b07d ``` ### 5. Apply OpenBrowser Patches and Assets @@ -364,8 +386,10 @@ bash copy_extension_to_resources.sh ```bash cd chromium/src -git checkout 144.0.7543.1 -gclient sync -D +git checkout 146.0.7647.0 +cd .. +# Edit .gclient and add: "revision": "f2722c85cc7f44f035bfc91b40406883e8f3b07d" +gclient sync --with_branch_heads --with_tags -r src@f2722c85cc7f44f035bfc91b40406883e8f3b07d ``` ### Permission Errors diff --git a/chromium/patches/branding/startup_page.patch b/chromium/patches/branding/startup_page.patch new file mode 100644 index 0000000..155ff4c --- /dev/null +++ b/chromium/patches/branding/startup_page.patch @@ -0,0 +1,15 @@ +diff --git a/chrome/browser/ui/startup/startup_tab_provider.cc b/chrome/browser/ui/startup/startup_tab_provider.cc +index fadcfd93402bc..c32a52a912873 100644 +--- a/chrome/browser/ui/startup/startup_tab_provider.cc ++++ b/chrome/browser/ui/startup/startup_tab_provider.cc +@@ -310,6 +310,10 @@ StartupTabs StartupTabProviderImpl::GetInitialPrefsTabsForState( + + StartupTabs tabs; + if (is_first_run) { ++ // OpenBrowser: Open chrome://intro and OpenBrowser website on first run ++ tabs.emplace_back(GURL(chrome::kChromeUIIntroURL)); ++ tabs.emplace_back(GURL("http://openbrowser.tech")); ++ + tabs.reserve(first_run_tabs.size()); + for (GURL url : first_run_tabs) { + if (url.host() == kNewTabUrlHost) { diff --git a/chromium/patches/branding/tab_search_url_replacement.patch b/chromium/patches/branding/tab_search_url_replacement.patch new file mode 100644 index 0000000..154b889 --- /dev/null +++ b/chromium/patches/branding/tab_search_url_replacement.patch @@ -0,0 +1,46 @@ +diff --git a/chrome/browser/resources/tab_search/tab_search_item.ts b/chrome/browser/resources/tab_search/tab_search_item.ts +index c155876d9e644..6d4c6d1fd283e 100644 +--- a/chrome/browser/resources/tab_search/tab_search_item.ts ++++ b/chrome/browser/resources/tab_search/tab_search_item.ts +@@ -235,14 +235,19 @@ export class TabSearchItemElement extends TabSearchItemBase { + if (element) { + const highlightRanges = + data.highlightRanges ? data.highlightRanges[path] : undefined; +- highlightText(element, deepGet(data, path), highlightRanges); ++ let textValue = deepGet(data, path); ++ // Replace chrome:// with openbrowser:// in titles ++ if (textValue && typeof textValue === 'string') { ++ textValue = textValue.replace(/chrome:\/\//g, 'openbrowser://'); ++ } ++ highlightText(element, textValue, highlightRanges); + } + }); + +- // Show chrome:// if it's a chrome internal url ++ // Show openbrowser:// if it's a chrome internal url + const protocol = new URL(normalizeURL(data.tab.url.url)).protocol; + if (protocol === 'chrome:') { +- this.$.secondaryText.prepend(document.createTextNode('chrome://')); ++ this.$.secondaryText.prepend(document.createTextNode('openbrowser://')); + } + } + +diff --git a/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc b/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc +index 34fc92e4a9b79..d265d403d089c 100644 +--- a/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc ++++ b/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc +@@ -573,8 +573,13 @@ void TabHoverCardBubbleView::UpdateCardContent(const Tab* tab) { + // Hide the domain when necessary. This leaves an empty space in the + // card, but this scenario is very rare. Also, shrinking the card to + // remove the space would result in visual noise, so we keep it simple. ++ GURL formatted_url = display_url; ++#if BUILDFLAG(OPENBROWSER_BUILD) ++ // Rewrite chrome:// to openbrowser:// for display ++ formatted_url = openbrowser::GetDisplayURLForInternal(display_url); ++#endif + domain = url_formatter::FormatUrl( +- display_url, ++ formatted_url, + url_formatter::kFormatUrlOmitDefaults | + url_formatter::kFormatUrlOmitHTTPS | + url_formatter::kFormatUrlOmitTrivialSubdomains |