We need to pass true to preserve the previous behaviour now.
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/94e457276df130575423e518181ece753734d6b9
commit 94e457276df130575423e518181ece753734d6b9
Author: Ramin Halavati <rhalavati@chromium.org>
Date: Tue Apr 13 12:27:51 2021 +0000
Remove default value of Profile::GetOffTheRecordProfile()
Removes the default value of the newly added |create_if_needed|
aregument of Profile::GetOffTheRecordProfile() and updates all use cases
with adding the new argument.
This CL does not change any behavior.
AX-Relnotes: n/a.
Bug: 1191315
A new RemoveSeparatorBeforeMenuItem() pure virtual method has been
added, so we need to override it from BraveMockRenderViewContextMenu.
Chromium change:
https://chromium.googlesource.com/chromium/src.git/+/3ac3f99cb82b34690d800a4dfdbefe2630060e39
commit 3ac3f99cb82b34690d800a4dfdbefe2630060e39
Author: Bruce Long <brlong@microsoft.com>
Date: Wed Mar 17 19:41:33 2021 +0000
Windows Spellcheck: Renderer process can hang retrieving suggestions
If there are a large number of misspellings in editable content (try
some 2000 characters of Lorem Ipsum) and you right click on a
misspelled word to bring up the context menu with suggested
corrections, the renderer process will stop responding if Windows
platform spellchecking is being used.
The main issue is that if suggestions have not already been retrieved
and cached, a synchronous IPC is made from the renderer process to the
browser process, which will not return until GetPerLanguageSuggestions
completes. If the platform spellchecker is still busy performing a text
check on all of the content, this can be a long wait.
A reason that the full text check may take a long time is that
suggestions are being retrieved for all misspelled words, even though
the user may never invoke the context menu to view them.
The fix is to postpone the retrieval of platform spellchecker
suggestions until SpellingMenuObserver::InitMenu is called on the
browser process side. This is done asynchronously following the same
pattern already used for the remote enhanced spellcheck service.
Placeholder menu items are added to the context menu, with one of them
presenting an animation while the retrieval is underway. The callback
when the retrieval completes updates the menu items with a combination
of suggestions from Hunspell (still retrieved on the renderer side)
and the platform.
Other fixes:
1) The renderer side method ContextMenuController::ShowContextMenu was
retrieving suggestions even for words not marked as misspelled,
passing an empty string even for Hunspell.
2) When the platform spellchecker performs a full text check in method
RequestTextCheckForAllLanguages, it was retrieving suggestions
as well. Now suggestions are only retrieved on demand. Since there
is some perf trade off between pre-caching suggestions and
retrieving them when the context menu is invoked, this part of the
fix is placed behind a feature flag:
WinRetrieveSuggestionsOnlyOnDemand (on by default)
Bug: 1150610
The "base/strings/string16.h" file does no longer exist and we need
to remove all remaining usages of that type with the one from the
C++ standard library instead, like Chromium upstream already did.
Also replaces no longer needed ASCIIToUTF16 and UTF8ToUTF16 calls used
with constant strings with `u` string literals.
Chromium change:
https://chromium.googlesource.com/chromium/src.git/+/7e1e44476bb361e95dc252d8428324a3feb89ecd
commit 7e1e44476bb361e95dc252d8428324a3feb89ecd
Author: Jan Wilken Dörrie <jdoerrie@chromium.org>
Date: Sun Mar 14 19:37:05 2021 +0000
[LSC] Remove base/strings/string16.h
This change removes base/strings/string16.h and remaining references to
it from the code base.
Bug: 1184339
Remove unnecessary includes header files and
add missing dependencies to the proper targets.
Additionally, this PR copies TranslateManagerTest from
upstream code to TranslateManagerUnittest in order to
avoid touching the upstream code. Then, this PR renames
the file to brave_translate_manager_unittest.cc.
Resolvesbrave/brave-browser#10613.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/b06b34efeb4d6648d9b014c7cf8bf5e73284b69c
commit b06b34efeb4d6648d9b014c7cf8bf5e73284b69c
Author: Ramin Halavati <rhalavati@chromium.org>
Date: Thu Sep 3 12:01:34 2020 +0000
Remove defaults from Profile::[Get/Has]OffTheRecordProfile().
The default values for OffTheRecord profile functions are removed and
all remaining use cases are replaced with [Get/Has]PrimaryOTRProfile.
The cases that need further update later are marked with TODO.
This CL does NOT change any behavior.
Bug: 1033903
It used to rely on gfx::ImageSkia, but that has changed upstream.
Also, remove the instances of AddSubMenuWith[StringIdAnd]Icon() that
relied on gfx::VectorIcon, no longer used upstream either.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/347b70900793a9a2361b717053be1ba223b15a98
commit 8c5491040715619cf8aa97671d0a44f9f4fdd0c5
Author: Richard Knoll <knollr@chromium.org>
Date: Tue Aug 25 17:24:07 2020 +0000
Fix icon size for Sharing context menu entries
Before crrev.com/c/2232978 the icon size was hardcoded in MenuItemView,
but that CL changed it to respect the incoming vector icon size. We
can't modify the vector source so we need to set a size when using it.
This also cleans up the duplicated *WithIcon methods and unifies them to
a single one taking a ui::ImageModel instead.
Bug: 1109643
Change-Id: Ib78f683ffee672668c79397122a0e3f5725f58f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2369181
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Richard Knoll <knollr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#801441}
Chromium change:
https://chromium.googlesource.com/chromium/src/+/8c4446dcf4ef6d9d58bb7f578f2946eb1638ddb8
commit 8c4446dcf4ef6d9d58bb7f578f2946eb1638ddb8
Author: Lukasz Anforowicz <lukasza@chromium.org>
Date: Wed Mar 11 22:16:42 2020 +0000
Splitting context_menu_params.h into separate browser VS common parts.
This CL takes //content/public/common/context_menu_params.h and splits
it into:
1. //content/public/common/*untrustworthy*_context_menu_params.h
which contains:
- UntrustworthyContextMenuParams
- CustomContextMenuContext (type of a field under
UntrustworthyContextMenuParams)
2. //content/public/*browser*/context_menu_params.h
which contains:
- ContextMenuParams
Bug: 534561
Chromium change:
https://chromium.googlesource.com/chromium/src/+/0d23b8d4b1e67392c80f8add8da47d14a22cac0c
commit 0d23b8d4b1e67392c80f8add8da47d14a22cac0c
Author: Evan Stade <estade@chromium.org>
Date: Wed Aug 14 17:13:41 2019 +0000
Add the ability to use a VectorIcon in MenuModel.
The color and size of the vector icon is controlled by the view, and is
not a property of the model.
This CL adds plumbing to RenderViewContextMenuModel, ui::MenuModel, and
views::MenuItemView, and updates the click-to-call context menu to use
the new abilities. The click-to-call menu icon is downsized from 20 to
16, which matches other context menu icons.
Just enough of the APIs are updated for purposes of the click to call
menu. More can be added as needed for other menus and icons.
Bug: 989353
one in BraveRenderViewContextMenu that does not add Ask Brave menu item.
Fixesbrave/brave-browser#1623
Also, overrides SpellingMenuObserver to remove a possible dangling menu
separator. Adds browser tests for spelling menu and spelling options
submenu that check that the "Ask Brave for suggestions" menu item is not
present.