OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ash/common/system/web_notification/web_notification_tray.h" | 5 #include "ash/common/system/web_notification/web_notification_tray.h" |
6 | 6 |
7 #include "ash/common/material_design/material_design_controller.h" | 7 #include "ash/common/material_design/material_design_controller.h" |
8 #include "ash/common/session/session_state_delegate.h" | 8 #include "ash/common/session/session_state_delegate.h" |
9 #include "ash/common/shelf/shelf_constants.h" | 9 #include "ash/common/shelf/shelf_constants.h" |
10 #include "ash/common/shelf/wm_shelf.h" | 10 #include "ash/common/shelf/wm_shelf.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 std::unique_ptr<TrayBubbleWrapper> bubble_wrapper_; | 117 std::unique_ptr<TrayBubbleWrapper> bubble_wrapper_; |
118 | 118 |
119 DISALLOW_COPY_AND_ASSIGN(WebNotificationBubbleWrapper); | 119 DISALLOW_COPY_AND_ASSIGN(WebNotificationBubbleWrapper); |
120 }; | 120 }; |
121 | 121 |
122 class WebNotificationItem : public views::View, public gfx::AnimationDelegate { | 122 class WebNotificationItem : public views::View, public gfx::AnimationDelegate { |
123 public: | 123 public: |
124 WebNotificationItem(gfx::AnimationContainer* container, | 124 WebNotificationItem(gfx::AnimationContainer* container, |
125 WebNotificationTray* tray) | 125 WebNotificationTray* tray) |
126 : tray_(tray) { | 126 : tray_(tray) { |
127 SetPaintToLayer(true); | 127 SetPaintToLayer(); |
128 layer()->SetFillsBoundsOpaquely(false); | 128 layer()->SetFillsBoundsOpaquely(false); |
129 views::View::SetVisible(false); | 129 views::View::SetVisible(false); |
130 set_owned_by_client(); | 130 set_owned_by_client(); |
131 | 131 |
132 SetLayoutManager(new views::FillLayout); | 132 SetLayoutManager(new views::FillLayout); |
133 | 133 |
134 animation_.reset(new gfx::SlideAnimation(this)); | 134 animation_.reset(new gfx::SlideAnimation(this)); |
135 animation_->SetContainer(container); | 135 animation_->SetContainer(container); |
136 animation_->SetSlideDuration(kTrayItemAnimationDurationMS); | 136 animation_->SetSlideDuration(kTrayItemAnimationDurationMS); |
137 animation_->SetTweenType(gfx::Tween::LINEAR); | 137 animation_->SetTweenType(gfx::Tween::LINEAR); |
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
667 | 667 |
668 message_center::MessageCenterBubble* | 668 message_center::MessageCenterBubble* |
669 WebNotificationTray::GetMessageCenterBubbleForTest() { | 669 WebNotificationTray::GetMessageCenterBubbleForTest() { |
670 if (!message_center_bubble()) | 670 if (!message_center_bubble()) |
671 return nullptr; | 671 return nullptr; |
672 return static_cast<message_center::MessageCenterBubble*>( | 672 return static_cast<message_center::MessageCenterBubble*>( |
673 message_center_bubble()->bubble()); | 673 message_center_bubble()->bubble()); |
674 } | 674 } |
675 | 675 |
676 } // namespace ash | 676 } // namespace ash |
OLD | NEW |