| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/views/notifications/balloon_view.h" | 5 #include "chrome/browser/views/notifications/balloon_view.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 | 331 |
| 332 close_button_->SetImage(views::CustomButton::BS_NORMAL, | 332 close_button_->SetImage(views::CustomButton::BS_NORMAL, |
| 333 rb.GetBitmapNamed(IDR_BALLOON_CLOSE)); | 333 rb.GetBitmapNamed(IDR_BALLOON_CLOSE)); |
| 334 close_button_->SetImage(views::CustomButton::BS_HOT, | 334 close_button_->SetImage(views::CustomButton::BS_HOT, |
| 335 rb.GetBitmapNamed(IDR_BALLOON_CLOSE_HOVER)); | 335 rb.GetBitmapNamed(IDR_BALLOON_CLOSE_HOVER)); |
| 336 close_button_->SetImage(views::CustomButton::BS_PUSHED, | 336 close_button_->SetImage(views::CustomButton::BS_PUSHED, |
| 337 rb.GetBitmapNamed(IDR_BALLOON_CLOSE_HOVER)); | 337 rb.GetBitmapNamed(IDR_BALLOON_CLOSE_HOVER)); |
| 338 close_button_->SetBounds(GetCloseButtonBounds()); | 338 close_button_->SetBounds(GetCloseButtonBounds()); |
| 339 | 339 |
| 340 options_menu_button_->SetIcon(*rb.GetBitmapNamed(IDR_BALLOON_WRENCH)); | 340 options_menu_button_->SetIcon(*rb.GetBitmapNamed(IDR_BALLOON_WRENCH)); |
| 341 options_menu_button_->SetHoverIcon(*rb.GetBitmapNamed(IDR_BALLOON_WRENCH)); | 341 options_menu_button_->SetHoverIcon(*rb.GetBitmapNamed(IDR_BALLOON_WRENCH_H)); |
| 342 options_menu_button_->SetPushedIcon(*rb.GetBitmapNamed(IDR_BALLOON_WRENCH_P)); |
| 342 options_menu_button_->set_alignment(views::TextButton::ALIGN_CENTER); | 343 options_menu_button_->set_alignment(views::TextButton::ALIGN_CENTER); |
| 343 options_menu_button_->SetBounds(GetOptionsButtonBounds()); | 344 options_menu_button_->SetBounds(GetOptionsButtonBounds()); |
| 344 | 345 |
| 345 source_label_->SetFont(rb.GetFont(ResourceBundle::SmallFont)); | 346 source_label_->SetFont(rb.GetFont(ResourceBundle::SmallFont)); |
| 346 source_label_->SetColor(kControlBarTextColor); | 347 source_label_->SetColor(kControlBarTextColor); |
| 347 source_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 348 source_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); |
| 348 source_label_->SetBounds(GetLabelBounds()); | 349 source_label_->SetBounds(GetLabelBounds()); |
| 349 | 350 |
| 350 SizeContentsWindow(); | 351 SizeContentsWindow(); |
| 351 html_container_->Show(); | 352 html_container_->Show(); |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 NOTREACHED(); | 487 NOTREACHED(); |
| 487 return; | 488 return; |
| 488 } | 489 } |
| 489 | 490 |
| 490 // If the renderer process attached to this balloon is disconnected | 491 // If the renderer process attached to this balloon is disconnected |
| 491 // (e.g., because of a crash), we want to close the balloon. | 492 // (e.g., because of a crash), we want to close the balloon. |
| 492 notification_registrar_.Remove(this, | 493 notification_registrar_.Remove(this, |
| 493 NotificationType::NOTIFY_BALLOON_DISCONNECTED, Source<Balloon>(balloon_)); | 494 NotificationType::NOTIFY_BALLOON_DISCONNECTED, Source<Balloon>(balloon_)); |
| 494 Close(false); | 495 Close(false); |
| 495 } | 496 } |
| OLD | NEW |