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 "ui/message_center/message_center_bubble.h" | 5 #include "ui/message_center/message_center_bubble.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "grit/ui_strings.h" | 8 #include "grit/ui_strings.h" |
9 #include "ui/base/l10n/l10n_util.h" | 9 #include "ui/base/l10n/l10n_util.h" |
10 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 : list_delegate_(list_delegate) { | 230 : list_delegate_(list_delegate) { |
231 int between_child = UseNewDesign() ? 0 : 1; | 231 int between_child = UseNewDesign() ? 0 : 1; |
232 SetLayoutManager( | 232 SetLayoutManager( |
233 new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, between_child)); | 233 new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, between_child)); |
234 | 234 |
235 scroll_content_ = new ScrollContentView; | 235 scroll_content_ = new ScrollContentView; |
236 scroller_ = new FixedSizedScrollView; | 236 scroller_ = new FixedSizedScrollView; |
237 scroller_->SetContents(scroll_content_); | 237 scroller_->SetContents(scroll_content_); |
238 AddChildView(scroller_); | 238 AddChildView(scroller_); |
239 | 239 |
| 240 #ifdef USE_AURA |
240 scroller_->SetPaintToLayer(true); | 241 scroller_->SetPaintToLayer(true); |
241 scroller_->SetFillsBoundsOpaquely(false); | 242 scroller_->SetFillsBoundsOpaquely(false); |
242 scroller_->layer()->SetMasksToBounds(true); | 243 scroller_->layer()->SetMasksToBounds(true); |
| 244 #endif // USE_AURA |
243 | 245 |
244 button_view_ = new WebNotificationButtonView(list_delegate); | 246 button_view_ = new WebNotificationButtonView(list_delegate); |
245 AddChildView(button_view_); | 247 AddChildView(button_view_); |
246 } | 248 } |
247 | 249 |
248 void FocusContents() { | 250 void FocusContents() { |
249 scroller_->RequestFocus(); | 251 scroller_->RequestFocus(); |
250 } | 252 } |
251 | 253 |
252 void Update(const NotificationList::Notifications& notifications) { | 254 void Update(const NotificationList::Notifications& notifications) { |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 } | 376 } |
375 | 377 |
376 void MessageCenterBubble::OnMouseExitedView() { | 378 void MessageCenterBubble::OnMouseExitedView() { |
377 } | 379 } |
378 | 380 |
379 size_t MessageCenterBubble::NumMessageViewsForTest() const { | 381 size_t MessageCenterBubble::NumMessageViewsForTest() const { |
380 return contents_view_->NumMessageViews(); | 382 return contents_view_->NumMessageViews(); |
381 } | 383 } |
382 | 384 |
383 } // namespace message_center | 385 } // namespace message_center |
OLD | NEW |