Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(624)

Side by Side Diff: chrome/browser/ui/views/notifications/balloon_view.cc

Issue 10453101: Convert most of the rest of chrome to ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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.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/bind.h" 10 #include "base/bind.h"
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 rb.GetImageSkiaNamed(IDR_TAB_CLOSE)); 383 rb.GetImageSkiaNamed(IDR_TAB_CLOSE));
384 close_button_->SetImage(views::CustomButton::BS_HOT, 384 close_button_->SetImage(views::CustomButton::BS_HOT,
385 rb.GetImageSkiaNamed(IDR_TAB_CLOSE_H)); 385 rb.GetImageSkiaNamed(IDR_TAB_CLOSE_H));
386 close_button_->SetImage(views::CustomButton::BS_PUSHED, 386 close_button_->SetImage(views::CustomButton::BS_PUSHED,
387 rb.GetImageSkiaNamed(IDR_TAB_CLOSE_P)); 387 rb.GetImageSkiaNamed(IDR_TAB_CLOSE_P));
388 close_button_->SetBoundsRect(GetCloseButtonBounds()); 388 close_button_->SetBoundsRect(GetCloseButtonBounds());
389 close_button_->SetBackground(SK_ColorBLACK, 389 close_button_->SetBackground(SK_ColorBLACK,
390 rb.GetImageSkiaNamed(IDR_TAB_CLOSE), 390 rb.GetImageSkiaNamed(IDR_TAB_CLOSE),
391 rb.GetImageSkiaNamed(IDR_TAB_CLOSE_MASK)); 391 rb.GetImageSkiaNamed(IDR_TAB_CLOSE_MASK));
392 392
393 options_menu_button_->SetIcon(*rb.GetBitmapNamed(IDR_BALLOON_WRENCH)); 393 options_menu_button_->SetIcon(*rb.GetImageSkiaNamed(IDR_BALLOON_WRENCH));
394 options_menu_button_->SetHoverIcon(*rb.GetBitmapNamed(IDR_BALLOON_WRENCH_H)); 394 options_menu_button_->SetHoverIcon(
395 options_menu_button_->SetPushedIcon(*rb.GetBitmapNamed(IDR_BALLOON_WRENCH_P)); 395 *rb.GetImageSkiaNamed(IDR_BALLOON_WRENCH_H));
396 options_menu_button_->SetPushedIcon(*rb.GetImageSkiaNamed(
397 IDR_BALLOON_WRENCH_P));
396 options_menu_button_->set_alignment(views::TextButton::ALIGN_CENTER); 398 options_menu_button_->set_alignment(views::TextButton::ALIGN_CENTER);
397 options_menu_button_->set_border(NULL); 399 options_menu_button_->set_border(NULL);
398 options_menu_button_->SetBoundsRect(GetOptionsButtonBounds()); 400 options_menu_button_->SetBoundsRect(GetOptionsButtonBounds());
399 401
400 source_label_->SetFont(rb.GetFont(ui::ResourceBundle::SmallFont)); 402 source_label_->SetFont(rb.GetFont(ui::ResourceBundle::SmallFont));
401 source_label_->SetBackgroundColor(kControlBarBackgroundColor); 403 source_label_->SetBackgroundColor(kControlBarBackgroundColor);
402 source_label_->SetEnabledColor(kControlBarTextColor); 404 source_label_->SetEnabledColor(kControlBarTextColor);
403 source_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 405 source_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
404 source_label_->SetBoundsRect(GetLabelBounds()); 406 source_label_->SetBoundsRect(GetLabelBounds());
405 407
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 return; 541 return;
540 } 542 }
541 543
542 // If the renderer process attached to this balloon is disconnected 544 // If the renderer process attached to this balloon is disconnected
543 // (e.g., because of a crash), we want to close the balloon. 545 // (e.g., because of a crash), we want to close the balloon.
544 notification_registrar_.Remove( 546 notification_registrar_.Remove(
545 this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, 547 this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED,
546 content::Source<Balloon>(balloon_)); 548 content::Source<Balloon>(balloon_));
547 Close(false); 549 Close(false);
548 } 550 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/menu_item_view_test.cc ('k') | chrome/browser/ui/views/page_info_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698