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 "chrome/browser/ui/views/notifications/balloon_view_views.h" | 5 #include "chrome/browser/ui/views/notifications/balloon_view_views.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 options_menu_button_->SetPushedIcon(*rb.GetImageSkiaNamed( | 371 options_menu_button_->SetPushedIcon(*rb.GetImageSkiaNamed( |
372 IDR_BALLOON_WRENCH_P)); | 372 IDR_BALLOON_WRENCH_P)); |
373 options_menu_button_->set_alignment(views::TextButton::ALIGN_CENTER); | 373 options_menu_button_->set_alignment(views::TextButton::ALIGN_CENTER); |
374 options_menu_button_->set_border(NULL); | 374 options_menu_button_->set_border(NULL); |
375 options_menu_button_->SetBoundsRect(GetOptionsButtonBounds()); | 375 options_menu_button_->SetBoundsRect(GetOptionsButtonBounds()); |
376 | 376 |
377 source_label_->SetFont(rb.GetFont(ui::ResourceBundle::SmallFont)); | 377 source_label_->SetFont(rb.GetFont(ui::ResourceBundle::SmallFont)); |
378 source_label_->SetBackgroundColor(kControlBarBackgroundColor); | 378 source_label_->SetBackgroundColor(kControlBarBackgroundColor); |
379 source_label_->SetEnabledColor(kControlBarTextColor); | 379 source_label_->SetEnabledColor(kControlBarTextColor); |
380 source_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 380 source_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
381 source_label_->SetElideBehavior(views::Label::ELIDE_AT_END); | |
382 source_label_->SetBoundsRect(GetLabelBounds()); | 381 source_label_->SetBoundsRect(GetLabelBounds()); |
383 | 382 |
384 SizeContentsWindow(); | 383 SizeContentsWindow(); |
385 html_container_->Show(); | 384 html_container_->Show(); |
386 frame_container_->Show(); | 385 frame_container_->Show(); |
387 | 386 |
388 notification_registrar_.Add( | 387 notification_registrar_.Add( |
389 this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, | 388 this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, |
390 content::Source<Balloon>(balloon)); | 389 content::Source<Balloon>(balloon)); |
391 } | 390 } |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 return; | 525 return; |
527 } | 526 } |
528 | 527 |
529 // If the renderer process attached to this balloon is disconnected | 528 // If the renderer process attached to this balloon is disconnected |
530 // (e.g., because of a crash), we want to close the balloon. | 529 // (e.g., because of a crash), we want to close the balloon. |
531 notification_registrar_.Remove( | 530 notification_registrar_.Remove( |
532 this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, | 531 this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, |
533 content::Source<Balloon>(balloon_)); | 532 content::Source<Balloon>(balloon_)); |
534 Close(false); | 533 Close(false); |
535 } | 534 } |
OLD | NEW |