OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 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_VIEWS_UPDATE_RECOMMENDED_MESSAGE_BOX_H_ |
| 6 #define CHROME_BROWSER_VIEWS_UPDATE_RECOMMENDED_MESSAGE_BOX_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "gfx/native_widget_types.h" |
| 10 #include "views/window/dialog_delegate.h" |
| 11 |
| 12 class MessageBoxView; |
| 13 class PrefService; |
| 14 |
| 15 // A dialog box that tells the user that an update is recommended in order for |
| 16 // the latest version to be put to use. |
| 17 class UpdateRecommendedMessageBox : public views::DialogDelegate { |
| 18 public: |
| 19 // This box is modal to |parent_window|. |
| 20 static void ShowMessageBox(gfx::NativeWindow parent_window); |
| 21 |
| 22 // Register preferences specific to this view. |
| 23 static void RegisterUpdateRecommendedPrefs(PrefService* prefs); |
| 24 |
| 25 // Overridden from views::DialogDelegate: |
| 26 virtual bool Accept(); |
| 27 |
| 28 protected: |
| 29 // Overridden from views::DialogDelegate: |
| 30 virtual int GetDialogButtons() const; |
| 31 virtual std::wstring GetDialogButtonLabel( |
| 32 MessageBoxFlags::DialogButton button) const; |
| 33 virtual std::wstring GetWindowTitle() const; |
| 34 |
| 35 // Overridden from views::WindowDelegate: |
| 36 virtual void DeleteDelegate(); |
| 37 virtual bool IsModal() const; |
| 38 virtual views::View* GetContentsView(); |
| 39 |
| 40 private: |
| 41 explicit UpdateRecommendedMessageBox(gfx::NativeWindow parent_window); |
| 42 virtual ~UpdateRecommendedMessageBox(); |
| 43 |
| 44 MessageBoxView* message_box_view_; |
| 45 |
| 46 DISALLOW_COPY_AND_ASSIGN(UpdateRecommendedMessageBox); |
| 47 }; |
| 48 |
| 49 #endif // CHROME_BROWSER_VIEWS_UPDATE_RECOMMENDED_MESSAGE_BOX_H_ |
OLD | NEW |