Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / ui / views / javascript_app_modal_dialog_views.h
blobe18d7724ea0c0d49cb2a99229bd8ab7cc4219ba3
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.
5 #ifndef CHROME_BROWSER_UI_VIEWS_JAVASCRIPT_APP_MODAL_DIALOG_VIEWS_H_
6 #define CHROME_BROWSER_UI_VIEWS_JAVASCRIPT_APP_MODAL_DIALOG_VIEWS_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/ui/app_modal_dialogs/native_app_modal_dialog.h"
10 #include "ui/views/window/dialog_delegate.h"
12 class JavaScriptAppModalDialog;
14 namespace views {
15 class MessageBoxView;
18 class JavaScriptAppModalDialogViews : public NativeAppModalDialog,
19 public views::DialogDelegate {
20 public:
21 explicit JavaScriptAppModalDialogViews(JavaScriptAppModalDialog* parent);
22 virtual ~JavaScriptAppModalDialogViews();
24 // Overridden from NativeAppModalDialog:
25 virtual int GetAppModalDialogButtons() const OVERRIDE;
26 virtual void ShowAppModalDialog() OVERRIDE;
27 virtual void ActivateAppModalDialog() OVERRIDE;
28 virtual void CloseAppModalDialog() OVERRIDE;
29 virtual void AcceptAppModalDialog() OVERRIDE;
30 virtual void CancelAppModalDialog() OVERRIDE;
32 // Overridden from views::DialogDelegate:
33 virtual int GetDefaultDialogButton() const OVERRIDE;
34 virtual int GetDialogButtons() const OVERRIDE;
35 virtual base::string16 GetWindowTitle() const OVERRIDE;
36 virtual void WindowClosing() OVERRIDE;
37 virtual void DeleteDelegate() OVERRIDE;
38 virtual bool Cancel() OVERRIDE;
39 virtual bool Accept() OVERRIDE;
40 virtual base::string16 GetDialogButtonLabel(
41 ui::DialogButton button) const OVERRIDE;
43 // Overridden from views::WidgetDelegate:
44 virtual ui::ModalType GetModalType() const OVERRIDE;
45 virtual views::View* GetContentsView() OVERRIDE;
46 virtual views::View* GetInitiallyFocusedView() OVERRIDE;
47 virtual void OnClosed() OVERRIDE;
48 virtual views::Widget* GetWidget() OVERRIDE;
49 virtual const views::Widget* GetWidget() const OVERRIDE;
51 private:
52 // A pointer to the AppModalDialog that owns us.
53 scoped_ptr<JavaScriptAppModalDialog> parent_;
55 // The message box view whose commands we handle.
56 views::MessageBoxView* message_box_view_;
58 DISALLOW_COPY_AND_ASSIGN(JavaScriptAppModalDialogViews);
61 #endif // CHROME_BROWSER_UI_VIEWS_JAVASCRIPT_APP_MODAL_DIALOG_VIEWS_H_