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