blob: f737ae205895e13542b6b8ddf0b60d6093cf8b28 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_CHROMEOS_ENROLLMENT_DIALOG_VIEW_H_
#define CHROME_BROWSER_CHROMEOS_ENROLLMENT_DIALOG_VIEW_H_
#pragma once
#include "base/callback.h"
#include "googleurl/src/gurl.h"
#include "net/base/cert_database.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/views/window/dialog_delegate.h"
namespace chromeos {
class EnrollmentDelegate;
// Dialog for certificate enrollment. This displays the content from the
// certificate enrollment URI.
class EnrollmentDialogView
: public views::DialogDelegateView,
public net::CertDatabase::Observer {
public:
virtual ~EnrollmentDialogView();
static EnrollmentDelegate* CreateEnrollmentDelegate(
gfx::NativeWindow owning_window);
static void ShowDialog(gfx::NativeWindow owning_window,
const GURL& target_uri,
const base::Closure& connect);
void Close();
// views::DialogDelegateView overrides
virtual int GetDialogButtons() const OVERRIDE;
virtual void OnClose() OVERRIDE;
// views::WidgetDelegate overrides
virtual ui::ModalType GetModalType() const OVERRIDE;
virtual string16 GetWindowTitle() const OVERRIDE;
// views::View overrides
virtual gfx::Size GetPreferredSize() OVERRIDE;
// views::Widget overrides
virtual views::View* GetContentsView() OVERRIDE;
// net::CertDatabase::Observer overrides
virtual void OnUserCertAdded(const net::X509Certificate* cert) OVERRIDE;
private:
EnrollmentDialogView(const GURL& target_uri,
const base::Closure& connect);
void InitDialog();
GURL target_uri_;
base::Closure connect_;
bool added_cert_;
};
} // namespace chromeos
#endif // CHROME_BROWSER_CHROMEOS_ENROLLMENT_DIALOG_VIEW_H_
|