| 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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 // sure |frame_container_| has bounds before we ask for | 350 // sure |frame_container_| has bounds before we ask for |
| 351 // GetContentsRectangle(). | 351 // GetContentsRectangle(). |
| 352 html_container_->SetBounds(GetContentsRectangle()); | 352 html_container_->SetBounds(GetContentsRectangle()); |
| 353 | 353 |
| 354 // SetAlwaysOnTop should be called after StackAboveWidget because otherwise | 354 // SetAlwaysOnTop should be called after StackAboveWidget because otherwise |
| 355 // the top-most flag will be removed. | 355 // the top-most flag will be removed. |
| 356 html_container_->SetAlwaysOnTop(true); | 356 html_container_->SetAlwaysOnTop(true); |
| 357 frame_container_->SetAlwaysOnTop(true); | 357 frame_container_->SetAlwaysOnTop(true); |
| 358 | 358 |
| 359 close_button_->SetImage(views::CustomButton::STATE_NORMAL, | 359 close_button_->SetImage(views::CustomButton::STATE_NORMAL, |
| 360 rb.GetImageSkiaNamed(IDR_TAB_CLOSE)); | 360 rb.GetImageSkiaNamed(IDR_CLOSE_1)); |
| 361 close_button_->SetImage(views::CustomButton::STATE_HOVERED, | 361 close_button_->SetImage(views::CustomButton::STATE_HOVERED, |
| 362 rb.GetImageSkiaNamed(IDR_TAB_CLOSE_H)); | 362 rb.GetImageSkiaNamed(IDR_CLOSE_1_H)); |
| 363 close_button_->SetImage(views::CustomButton::STATE_PRESSED, | 363 close_button_->SetImage(views::CustomButton::STATE_PRESSED, |
| 364 rb.GetImageSkiaNamed(IDR_TAB_CLOSE_P)); | 364 rb.GetImageSkiaNamed(IDR_CLOSE_1_P)); |
| 365 close_button_->SetBoundsRect(GetCloseButtonBounds()); | 365 close_button_->SetBoundsRect(GetCloseButtonBounds()); |
| 366 close_button_->SetBackground(SK_ColorBLACK, | 366 close_button_->SetBackground(SK_ColorBLACK, |
| 367 rb.GetImageSkiaNamed(IDR_TAB_CLOSE), | 367 rb.GetImageSkiaNamed(IDR_CLOSE_1), |
| 368 rb.GetImageSkiaNamed(IDR_TAB_CLOSE_MASK)); | 368 rb.GetImageSkiaNamed(IDR_CLOSE_1_MASK)); |
| 369 | 369 |
| 370 options_menu_button_->SetIcon(*rb.GetImageSkiaNamed(IDR_BALLOON_WRENCH)); | 370 options_menu_button_->SetIcon(*rb.GetImageSkiaNamed(IDR_BALLOON_WRENCH)); |
| 371 options_menu_button_->SetHoverIcon( | 371 options_menu_button_->SetHoverIcon( |
| 372 *rb.GetImageSkiaNamed(IDR_BALLOON_WRENCH_H)); | 372 *rb.GetImageSkiaNamed(IDR_BALLOON_WRENCH_H)); |
| 373 options_menu_button_->SetPushedIcon(*rb.GetImageSkiaNamed( | 373 options_menu_button_->SetPushedIcon(*rb.GetImageSkiaNamed( |
| 374 IDR_BALLOON_WRENCH_P)); | 374 IDR_BALLOON_WRENCH_P)); |
| 375 options_menu_button_->set_alignment(views::TextButton::ALIGN_CENTER); | 375 options_menu_button_->set_alignment(views::TextButton::ALIGN_CENTER); |
| 376 options_menu_button_->set_border(NULL); | 376 options_menu_button_->set_border(NULL); |
| 377 options_menu_button_->SetBoundsRect(GetOptionsButtonBounds()); | 377 options_menu_button_->SetBoundsRect(GetOptionsButtonBounds()); |
| 378 | 378 |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 528 return; | 528 return; |
| 529 } | 529 } |
| 530 | 530 |
| 531 // If the renderer process attached to this balloon is disconnected | 531 // If the renderer process attached to this balloon is disconnected |
| 532 // (e.g., because of a crash), we want to close the balloon. | 532 // (e.g., because of a crash), we want to close the balloon. |
| 533 notification_registrar_.Remove( | 533 notification_registrar_.Remove( |
| 534 this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, | 534 this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, |
| 535 content::Source<Balloon>(balloon_)); | 535 content::Source<Balloon>(balloon_)); |
| 536 Close(false); | 536 Close(false); |
| 537 } | 537 } |
| OLD | NEW |