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

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

Issue 10382144: Change SetImage, SetBackground, and SetToggledImage to take in a gfx::ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years, 7 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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 frame_container_->Init(params); 373 frame_container_->Init(params);
374 frame_container_->SetContentsView(this); 374 frame_container_->SetContentsView(this);
375 frame_container_->StackAboveWidget(html_container_); 375 frame_container_->StackAboveWidget(html_container_);
376 376
377 // SetAlwaysOnTop should be called after StackAboveWidget because otherwise 377 // SetAlwaysOnTop should be called after StackAboveWidget because otherwise
378 // the top-most flag will be removed. 378 // the top-most flag will be removed.
379 html_container_->SetAlwaysOnTop(true); 379 html_container_->SetAlwaysOnTop(true);
380 frame_container_->SetAlwaysOnTop(true); 380 frame_container_->SetAlwaysOnTop(true);
381 381
382 close_button_->SetImage(views::CustomButton::BS_NORMAL, 382 close_button_->SetImage(views::CustomButton::BS_NORMAL,
383 rb.GetBitmapNamed(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.GetBitmapNamed(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.GetBitmapNamed(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.GetBitmapNamed(IDR_TAB_CLOSE), 390 rb.GetImageSkiaNamed(IDR_TAB_CLOSE),
391 rb.GetBitmapNamed(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.GetBitmapNamed(IDR_BALLOON_WRENCH));
394 options_menu_button_->SetHoverIcon(*rb.GetBitmapNamed(IDR_BALLOON_WRENCH_H)); 394 options_menu_button_->SetHoverIcon(*rb.GetBitmapNamed(IDR_BALLOON_WRENCH_H));
395 options_menu_button_->SetPushedIcon(*rb.GetBitmapNamed(IDR_BALLOON_WRENCH_P)); 395 options_menu_button_->SetPushedIcon(*rb.GetBitmapNamed(IDR_BALLOON_WRENCH_P));
396 options_menu_button_->set_alignment(views::TextButton::ALIGN_CENTER); 396 options_menu_button_->set_alignment(views::TextButton::ALIGN_CENTER);
397 options_menu_button_->set_border(NULL); 397 options_menu_button_->set_border(NULL);
398 options_menu_button_->SetBoundsRect(GetOptionsButtonBounds()); 398 options_menu_button_->SetBoundsRect(GetOptionsButtonBounds());
399 399
400 source_label_->SetFont(rb.GetFont(ui::ResourceBundle::SmallFont)); 400 source_label_->SetFont(rb.GetFont(ui::ResourceBundle::SmallFont));
401 source_label_->SetBackgroundColor(kControlBarBackgroundColor); 401 source_label_->SetBackgroundColor(kControlBarBackgroundColor);
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 return; 539 return;
540 } 540 }
541 541
542 // If the renderer process attached to this balloon is disconnected 542 // If the renderer process attached to this balloon is disconnected
543 // (e.g., because of a crash), we want to close the balloon. 543 // (e.g., because of a crash), we want to close the balloon.
544 notification_registrar_.Remove( 544 notification_registrar_.Remove(
545 this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, 545 this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED,
546 content::Source<Balloon>(balloon_)); 546 content::Source<Balloon>(balloon_));
547 Close(false); 547 Close(false);
548 } 548 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/star_view.cc ('k') | chrome/browser/ui/views/sad_tab_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698