OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/views/notifications/balloon_view.h" | 5 #include "chrome/browser/ui/views/notifications/balloon_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 rb.GetBitmapNamed(IDR_TAB_CLOSE_MASK)); | 347 rb.GetBitmapNamed(IDR_TAB_CLOSE_MASK)); |
348 | 348 |
349 options_menu_button_->SetIcon(*rb.GetBitmapNamed(IDR_BALLOON_WRENCH)); | 349 options_menu_button_->SetIcon(*rb.GetBitmapNamed(IDR_BALLOON_WRENCH)); |
350 options_menu_button_->SetHoverIcon(*rb.GetBitmapNamed(IDR_BALLOON_WRENCH_H)); | 350 options_menu_button_->SetHoverIcon(*rb.GetBitmapNamed(IDR_BALLOON_WRENCH_H)); |
351 options_menu_button_->SetPushedIcon(*rb.GetBitmapNamed(IDR_BALLOON_WRENCH_P)); | 351 options_menu_button_->SetPushedIcon(*rb.GetBitmapNamed(IDR_BALLOON_WRENCH_P)); |
352 options_menu_button_->set_alignment(views::TextButton::ALIGN_CENTER); | 352 options_menu_button_->set_alignment(views::TextButton::ALIGN_CENTER); |
353 options_menu_button_->set_border(NULL); | 353 options_menu_button_->set_border(NULL); |
354 options_menu_button_->SetBoundsRect(GetOptionsButtonBounds()); | 354 options_menu_button_->SetBoundsRect(GetOptionsButtonBounds()); |
355 | 355 |
356 source_label_->SetFont(rb.GetFont(ResourceBundle::SmallFont)); | 356 source_label_->SetFont(rb.GetFont(ResourceBundle::SmallFont)); |
357 source_label_->SetColor(kControlBarTextColor); | 357 source_label_->SetBackgroundColor(kControlBarBackgroundColor); |
| 358 source_label_->SetEnabledColor(kControlBarTextColor); |
358 source_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 359 source_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); |
359 source_label_->SetBoundsRect(GetLabelBounds()); | 360 source_label_->SetBoundsRect(GetLabelBounds()); |
360 | 361 |
361 SizeContentsWindow(); | 362 SizeContentsWindow(); |
362 html_container_->Show(); | 363 html_container_->Show(); |
363 frame_container_->Show(); | 364 frame_container_->Show(); |
364 | 365 |
365 notification_registrar_.Add( | 366 notification_registrar_.Add( |
366 this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, | 367 this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, |
367 Source<Balloon>(balloon)); | 368 Source<Balloon>(balloon)); |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 return; | 510 return; |
510 } | 511 } |
511 | 512 |
512 // If the renderer process attached to this balloon is disconnected | 513 // If the renderer process attached to this balloon is disconnected |
513 // (e.g., because of a crash), we want to close the balloon. | 514 // (e.g., because of a crash), we want to close the balloon. |
514 notification_registrar_.Remove( | 515 notification_registrar_.Remove( |
515 this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, | 516 this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, |
516 Source<Balloon>(balloon_)); | 517 Source<Balloon>(balloon_)); |
517 Close(false); | 518 Close(false); |
518 } | 519 } |
OLD | NEW |