Chromium Code Reviews| 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/system/chromeos/network/tray_sms.h" | 5 #include "ash/system/chromeos/network/tray_sms.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/system/tray/fixed_sized_scroll_view.h" | 8 #include "ash/system/tray/fixed_sized_scroll_view.h" |
| 9 #include "ash/system/tray/system_tray.h" | 9 #include "ash/system/tray/system_tray.h" |
| 10 #include "ash/system/tray/system_tray_bubble.h" | 10 #include "ash/system/tray/system_tray_bubble.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 120 const ui::Event& event) OVERRIDE { | 120 const ui::Event& event) OVERRIDE { |
| 121 owner_->RemoveMessage(index_); | 121 owner_->RemoveMessage(index_); |
| 122 owner_->Update(false); | 122 owner_->Update(false); |
| 123 } | 123 } |
| 124 | 124 |
| 125 private: | 125 private: |
| 126 void LayoutDetailedView() { | 126 void LayoutDetailedView() { |
| 127 views::ImageButton* close_button = new views::ImageButton(this); | 127 views::ImageButton* close_button = new views::ImageButton(this); |
| 128 close_button->SetImage(views::CustomButton::STATE_NORMAL, | 128 close_button->SetImage(views::CustomButton::STATE_NORMAL, |
| 129 ResourceBundle::GetSharedInstance().GetImageSkiaNamed( | 129 ResourceBundle::GetSharedInstance().GetImageSkiaNamed( |
| 130 IDR_AURA_WINDOW_CLOSE)); | 130 IDR_AURA_UBER_TRAY_SMS_DISMISS)); |
|
James Cook
2014/02/03 18:46:35
I take it this is because the close button can't b
| |
| 131 const int msg_width = owner_->system_tray()->GetSystemBubble()-> | 131 const int msg_width = owner_->system_tray()->GetSystemBubble()-> |
| 132 bubble_view()->GetPreferredSize().width() - | 132 bubble_view()->GetPreferredSize().width() - |
| 133 (kNotificationIconWidth + kTrayPopupPaddingHorizontal * 2); | 133 (kNotificationIconWidth + kTrayPopupPaddingHorizontal * 2); |
| 134 message_label_->SizeToFit(msg_width); | 134 message_label_->SizeToFit(msg_width); |
| 135 | 135 |
| 136 views::GridLayout* layout = new views::GridLayout(this); | 136 views::GridLayout* layout = new views::GridLayout(this); |
| 137 SetLayoutManager(layout); | 137 SetLayoutManager(layout); |
| 138 | 138 |
| 139 views::ColumnSet* columns = layout->AddColumnSet(0); | 139 views::ColumnSet* columns = layout->AddColumnSet(0); |
| 140 | 140 |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 412 if (GetLatestMessage(&index, &number, &text)) | 412 if (GetLatestMessage(&index, &number, &text)) |
| 413 notification_->Update(index, number, text); | 413 notification_->Update(index, number, text); |
| 414 } else if (notify) { | 414 } else if (notify) { |
| 415 ShowNotificationView(); | 415 ShowNotificationView(); |
| 416 } | 416 } |
| 417 } | 417 } |
| 418 } | 418 } |
| 419 | 419 |
| 420 } // namespace internal | 420 } // namespace internal |
| 421 } // namespace ash | 421 } // namespace ash |
| OLD | NEW |