1 // Copyright (c) 2011 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 #pragma once 8 9 #include <string> 10 11 #include "base/basictypes.h" 12 #include "base/compiler_specific.h" 13 #include "base/string16.h" 14 #include "views/view.h" 15 #include "views/window/dialog_delegate.h" 16 17 class Browser; 18 19 namespace gfx { 20 class Size; 21 } 22 23 namespace views { 24 class Label; 25 } 26 27 class DownloadInProgressDialogView : public views::View, 28 public views::DialogDelegate { 29 public: 30 explicit DownloadInProgressDialogView(Browser* browser); 31 virtual ~DownloadInProgressDialogView(); 32 33 private: 34 // views::View: 35 virtual gfx::Size GetPreferredSize() OVERRIDE; 36 37 // views::DialogDelegate: 38 virtual std::wstring GetDialogButtonLabel( 39 MessageBoxFlags::DialogButton button) const OVERRIDE; 40 virtual int GetDefaultDialogButton() const OVERRIDE; 41 virtual bool Cancel() OVERRIDE; 42 virtual bool Accept() OVERRIDE; 43 virtual bool IsModal() const OVERRIDE; 44 virtual std::wstring GetWindowTitle() const OVERRIDE; 45 virtual views::View* GetContentsView() OVERRIDE; 46 47 Browser* browser_; 48 views::Label* warning_; 49 views::Label* explanation_; 50 51 std::wstring ok_button_text_; 52 std::wstring cancel_button_text_; 53 54 string16 product_name_; 55 56 gfx::Size dialog_dimensions_; 57 58 DISALLOW_COPY_AND_ASSIGN(DownloadInProgressDialogView); 59 }; 60 61 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_IN_PROGRESS_DIALOG_VIEW_H_ 62