| OLD | NEW |
| 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/page_info/page_info_ui.h" | 5 #include "chrome/browser/ui/page_info/page_info_ui.h" |
| 6 | 6 |
| 7 #include <utility> |
| 8 |
| 9 #include "base/command_line.h" |
| 7 #include "base/macros.h" | 10 #include "base/macros.h" |
| 8 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 11 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
| 9 #include "chrome/browser/plugins/plugin_utils.h" | 12 #include "chrome/browser/plugins/plugin_utils.h" |
| 10 #include "chrome/browser/plugins/plugins_field_trial.h" | 13 #include "chrome/browser/plugins/plugins_field_trial.h" |
| 11 #include "chrome/common/chrome_features.h" | 14 #include "chrome/common/chrome_features.h" |
| 15 #include "chrome/common/chrome_switches.h" |
| 12 #include "chrome/grit/chromium_strings.h" | 16 #include "chrome/grit/chromium_strings.h" |
| 13 #include "chrome/grit/generated_resources.h" | 17 #include "chrome/grit/generated_resources.h" |
| 14 #include "chrome/grit/theme_resources.h" | 18 #include "chrome/grit/theme_resources.h" |
| 15 #include "components/strings/grit/components_strings.h" | 19 #include "components/strings/grit/components_strings.h" |
| 16 #include "ppapi/features/features.h" | 20 #include "ppapi/features/features.h" |
| 17 #include "ui/base/l10n/l10n_util.h" | 21 #include "ui/base/l10n/l10n_util.h" |
| 18 #include "ui/base/resource/resource_bundle.h" | 22 #include "ui/base/resource/resource_bundle.h" |
| 19 #include "ui/gfx/image/image.h" | 23 #include "ui/gfx/image/image.h" |
| 20 | 24 |
| 21 namespace { | 25 namespace { |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 } | 381 } |
| 378 return resource_id; | 382 return resource_id; |
| 379 } | 383 } |
| 380 | 384 |
| 381 // static | 385 // static |
| 382 const gfx::Image& PageInfoUI::GetConnectionIcon( | 386 const gfx::Image& PageInfoUI::GetConnectionIcon( |
| 383 PageInfo::SiteConnectionStatus status) { | 387 PageInfo::SiteConnectionStatus status) { |
| 384 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 388 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
| 385 return rb.GetNativeImageNamed(GetConnectionIconID(status)); | 389 return rb.GetNativeImageNamed(GetConnectionIconID(status)); |
| 386 } | 390 } |
| 391 |
| 392 // static |
| 393 const gfx::Image& PageInfoUI::GetCertificateIcon() { |
| 394 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
| 395 return rb.GetNativeImageNamed(IDR_CERTIFICATE); |
| 396 } |
| 397 |
| 398 // static |
| 399 bool PageInfoUI::ShouldShowCertificateLink() { |
| 400 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 401 switches::kShowCertLink); |
| 402 } |
| OLD | NEW |