Home | History | Annotate | Download | only in download
      1 // Copyright (c) 2012 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_UI_VIEWS_DOWNLOAD_DOWNLOAD_IN_PROGRESS_DIALOG_VIEW_H_
      6 #define CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_IN_PROGRESS_DIALOG_VIEW_H_
      7 
      8 #include "base/basictypes.h"
      9 #include "base/compiler_specific.h"
     10 #include "ui/views/window/dialog_delegate.h"
     11 
     12 class Browser;
     13 
     14 namespace views {
     15 class MessageBoxView;
     16 }
     17 
     18 class DownloadInProgressDialogView : public views::DialogDelegate {
     19  public:
     20   static void Show(Browser* browser, gfx::NativeWindow parent);
     21 
     22  private:
     23   explicit DownloadInProgressDialogView(Browser* browser);
     24   virtual ~DownloadInProgressDialogView();
     25 
     26   // views::DialogDelegate:
     27   virtual int GetDefaultDialogButton() const OVERRIDE;
     28   virtual string16 GetDialogButtonLabel(ui::DialogButton button) const OVERRIDE;
     29   virtual bool Cancel() OVERRIDE;
     30   virtual bool Accept() OVERRIDE;
     31 
     32   // views::WidgetDelegate:
     33   virtual ui::ModalType GetModalType() const OVERRIDE;
     34   virtual string16 GetWindowTitle() const OVERRIDE;
     35   virtual void DeleteDelegate() OVERRIDE;
     36   virtual views::Widget* GetWidget() OVERRIDE;
     37   virtual const views::Widget* GetWidget() const OVERRIDE;
     38   virtual views::View* GetContentsView() OVERRIDE;
     39 
     40   Browser* browser_;
     41   views::MessageBoxView* message_box_view_;
     42 
     43   string16 title_text_;
     44   string16 ok_button_text_;
     45   string16 cancel_button_text_;
     46 
     47   gfx::Size dialog_dimensions_;
     48 
     49   DISALLOW_COPY_AND_ASSIGN(DownloadInProgressDialogView);
     50 };
     51 
     52 #endif  // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_IN_PROGRESS_DIALOG_VIEW_H_
     53