• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_RESTART_MESSAGE_BOX_H_
6 #define CHROME_BROWSER_UI_VIEWS_RESTART_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 
13 namespace views {
14 class MessageBoxView;
15 }
16 
17 // A dialog box that tells the user that s/he needs to restart Chrome
18 // for a change to take effect.
19 class RestartMessageBox : public views::DialogDelegate {
20  public:
21   // This box is modal to |parent_window|.
22   static void ShowMessageBox(gfx::NativeWindow parent_window);
23 
24  protected:
25   // views::DialogDelegate:
26   virtual int GetDialogButtons() const;
27   virtual std::wstring GetDialogButtonLabel(
28       MessageBoxFlags::DialogButton button) const;
29   virtual std::wstring GetWindowTitle() const;
30 
31   // views::WindowDelegate:
32   virtual void DeleteDelegate();
33   virtual bool IsModal() const;
34   virtual views::View* GetContentsView();
35 
36  private:
37   explicit RestartMessageBox(gfx::NativeWindow parent_window);
38   virtual ~RestartMessageBox();
39 
40   views::MessageBoxView* message_box_view_;
41 
42   DISALLOW_COPY_AND_ASSIGN(RestartMessageBox);
43 };
44 
45 #endif  // CHROME_BROWSER_UI_VIEWS_RESTART_MESSAGE_BOX_H_
46