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

Side by Side Diff: chrome/browser/ui/page_info/page_info_ui.cc

Issue 2737413004: Add a Certificate Viewer link to the Page Info dropdown (Closed)
Patch Set: Rebase, update tooltip Created 3 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
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/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/permissions/permission_manager.h" 12 #include "chrome/browser/permissions/permission_manager.h"
10 #include "chrome/browser/permissions/permission_result.h" 13 #include "chrome/browser/permissions/permission_result.h"
11 #include "chrome/browser/permissions/permission_util.h" 14 #include "chrome/browser/permissions/permission_util.h"
12 #include "chrome/browser/plugins/plugin_utils.h" 15 #include "chrome/browser/plugins/plugin_utils.h"
13 #include "chrome/browser/plugins/plugins_field_trial.h" 16 #include "chrome/browser/plugins/plugins_field_trial.h"
14 #include "chrome/common/chrome_features.h" 17 #include "chrome/common/chrome_features.h"
18 #include "chrome/common/chrome_switches.h"
15 #include "chrome/grit/chromium_strings.h" 19 #include "chrome/grit/chromium_strings.h"
16 #include "chrome/grit/generated_resources.h" 20 #include "chrome/grit/generated_resources.h"
17 #include "chrome/grit/theme_resources.h" 21 #include "chrome/grit/theme_resources.h"
18 #include "components/strings/grit/components_chromium_strings.h" 22 #include "components/strings/grit/components_chromium_strings.h"
19 #include "components/strings/grit/components_strings.h" 23 #include "components/strings/grit/components_strings.h"
20 #include "ppapi/features/features.h" 24 #include "ppapi/features/features.h"
21 #include "ui/base/l10n/l10n_util.h" 25 #include "ui/base/l10n/l10n_util.h"
22 #include "ui/base/resource/resource_bundle.h" 26 #include "ui/base/resource/resource_bundle.h"
23 #include "ui/gfx/image/image.h" 27 #include "ui/gfx/image/image.h"
24 #include "url/gurl.h" 28 #include "url/gurl.h"
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 } 445 }
442 return resource_id; 446 return resource_id;
443 } 447 }
444 448
445 // static 449 // static
446 const gfx::Image& PageInfoUI::GetConnectionIcon( 450 const gfx::Image& PageInfoUI::GetConnectionIcon(
447 PageInfo::SiteConnectionStatus status) { 451 PageInfo::SiteConnectionStatus status) {
448 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 452 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
449 return rb.GetNativeImageNamed(GetConnectionIconID(status)); 453 return rb.GetNativeImageNamed(GetConnectionIconID(status));
450 } 454 }
455
456 // static
457 const gfx::Image& PageInfoUI::GetCertificateIcon() {
458 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
459 return rb.GetNativeImageNamed(IDR_CERTIFICATE);
460 }
461
462 // static
463 bool PageInfoUI::ShouldShowCertificateLink() {
464 return base::CommandLine::ForCurrentProcess()->HasSwitch(
465 switches::kShowCertLink);
466 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/page_info/page_info_ui.h ('k') | chrome/browser/ui/views/page_info/page_info_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698