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

Side by Side Diff: chrome/browser/chromeos/login/message_bubble.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
« no previous file with comments | « ash/wm/frame_painter.cc ('k') | chrome/browser/chromeos/login/simple_web_view_dialog.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/chromeos/login/message_bubble.h" 5 #include "chrome/browser/chromeos/login/message_bubble.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/browser/chromeos/login/helper.h" 10 #include "chrome/browser/chromeos/login/helper.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 layout->AddView(icon); 74 layout->AddView(icon);
75 75
76 views::Label* label = new views::Label(text_); 76 views::Label* label = new views::Label(text_);
77 label->SetMultiLine(true); 77 label->SetMultiLine(true);
78 label->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 78 label->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
79 label->SizeToFit(kMaxLabelWidth); 79 label->SizeToFit(kMaxLabelWidth);
80 layout->AddView(label); 80 layout->AddView(label);
81 81
82 close_button_ = new views::ImageButton(this); 82 close_button_ = new views::ImageButton(this);
83 close_button_->SetImage(views::CustomButton::BS_NORMAL, 83 close_button_->SetImage(views::CustomButton::BS_NORMAL,
84 rb.GetBitmapNamed(IDR_CLOSE_BAR)); 84 rb.GetImageSkiaNamed(IDR_CLOSE_BAR));
85 close_button_->SetImage(views::CustomButton::BS_HOT, 85 close_button_->SetImage(views::CustomButton::BS_HOT,
86 rb.GetBitmapNamed(IDR_CLOSE_BAR_H)); 86 rb.GetImageSkiaNamed(IDR_CLOSE_BAR_H));
87 close_button_->SetImage(views::CustomButton::BS_PUSHED, 87 close_button_->SetImage(views::CustomButton::BS_PUSHED,
88 rb.GetBitmapNamed(IDR_CLOSE_BAR_P)); 88 rb.GetImageSkiaNamed(IDR_CLOSE_BAR_P));
89 layout->AddView(close_button_); 89 layout->AddView(close_button_);
90 90
91 for (size_t i = 0; i < help_links_.size(); ++i) { 91 for (size_t i = 0; i < help_links_.size(); ++i) {
92 layout->StartRowWithPadding(0, 1, 0, kBorderSize); 92 layout->StartRowWithPadding(0, 1, 0, kBorderSize);
93 views::Link* help_link = help_links_[i]; 93 views::Link* help_link = help_links_[i];
94 help_link->set_listener(this); 94 help_link->set_listener(this);
95 help_link->SetEnabledColor(login::kLinkColor); 95 help_link->SetEnabledColor(login::kLinkColor);
96 help_link->SetPressedColor(login::kLinkColor); 96 help_link->SetPressedColor(login::kLinkColor);
97 layout->AddView(help_link); 97 layout->AddView(help_link);
98 } 98 }
(...skipping 14 matching lines...) Expand all
113 for (size_t i = 0; i < help_links_.size(); ++i) { 113 for (size_t i = 0; i < help_links_.size(); ++i) {
114 if (source == help_links_[i]) { 114 if (source == help_links_[i]) {
115 link_listener_->OnLinkActivated(i); 115 link_listener_->OnLinkActivated(i);
116 return; 116 return;
117 } 117 }
118 } 118 }
119 NOTREACHED() << "Unknown view"; 119 NOTREACHED() << "Unknown view";
120 } 120 }
121 121
122 } // namespace chromeos 122 } // namespace chromeos
OLDNEW
« no previous file with comments | « ash/wm/frame_painter.cc ('k') | chrome/browser/chromeos/login/simple_web_view_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698