commit | c4b10123eaea5c53f3db3fa8f4e4108d9fcf87f5 | [log] [tgz] |
---|---|---|
author | Tessa Nijssen <tnijssen@google.com> | Mon Jun 25 20:28:08 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Mon Jun 25 20:28:08 2018 |
tree | 3a37e102de97db88fa3760575a5844d4b93c28e4 | |
parent | 83e8d1a9dcc9e5e45a0a643f690184e1b31af325 [diff] |
Reland [Mac] Created Suggested Text Touch Bar When text is selected in a textfield, the touch bar displays options to replace the selected text. Clicking on one of the options will replace the selected text with the selected option. Currently, there are no functional unit tests for the suggested text touch bar. As functionality is fleshed out, unit tests will be created. A new folder (chrome/browser/ui/cocoa/touchbar) was created to house all files related to the Mac touch bar. The CreditCardAutofillTouchBarController files and the WebTextfieldTouchBarController files were moved to this new folder. Dependencies and header guards were updated to reflect this change. New files: - suggested_text_touch_bar_controller.h - suggested_text_touch_bar_controller.mm - suggested_text_touch_bar_controller_browsertest.mm Moved files: - credit_card_autofill_touch_bar_controller.h - credit_card_autofill_touch_bar_controller.mm - credit_card_autofill_touch_bar_controller_unittest.mm - web_textfield_touch_bar_controller.h - web_textfield_touch_bar_controller.mm BUILD files were updated to accommodate the change in location for the moved files and to include the new files. RenderWidgetHostViewMac now informs its RenderWidgetHostDelegate (WebContentsImpl) when RenderWidgetHostViewMac::OnTextSelectionChanged() is called. WebContentsImpl then notifies its observers that the text selection changed. A feature flag SuggestedTextTouchBar was created and added to chrome://about so that the new touch bar is disabled by default and can be enabled via command line or chrome://flags with the flag This CL includes the following browser tests for SuggestedTextTouchBarController: - SetTextTest - TouchBarTest - TextSelectionChangedTest This is a reland of crrev/c/1096443 with the following addition: A check was added to see if the SuggestedTextTouchBar feature flag is enabled around the initialization of SuggestedTextTouchBarController and its WebContentsObserver. This way, the controller and observer are not initialized unless they are actually going to be used. Bug: 717553 Change-Id: Ib591a6791700f79f8f683ee3f6c629f00b612cb0 Reviewed-on: https://chromium-review.googlesource.com/1101306 Reviewed-by: Ehsan Karamad <ekaramad@chromium.org> Reviewed-by: Avi Drissman <avi@chromium.org> Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org> Reviewed-by: Sarah Chan <spqchan@chromium.org> Commit-Queue: Tessa Nijssen <tnijssen@google.com> Cr-Commit-Position: refs/heads/master@{#570158}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .