browser->OpenGURL(url, WindowOpenDisposition::NEW_FOREGROUND_TAB);nit: NavigateToUrl?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
This CL is ready, please help to review, thanks.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
browser->OpenGURL(url, WindowOpenDisposition::NEW_FOREGROUND_TAB);Yu Henit: NavigateToUrl?
fixed
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
browser->OpenGURL(url, WindowOpenDisposition::NEW_FOREGROUND_TAB);Maybe
```
content::OpenURLParams params(url, content::Referrer(),
WindowOpenDisposition::NEW_FOREGROUND_TAB,
ui::PAGE_TRANSITION_LINK, false);
browser->GetBrowserForMigrationOnly->OpenURL(params, /*navigation_handle_callback=*/{});
```
`browser->OpenGURL(url, WindowOpenDisposition::NEW_FOREGROUND_TAB);` do not look like inconsistent with
```
content::OpenURLParams params(url, content::Referrer(),
WindowOpenDisposition::NEW_FOREGROUND_TAB,
ui::PAGE_TRANSITION_LINK, false);
browser->OpenURL(params, /*navigation_handle_callback=*/{});
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
browser->OpenGURL(url, WindowOpenDisposition::NEW_FOREGROUND_TAB);Maybe
```
content::OpenURLParams params(url, content::Referrer(),
WindowOpenDisposition::NEW_FOREGROUND_TAB,
ui::PAGE_TRANSITION_LINK, false);
browser->GetBrowserForMigrationOnly->OpenURL(params, /*navigation_handle_callback=*/{});
```
`browser->OpenGURL(url, WindowOpenDisposition::NEW_FOREGROUND_TAB);` do not look like inconsistent with
```
content::OpenURLParams params(url, content::Referrer(),
WindowOpenDisposition::NEW_FOREGROUND_TAB,
ui::PAGE_TRANSITION_LINK, false);
browser->OpenURL(params, /*navigation_handle_callback=*/{});
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
lgtm - Hidehiko could you ptal
Change the return type of FindBrowserWithActiveWindow() from Browser* to
BrowserWindowInterface* at each call site. Replace Browser-specific
member access patterns with their BrowserWindowInterface equivalents:
browser->tab_strip_model() → browser->GetTabStripModel()
browser->profile() → browser->GetProfile() browser->is_type_normal() →
browser->GetType() == BrowserWindowInterface::TYPE_NORMAL
NavigateToUrl(browser, url) → browser->OpenGURL(url, disposition) Update
#include directives accordingly, adding browser_window_interface.h and
removing unnecessary includes like browser_list.h / browser_window.h
where applicable. Add //chrome/browser/ui/browser_window dependency to
BUILD.gn for the new_window target. This is part of the ongoing Bedrock
effort to decouple components from the concrete Browser type and program
against the BrowserWindowInterface abstraction, improving modularity and
testability.
nit: Thanks for justifying the comment to gerrit's column requirement!
Could we add some additional formatting / newlines to make the description easier to read (helps with git blames down the road)
browser->OpenGURL(url, WindowOpenDisposition::NEW_FOREGROUND_TAB);Yu HeMaybe
```
content::OpenURLParams params(url, content::Referrer(),
WindowOpenDisposition::NEW_FOREGROUND_TAB,
ui::PAGE_TRANSITION_LINK, false);
browser->GetBrowserForMigrationOnly->OpenURL(params, /*navigation_handle_callback=*/{});
```
`browser->OpenGURL(url, WindowOpenDisposition::NEW_FOREGROUND_TAB);` do not look like inconsistent with
```
content::OpenURLParams params(url, content::Referrer(),
WindowOpenDisposition::NEW_FOREGROUND_TAB,
ui::PAGE_TRANSITION_LINK, false);
browser->OpenURL(params, /*navigation_handle_callback=*/{});
```
I think the same.
Took a look and BrowserWindowInterface::OpenGURL does seem like a match for the params as constructed here so checks out by me.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +1 |
Change the return type of FindBrowserWithActiveWindow() from Browser* to
BrowserWindowInterface* at each call site. Replace Browser-specific
member access patterns with their BrowserWindowInterface equivalents:
browser->tab_strip_model() → browser->GetTabStripModel()
browser->profile() → browser->GetProfile() browser->is_type_normal() →
browser->GetType() == BrowserWindowInterface::TYPE_NORMAL
NavigateToUrl(browser, url) → browser->OpenGURL(url, disposition) Update
#include directives accordingly, adding browser_window_interface.h and
removing unnecessary includes like browser_list.h / browser_window.h
where applicable. Add //chrome/browser/ui/browser_window dependency to
BUILD.gn for the new_window target. This is part of the ongoing Bedrock
effort to decouple components from the concrete Browser type and program
against the BrowserWindowInterface abstraction, improving modularity and
testability.
nit: Thanks for justifying the comment to gerrit's column requirement!
Could we add some additional formatting / newlines to make the description easier to read (helps with git blames down the road)
Sure.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[bedrock] FindBrowserWithActiveWindow() function call point refactoring
This CL updates 9 files across various Chrome browser components to
transition from the concrete Browser class to the BrowserWindowInterface
abstraction. This is part of the ongoing Bedrock effort to improve
modularity and testability by decoupling UI components from the
monolithic Browser type.
Key Changes:
- Updated FindBrowserWithActiveWindow() to return BrowserWindowInterface* instead of Browser*.
- Replaced direct Browser member access with interface-compatible methods:
* browser->tab_strip_model() -> browser->GetTabStripModel()
* browser->profile() -> browser->GetProfile()
* browser->is_type_normal() ->
browser->GetType() == BrowserWindowInterface::Type::TYPE_NORMAL
* NavigateToUrl(browser, url) -> browser->OpenGURL(url, disposition)
- Updated #include directives to add browser_window_interface.h and
pruned unnecessary includes like browser_list.h and browser_window.h.
- Added //chrome/browser/ui/browser_window dependency to the
new_window target in BUILD.gn.
Impacted Components:
- Tab lifecycle management
- New window client
- Autofill payments bubble controllers
- History menu
- Relaunch notification
- Shopping UI
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |