Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Side by Side Diff: ui/arc/notification/arc_custom_notification_view.cc

Issue 2954373002: Make the control buttons on a notification always show on non Chrome OS platform. (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ui/message_center/views/notification_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 void ArcCustomNotificationView::ControlButton::OnBlur() { 234 void ArcCustomNotificationView::ControlButton::OnBlur() {
235 message_center::PaddedButton::OnBlur(); 235 message_center::PaddedButton::OnBlur();
236 owner_->UpdateControlButtonsVisibility(); 236 owner_->UpdateControlButtonsVisibility();
237 } 237 }
238 238
239 ArcCustomNotificationView::ArcCustomNotificationView(ArcNotificationItem* item) 239 ArcCustomNotificationView::ArcCustomNotificationView(ArcNotificationItem* item)
240 : item_(item), 240 : item_(item),
241 notification_key_(item->GetNotificationKey()), 241 notification_key_(item->GetNotificationKey()),
242 event_forwarder_(new EventForwarder(this)) { 242 event_forwarder_(new EventForwarder(this)) {
243 SetFocusBehavior(FocusBehavior::ALWAYS); 243 SetFocusBehavior(FocusBehavior::ALWAYS);
244 set_notify_enter_exit_on_child(true);
244 245
245 item_->IncrementWindowRefCount(); 246 item_->IncrementWindowRefCount();
246 item_->AddObserver(this); 247 item_->AddObserver(this);
247 248
248 auto* surface_manager = ArcNotificationSurfaceManager::Get(); 249 auto* surface_manager = ArcNotificationSurfaceManager::Get();
249 if (surface_manager) { 250 if (surface_manager) {
250 surface_manager->AddObserver(this); 251 surface_manager->AddObserver(this);
251 exo::NotificationSurface* surface = 252 exo::NotificationSurface* surface =
252 surface_manager->GetSurface(notification_key_); 253 surface_manager->GetSurface(notification_key_);
253 if (surface) 254 if (surface)
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 } 730 }
730 if (close_button_) { 731 if (close_button_) {
731 close_button_->set_background( 732 close_button_->set_background(
732 views::Background::CreateSolidBackground(current_color)); 733 views::Background::CreateSolidBackground(current_color));
733 close_button_->SchedulePaint(); 734 close_button_->SchedulePaint();
734 } 735 }
735 } 736 }
736 } 737 }
737 738
738 } // namespace arc 739 } // namespace arc
OLDNEW
« no previous file with comments | « no previous file | ui/message_center/views/notification_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698