blob: 5f65f994a13a5016acc309dd9f3cb13dccdb77b6 (
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
|
// Copyright (c) 2009 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_GTK_DOWNLOAD_REQUEST_DIALOG_DELEGATE_GTK_H_
#define CHROME_BROWSER_GTK_DOWNLOAD_REQUEST_DIALOG_DELEGATE_GTK_H_
#include <gtk/gtk.h>
#include "chrome/browser/download/download_request_dialog_delegate.h"
#include "chrome/browser/gtk/constrained_window_gtk.h"
class DownloadRequestDialogDelegateGtk : public DownloadRequestDialogDelegate,
public ConstrainedWindowGtkDelegate {
public:
DownloadRequestDialogDelegateGtk(TabContents* tab,
DownloadRequestManager::TabDownloadState* host);
virtual ~DownloadRequestDialogDelegateGtk();
private:
// DownloadRequestDialogDelegate methods.
virtual void CloseWindow();
// ConstrainedWindowGtkDelegate methods.
virtual GtkWidget* GetWidgetRoot();
virtual void DeleteDelegate();
// Other methods.
static void OnAllowClickedThunk(GtkButton* button,
DownloadRequestDialogDelegateGtk* delegate) {
delegate->OnAllowClicked();
}
void OnAllowClicked();
static void OnDenyClickedThunk(GtkButton* button,
DownloadRequestDialogDelegateGtk* delegate) {
delegate->OnDenyClicked();
}
void OnDenyClicked();
// The ConstrainedWindow that is hosting our DownloadRequestDialog.
ConstrainedWindow* window_;
// Our root widget.
OwnedWidgetGtk root_;
// Tracks whether we have responded so we can send a cancel response
// when we are getting deleted. DRDDWin gets this for free from its
// views::DialogDelegate superclass.
bool responded_;
DISALLOW_COPY_AND_ASSIGN(DownloadRequestDialogDelegateGtk);
};
#endif // CHROME_BROWSER_GTK_DOWNLOAD_REQUEST_DIALOG_DELEGATE_GTK_H_
|