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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 *rb.GetImageSkiaNamed(IDR_BALLOON_WRENCH_H)); | 373 *rb.GetImageSkiaNamed(IDR_BALLOON_WRENCH_H)); |
374 options_menu_button_->SetPushedIcon(*rb.GetImageSkiaNamed( | 374 options_menu_button_->SetPushedIcon(*rb.GetImageSkiaNamed( |
375 IDR_BALLOON_WRENCH_P)); | 375 IDR_BALLOON_WRENCH_P)); |
376 options_menu_button_->set_alignment(views::TextButton::ALIGN_CENTER); | 376 options_menu_button_->set_alignment(views::TextButton::ALIGN_CENTER); |
377 options_menu_button_->set_border(NULL); | 377 options_menu_button_->set_border(NULL); |
378 options_menu_button_->SetBoundsRect(GetOptionsButtonBounds()); | 378 options_menu_button_->SetBoundsRect(GetOptionsButtonBounds()); |
379 | 379 |
380 source_label_->SetFont(rb.GetFont(ui::ResourceBundle::SmallFont)); | 380 source_label_->SetFont(rb.GetFont(ui::ResourceBundle::SmallFont)); |
381 source_label_->SetBackgroundColor(kControlBarBackgroundColor); | 381 source_label_->SetBackgroundColor(kControlBarBackgroundColor); |
382 source_label_->SetEnabledColor(kControlBarTextColor); | 382 source_label_->SetEnabledColor(kControlBarTextColor); |
383 source_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 383 source_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
384 source_label_->SetElideBehavior(views::Label::ELIDE_AT_END); | 384 source_label_->SetElideBehavior(views::Label::ELIDE_AT_END); |
385 source_label_->SetBoundsRect(GetLabelBounds()); | 385 source_label_->SetBoundsRect(GetLabelBounds()); |
386 | 386 |
387 SizeContentsWindow(); | 387 SizeContentsWindow(); |
388 html_container_->Show(); | 388 html_container_->Show(); |
389 frame_container_->Show(); | 389 frame_container_->Show(); |
390 | 390 |
391 notification_registrar_.Add( | 391 notification_registrar_.Add( |
392 this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, | 392 this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, |
393 content::Source<Balloon>(balloon)); | 393 content::Source<Balloon>(balloon)); |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 return; | 529 return; |
530 } | 530 } |
531 | 531 |
532 // If the renderer process attached to this balloon is disconnected | 532 // If the renderer process attached to this balloon is disconnected |
533 // (e.g., because of a crash), we want to close the balloon. | 533 // (e.g., because of a crash), we want to close the balloon. |
534 notification_registrar_.Remove( | 534 notification_registrar_.Remove( |
535 this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, | 535 this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, |
536 content::Source<Balloon>(balloon_)); | 536 content::Source<Balloon>(balloon_)); |
537 Close(false); | 537 Close(false); |
538 } | 538 } |
OLD | NEW |