| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/arc/notification/arc_custom_notification_view.h" | 5 #include "ui/arc/notification/arc_custom_notification_view.h" |
| 6 | 6 |
| 7 #include "ash/wm/window_util.h" | 7 #include "ash/wm/window_util.h" |
| 8 #include "base/auto_reset.h" | 8 #include "base/auto_reset.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "components/exo/notification_surface.h" | 10 #include "components/exo/notification_surface.h" |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 return owner_->close_button_->HasFocus(); | 162 return owner_->close_button_->HasFocus(); |
| 163 } | 163 } |
| 164 | 164 |
| 165 void RequestFocusOnCloseButton() override { | 165 void RequestFocusOnCloseButton() override { |
| 166 if (owner_->close_button_) | 166 if (owner_->close_button_) |
| 167 owner_->close_button_->RequestFocus(); | 167 owner_->close_button_->RequestFocus(); |
| 168 owner_->UpdateControlButtonsVisibility(); | 168 owner_->UpdateControlButtonsVisibility(); |
| 169 } | 169 } |
| 170 | 170 |
| 171 bool IsPinned() const override { | 171 bool IsPinned() const override { |
| 172 if (!owner_->item_) |
| 173 return false; |
| 172 return owner_->item_->pinned(); | 174 return owner_->item_->pinned(); |
| 173 } | 175 } |
| 174 | 176 |
| 175 void UpdateControlButtonsVisibility() override { | 177 void UpdateControlButtonsVisibility() override { |
| 176 owner_->UpdateControlButtonsVisibility(); | 178 owner_->UpdateControlButtonsVisibility(); |
| 177 } | 179 } |
| 178 | 180 |
| 179 private: | 181 private: |
| 180 ArcCustomNotificationView* const owner_; | 182 ArcCustomNotificationView* const owner_; |
| 181 | 183 |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 | 589 |
| 588 void ArcCustomNotificationView::OnNotificationSurfaceRemoved( | 590 void ArcCustomNotificationView::OnNotificationSurfaceRemoved( |
| 589 exo::NotificationSurface* surface) { | 591 exo::NotificationSurface* surface) { |
| 590 if (surface->notification_id() != notification_key_) | 592 if (surface->notification_id() != notification_key_) |
| 591 return; | 593 return; |
| 592 | 594 |
| 593 SetSurface(nullptr); | 595 SetSurface(nullptr); |
| 594 } | 596 } |
| 595 | 597 |
| 596 } // namespace arc | 598 } // namespace arc |
| OLD | NEW |