| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 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 #ifndef CHROME_BROWSER_GTK_DOWNLOAD_REQUEST_DIALOG_DELEGATE_GTK_H_ | |
| 6 #define CHROME_BROWSER_GTK_DOWNLOAD_REQUEST_DIALOG_DELEGATE_GTK_H_ | |
| 7 | |
| 8 #include <gtk/gtk.h> | |
| 9 | |
| 10 #include "chrome/browser/download/download_request_dialog_delegate.h" | |
| 11 #include "chrome/browser/gtk/constrained_window_gtk.h" | |
| 12 | |
| 13 class DownloadRequestDialogDelegateGtk : public DownloadRequestDialogDelegate, | |
| 14 public ConstrainedWindowGtkDelegate { | |
| 15 public: | |
| 16 DownloadRequestDialogDelegateGtk(TabContents* tab, | |
| 17 DownloadRequestManager::TabDownloadState* host); | |
| 18 | |
| 19 virtual ~DownloadRequestDialogDelegateGtk(); | |
| 20 | |
| 21 private: | |
| 22 // DownloadRequestDialogDelegate methods. | |
| 23 virtual void CloseWindow(); | |
| 24 | |
| 25 // ConstrainedWindowGtkDelegate methods. | |
| 26 virtual GtkWidget* GetWidgetRoot(); | |
| 27 virtual void DeleteDelegate(); | |
| 28 | |
| 29 // Other methods. | |
| 30 static void OnAllowClickedThunk(GtkButton* button, | |
| 31 DownloadRequestDialogDelegateGtk* delegate) { | |
| 32 delegate->OnAllowClicked(); | |
| 33 } | |
| 34 void OnAllowClicked(); | |
| 35 static void OnDenyClickedThunk(GtkButton* button, | |
| 36 DownloadRequestDialogDelegateGtk* delegate) { | |
| 37 delegate->OnDenyClicked(); | |
| 38 } | |
| 39 void OnDenyClicked(); | |
| 40 | |
| 41 // The ConstrainedWindow that is hosting our DownloadRequestDialog. | |
| 42 ConstrainedWindow* window_; | |
| 43 | |
| 44 // Our root widget. | |
| 45 OwnedWidgetGtk root_; | |
| 46 | |
| 47 // Tracks whether we have responded so we can send a cancel response | |
| 48 // when we are getting deleted. DRDDWin gets this for free from its | |
| 49 // views::DialogDelegate superclass. | |
| 50 bool responded_; | |
| 51 | |
| 52 DISALLOW_COPY_AND_ASSIGN(DownloadRequestDialogDelegateGtk); | |
| 53 }; | |
| 54 | |
| 55 #endif // CHROME_BROWSER_GTK_DOWNLOAD_REQUEST_DIALOG_DELEGATE_GTK_H_ | |
| OLD | NEW |