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

Side by Side Diff: chrome/browser/page_info_window.cc

Issue 159521: Implementation of the page info dialog on Linux Gtk. (Closed)
Patch Set: Fix build Created 11 years, 4 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
« no previous file with comments | « chrome/browser/page_info_window.h ('k') | chrome/browser/views/browser_dialogs.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/page_info_window.h"
6
7 #include "chrome/common/pref_names.h"
8 #include "chrome/common/pref_service.h"
9
10 PageInfoWindow::PageInfoWindow() : cert_id_(0) {
11 }
12
13 PageInfoWindow::~PageInfoWindow() {
14 }
15
16 #if defined(OS_LINUX)
17 // TODO(rsesek): Remove once we have a PageInfoWindowLinux implementation
18 PageInfoWindow* PageInfoWindow::Factory() {
19 NOTIMPLEMENTED();
20 return NULL;
21 }
22 #endif
23
24 // static
25 void PageInfoWindow::CreatePageInfo(Profile* profile,
26 NavigationEntry* nav_entry,
27 gfx::NativeView parent,
28 PageInfoWindow::TabID tab) {
29 PageInfoWindow* window = Factory();
30 window->Init(profile, nav_entry->url(), nav_entry->ssl(),
31 nav_entry->page_type(), true, parent);
32 window->Show();
33 }
34
35 // static
36 void PageInfoWindow::CreateFrameInfo(Profile* profile,
37 const GURL& url,
38 const NavigationEntry::SSLStatus& ssl,
39 gfx::NativeView parent,
40 TabID tab) {
41 PageInfoWindow* window = Factory();
42 window->Init(profile, url, ssl, NavigationEntry::NORMAL_PAGE,
43 false, parent);
44 window->Show();
45 }
46
47 // static
48 void PageInfoWindow::RegisterPrefs(PrefService* prefs) {
49 prefs->RegisterDictionaryPref(prefs::kPageInfoWindowPlacement);
50 }
51
52 // static
53 std::string PageInfoWindow::GetIssuerName(
54 const net::X509Certificate::Principal& issuer) {
55 if (!issuer.common_name.empty())
56 return issuer.common_name;
57 if (!issuer.organization_names.empty())
58 return issuer.organization_names[0];
59 if (!issuer.organization_unit_names.empty())
60 return issuer.organization_unit_names[0];
61
62 return std::string();
63 }
OLDNEW
« no previous file with comments | « chrome/browser/page_info_window.h ('k') | chrome/browser/views/browser_dialogs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698