| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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" |
| 11 #include "chrome/browser/google/google_util.h" | 11 #include "chrome/browser/google/google_util.h" |
| 12 #include "chrome/browser/ui/browser_list.h" | 12 #include "chrome/browser/ui/browser_list.h" |
| 13 #include "chrome/browser/ui/views/bubble/bubble.h" | 13 #include "chrome/browser/ui/views/bubble/bubble.h" |
| 14 #include "chrome/browser/ui/views/frame/browser_view.h" | 14 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 15 #include "chrome/browser/ui/views/toolbar_view.h" | 15 #include "chrome/browser/ui/views/toolbar_view.h" |
| 16 #include "chrome/common/url_constants.h" | 16 #include "chrome/common/url_constants.h" |
| 17 #include "content/browser/cert_store.h" | 17 #include "content/browser/cert_store.h" |
| 18 #include "grit/generated_resources.h" | 18 #include "grit/generated_resources.h" |
| 19 #include "grit/locale_settings.h" | 19 #include "grit/locale_settings.h" |
| 20 #include "ui/base/l10n/l10n_util.h" | 20 #include "ui/base/l10n/l10n_util.h" |
| 21 #include "ui/gfx/canvas.h" | 21 #include "ui/gfx/canvas.h" |
| 22 #include "ui/gfx/canvas_skia.h" | 22 #include "ui/gfx/canvas_skia.h" |
| 23 #include "ui/gfx/image/image.h" | 23 #include "ui/gfx/image/image.h" |
| 24 #include "ui/views/layout/grid_layout.h" |
| 24 #include "views/controls/image_view.h" | 25 #include "views/controls/image_view.h" |
| 25 #include "views/controls/label.h" | 26 #include "views/controls/label.h" |
| 26 #include "views/controls/link.h" | 27 #include "views/controls/link.h" |
| 27 #include "views/controls/separator.h" | 28 #include "views/controls/separator.h" |
| 28 #include "views/layout/grid_layout.h" | |
| 29 #include "views/widget/widget.h" | 29 #include "views/widget/widget.h" |
| 30 | 30 |
| 31 namespace { | 31 namespace { |
| 32 | 32 |
| 33 // TODO(msw): Get color from theme/window color. | 33 // TODO(msw): Get color from theme/window color. |
| 34 const SkColor kColor = SK_ColorWHITE; | 34 const SkColor kColor = SK_ColorWHITE; |
| 35 | 35 |
| 36 // Layout constants. | 36 // Layout constants. |
| 37 const int kHGapToBorder = 11; | 37 const int kHGapToBorder = 11; |
| 38 const int kVerticalSectionPadding = 8; | 38 const int kVerticalSectionPadding = 8; |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 const GURL& url, | 476 const GURL& url, |
| 477 const NavigationEntry::SSLStatus& ssl, | 477 const NavigationEntry::SSLStatus& ssl, |
| 478 bool show_history) { | 478 bool show_history) { |
| 479 PageInfoBubbleView* page_info_bubble = | 479 PageInfoBubbleView* page_info_bubble = |
| 480 new PageInfoBubbleView(anchor_view, profile, url, ssl, show_history); | 480 new PageInfoBubbleView(anchor_view, profile, url, ssl, show_history); |
| 481 views::BubbleDelegateView::CreateBubble(page_info_bubble); | 481 views::BubbleDelegateView::CreateBubble(page_info_bubble); |
| 482 page_info_bubble->Show(); | 482 page_info_bubble->Show(); |
| 483 } | 483 } |
| 484 | 484 |
| 485 } | 485 } |
| OLD | NEW |