| Index: ui/message_center/views/custom_notification_view.cc
|
| diff --git a/ui/message_center/views/custom_notification_view.cc b/ui/message_center/views/custom_notification_view.cc
|
| index 91b894673e90f13db892db6b1a47cf40f8714a49..780c2b50c98ce5c5ed85e4d4d508c51927856240 100644
|
| --- a/ui/message_center/views/custom_notification_view.cc
|
| +++ b/ui/message_center/views/custom_notification_view.cc
|
| @@ -6,6 +6,9 @@
|
|
|
| #include <algorithm>
|
|
|
| +#include "ui/base/ime/input_method.h"
|
| +#include "ui/base/ime/text_input_client.h"
|
| +#include "ui/base/ime/text_input_type.h"
|
| #include "ui/gfx/geometry/size.h"
|
| #include "ui/message_center/message_center_style.h"
|
| #include "ui/views/background.h"
|
| @@ -122,4 +125,23 @@ void CustomNotificationView::OnPaint(gfx::Canvas* canvas) {
|
| focus_painter_.get());
|
| }
|
|
|
| +bool CustomNotificationView::OnKeyPressed(const ui::KeyEvent& event) {
|
| + if (contents_view_) {
|
| + ui::InputMethod* input_method = contents_view_->GetInputMethod();
|
| + if (input_method) {
|
| + ui::TextInputClient* text_input_client =
|
| + input_method->GetTextInputClient();
|
| + if (text_input_client &&
|
| + text_input_client->GetTextInputType() != ui::TEXT_INPUT_TYPE_NONE) {
|
| + // If the focus is in an edit box, we skip the special key handling for
|
| + // back space and return keys. So that these key events are sent to the
|
| + // arc container correctly without being handled by the message center.
|
| + return false;
|
| + }
|
| + }
|
| + }
|
| +
|
| + return MessageView::OnKeyPressed(event);
|
| +}
|
| +
|
| } // namespace message_center
|
|
|