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

Side by Side Diff: chrome/browser/ui/views/page_info_bubble_view.cc

Issue 11377005: Replace Label::Alignment with gfx::HorizontalAlignment (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix remaining Label::Alignment references. Created 8 years, 1 month 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/page_info_bubble_view.h" 5 #include "chrome/browser/ui/views/page_info_bubble_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 headline_label_->SetFont( 338 headline_label_->SetFont(
339 headline_label_->font().DeriveFont(0, gfx::Font::BOLD)); 339 headline_label_->font().DeriveFont(0, gfx::Font::BOLD));
340 AddChildView(headline_label_); 340 AddChildView(headline_label_);
341 341
342 // Can't make this a text field to enable copying until multiline support is 342 // Can't make this a text field to enable copying until multiline support is
343 // added to text fields. 343 // added to text fields.
344 description_label_ = new views::Label(info_.description); 344 description_label_ = new views::Label(info_.description);
345 description_label_->set_background( 345 description_label_->set_background(
346 views::Background::CreateSolidBackground(SK_ColorWHITE)); 346 views::Background::CreateSolidBackground(SK_ColorWHITE));
347 description_label_->SetMultiLine(true); 347 description_label_->SetMultiLine(true);
348 description_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 348 description_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
349 // Allow linebreaking in the middle of words if necessary, so that extremely 349 // Allow linebreaking in the middle of words if necessary, so that extremely
350 // long hostnames (longer than one line) will still be completely shown. 350 // long hostnames (longer than one line) will still be completely shown.
351 description_label_->SetAllowCharacterBreak(true); 351 description_label_->SetAllowCharacterBreak(true);
352 AddChildView(description_label_); 352 AddChildView(description_label_);
353 353
354 if (info_.type == PageInfoModel::SECTION_INFO_IDENTITY && show_cert) { 354 if (info_.type == PageInfoModel::SECTION_INFO_IDENTITY && show_cert) {
355 link_ = new views::Link( 355 link_ = new views::Link(
356 l10n_util::GetStringUTF16(IDS_PAGEINFO_CERT_INFO_BUTTON)); 356 l10n_util::GetStringUTF16(IDS_PAGEINFO_CERT_INFO_BUTTON));
357 link_->set_listener(this); 357 link_->set_listener(this);
358 AddChildView(link_); 358 AddChildView(link_);
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 web_contents, 469 web_contents,
470 url, 470 url,
471 ssl, 471 ssl,
472 show_history, 472 show_history,
473 navigator); 473 navigator);
474 views::BubbleDelegateView::CreateBubble(page_info_bubble); 474 views::BubbleDelegateView::CreateBubble(page_info_bubble);
475 page_info_bubble->Show(); 475 page_info_bubble->Show();
476 } 476 }
477 477
478 } // namespace chrome 478 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/notifications/balloon_view_views.cc ('k') | chrome/browser/ui/views/panels/panel_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698