| 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 return false; | 183 return false; |
| 184 return owner_->close_button_->HasFocus(); | 184 return owner_->close_button_->HasFocus(); |
| 185 } | 185 } |
| 186 | 186 |
| 187 void RequestFocusOnCloseButton() override { | 187 void RequestFocusOnCloseButton() override { |
| 188 if (owner_->close_button_) | 188 if (owner_->close_button_) |
| 189 owner_->close_button_->RequestFocus(); | 189 owner_->close_button_->RequestFocus(); |
| 190 owner_->UpdateControlButtonsVisibility(); | 190 owner_->UpdateControlButtonsVisibility(); |
| 191 } | 191 } |
| 192 | 192 |
| 193 bool IsPinned() const override { | |
| 194 if (!owner_->item_) | |
| 195 return false; | |
| 196 return owner_->item_->pinned(); | |
| 197 } | |
| 198 | |
| 199 void UpdateControlButtonsVisibility() override { | 193 void UpdateControlButtonsVisibility() override { |
| 200 owner_->UpdateControlButtonsVisibility(); | 194 owner_->UpdateControlButtonsVisibility(); |
| 201 } | 195 } |
| 202 | 196 |
| 203 private: | 197 private: |
| 204 ArcCustomNotificationView* const owner_; | 198 ArcCustomNotificationView* const owner_; |
| 205 | 199 |
| 206 DISALLOW_COPY_AND_ASSIGN(ContentViewDelegate); | 200 DISALLOW_COPY_AND_ASSIGN(ContentViewDelegate); |
| 207 }; | 201 }; |
| 208 | 202 |
| (...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 } | 722 } |
| 729 if (close_button_) { | 723 if (close_button_) { |
| 730 close_button_->set_background( | 724 close_button_->set_background( |
| 731 views::Background::CreateSolidBackground(current_color)); | 725 views::Background::CreateSolidBackground(current_color)); |
| 732 close_button_->SchedulePaint(); | 726 close_button_->SchedulePaint(); |
| 733 } | 727 } |
| 734 } | 728 } |
| 735 } | 729 } |
| 736 | 730 |
| 737 } // namespace arc | 731 } // namespace arc |
| OLD | NEW |