forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NotifierCollision: Do not intercept keyboard events on popup collection
Currently keyboard events are intercepted by the tray bubble view (reroute_event_handler_), which breaks inline reply on popup notifications if they are shown with the tray bubble. Thus, we need to make sure that events happen inside the popup collection do not get blocked when handling in reroute_event_handler_. Fixed: b:346641561 Change-Id: I6b9148a0e4f86298399541855257c32a1ced9742 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5798844 Reviewed-by: Jiaming Cheng <[email protected]> Commit-Queue: Andre Le <[email protected]> Cr-Commit-Position: refs/heads/main@{#1344378}
- Loading branch information
Andre Le
authored and
Chromium LUCI CQ
committed
Aug 20, 2024
1 parent
e71ac4e
commit 16f03a1
Showing
6 changed files
with
82 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,8 @@ namespace ash { | |
std::unique_ptr<message_center::Notification> CreateSimpleNotification( | ||
const std::string& id, | ||
bool has_image, | ||
const GURL& origin_url) { | ||
const GURL& origin_url, | ||
bool has_inline_reply) { | ||
message_center::NotifierId notifier_id; | ||
notifier_id.profile_id = "[email protected]"; | ||
notifier_id.type = message_center::NotifierType::WEB_PAGE; | ||
|
@@ -28,6 +29,12 @@ std::unique_ptr<message_center::Notification> CreateSimpleNotification( | |
origin_url, notifier_id, message_center::RichNotificationData(), | ||
new message_center::NotificationDelegate()); | ||
|
||
if (has_inline_reply) { | ||
message_center::ButtonInfo button_info(u"test button"); | ||
button_info.placeholder = std::u16string(); | ||
notification->set_buttons({button_info}); | ||
} | ||
|
||
if (has_image) { | ||
notification->SetImage(gfx::test::CreateImage(320, 300)); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters