| Index: ui/message_center/views/toast_contents_view.cc
|
| diff --git a/ui/message_center/views/toast_contents_view.cc b/ui/message_center/views/toast_contents_view.cc
|
| index e20b03e7f161de1d8f9499f8b5f1c14fde9a3d63..44dfcf410fee001e14df3c944e6540386a7398d4 100644
|
| --- a/ui/message_center/views/toast_contents_view.cc
|
| +++ b/ui/message_center/views/toast_contents_view.cc
|
| @@ -44,6 +44,9 @@ const int kFadeInOutDuration = 200;
|
| } // namespace.
|
|
|
| // static
|
| +const char ToastContentsView::kViewClassName[] = "ToastContentsView";
|
| +
|
| +// static
|
| gfx::Size ToastContentsView::GetToastSizeForView(const views::View* view) {
|
| int width = kNotificationWidth + view->GetInsets().width();
|
| return gfx::Size(width, view->GetHeightForWidth(width));
|
| @@ -168,6 +171,12 @@ void ToastContentsView::SetBoundsWithAnimation(gfx::Rect new_bounds) {
|
| bounds_animation_->Show();
|
| }
|
|
|
| +void ToastContentsView::ActivateToast() {
|
| + set_can_activate(true);
|
| + if (GetWidget())
|
| + GetWidget()->Activate();
|
| +}
|
| +
|
| void ToastContentsView::StartFadeIn() {
|
| // The decrement is done in OnBoundsAnimationEndedOrCancelled callback.
|
| if (collection_)
|
| @@ -315,6 +324,10 @@ void ToastContentsView::GetAccessibleNodeData(ui::AXNodeData* node_data) {
|
| node_data->role = ui::AX_ROLE_WINDOW;
|
| }
|
|
|
| +const char* ToastContentsView::GetClassName() const {
|
| + return kViewClassName;
|
| +}
|
| +
|
| void ToastContentsView::ClickOnNotification(
|
| const std::string& notification_id) {
|
| if (collection_)
|
|
|