OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/views/page_info_bubble_view.h" | 5 #include "chrome/browser/views/page_info_bubble_view.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/certificate_viewer.h" | 10 #include "chrome/browser/certificate_viewer.h" |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 description_label_ = new views::Label(UTF16ToWideHack(info_.description)); | 187 description_label_ = new views::Label(UTF16ToWideHack(info_.description)); |
188 description_label_->SetMultiLine(true); | 188 description_label_->SetMultiLine(true); |
189 description_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 189 description_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); |
190 // Allow linebreaking in the middle of words if necessary, so that extremely | 190 // Allow linebreaking in the middle of words if necessary, so that extremely |
191 // long hostnames (longer than one line) will still be completely shown. | 191 // long hostnames (longer than one line) will still be completely shown. |
192 description_label_->SetAllowCharacterBreak(true); | 192 description_label_->SetAllowCharacterBreak(true); |
193 AddChildView(description_label_); | 193 AddChildView(description_label_); |
194 | 194 |
195 if (info_.type == PageInfoModel::SECTION_INFO_IDENTITY) { | 195 if (info_.type == PageInfoModel::SECTION_INFO_IDENTITY) { |
196 link_ = new views::Link( | 196 link_ = new views::Link( |
197 l10n_util::GetStringUTF16(IDS_PAGEINFO_CERT_INFO_BUTTON)); | 197 l10n_util::GetString(IDS_PAGEINFO_CERT_INFO_BUTTON)); |
198 link_->SetController(this); | 198 link_->SetController(this); |
199 AddChildView(link_); | 199 AddChildView(link_); |
200 } | 200 } |
201 } | 201 } |
202 | 202 |
203 Section::~Section() { | 203 Section::~Section() { |
204 } | 204 } |
205 | 205 |
206 int Section::GetHeightForWidth(int width) { | 206 int Section::GetHeightForWidth(int width) { |
207 return LayoutItems(true, width).height(); | 207 return LayoutItems(true, width).height(); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 PageInfoBubbleView* page_info_bubble = | 281 PageInfoBubbleView* page_info_bubble = |
282 new PageInfoBubbleView(parent, profile, url, ssl, show_history); | 282 new PageInfoBubbleView(parent, profile, url, ssl, show_history); |
283 InfoBubble* info_bubble = | 283 InfoBubble* info_bubble = |
284 InfoBubble::Show(browser_view->GetWidget(), bounds, | 284 InfoBubble::Show(browser_view->GetWidget(), bounds, |
285 BubbleBorder::TOP_LEFT, | 285 BubbleBorder::TOP_LEFT, |
286 page_info_bubble, page_info_bubble); | 286 page_info_bubble, page_info_bubble); |
287 page_info_bubble->set_info_bubble(info_bubble); | 287 page_info_bubble->set_info_bubble(info_bubble); |
288 } | 288 } |
289 | 289 |
290 } | 290 } |
OLD | NEW |