mirror of
https://github.com/electron/electron.git
synced 2026-01-25 23:38:18 -05:00
Expose the certificate trust panel as part of app
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "atom/browser/api/atom_api_certificate_trust.h"
|
||||
#include "atom/browser/api/atom_api_menu.h"
|
||||
#include "atom/browser/api/atom_api_session.h"
|
||||
#include "atom/browser/api/atom_api_web_contents.h"
|
||||
@@ -810,6 +811,16 @@ void App::OnCertificateManagerModelCreated(
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
void App::ShowCertificateTrust(atom::NativeWindow* parent_window,
|
||||
const net::X509Certificate& cert,
|
||||
std::string message,
|
||||
const ShowTrustCallback& callback,
|
||||
mate::Arguments* args) {
|
||||
ShowCertificateTrustUI(parent_window, cert, message, callback);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(OS_WIN)
|
||||
v8::Local<v8::Value> App::GetJumpListSettings() {
|
||||
JumpList jump_list(Browser::Get()->GetAppUserModelID());
|
||||
@@ -949,6 +960,7 @@ void App::BuildPrototype(
|
||||
base::Bind(&Browser::GetCurrentActivityType, browser))
|
||||
.SetMethod("setAboutPanelOptions",
|
||||
base::Bind(&Browser::SetAboutPanelOptions, browser))
|
||||
// .SetMethod("showCertificateTrust", &App::ShowCertificateTrust)
|
||||
#endif
|
||||
#if defined(OS_WIN)
|
||||
.SetMethod("setUserTasks", base::Bind(&Browser::SetUserTasks, browser))
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "atom/browser/api/atom_api_certificate_trust.h"
|
||||
#include "atom/browser/api/event_emitter.h"
|
||||
#include "atom/browser/atom_browser_client.h"
|
||||
#include "atom/browser/browser.h"
|
||||
@@ -19,6 +20,7 @@
|
||||
#include "content/public/browser/gpu_data_manager_observer.h"
|
||||
#include "native_mate/handle.h"
|
||||
#include "net/base/completion_callback.h"
|
||||
#include "net/cert/x509_certificate.h"
|
||||
|
||||
#if defined(USE_NSS_CERTS)
|
||||
#include "chrome/browser/certificate_manager_model.h"
|
||||
@@ -151,6 +153,15 @@ class App : public AtomBrowserClient::Delegate,
|
||||
std::unique_ptr<CertificateManagerModel> certificate_manager_model_;
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
void ShowCertificateTrust(atom::NativeWindow* parent_window,
|
||||
const net::X509Certificate& cert,
|
||||
std::string message,
|
||||
const ShowTrustCallback& callback,
|
||||
mate::Arguments* args);
|
||||
#endif
|
||||
|
||||
// Tracks tasks requesting file icons.
|
||||
base::CancelableTaskTracker cancelable_task_tracker_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user