Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(518)

Side by Side Diff: chrome/browser/views/jsmessage_box_dialog.h

Issue 63033: Refactor AppModalDialogQueue and move JS Alert boxes into a MVC. (Closed)
Patch Set: whitespace Created 11 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/views/browser_views.vcproj ('k') | chrome/browser/views/jsmessage_box_dialog.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2006-2008 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_JSMESSAGE_BOX_DIALOG_H_
6 #define CHROME_BROWSER_VIEWS_JSMESSAGE_BOX_DIALOG_H_
7
8 #include <string>
9
10 #include "chrome/browser/app_modal_dialog.h"
11 #include "chrome/views/window/dialog_delegate.h"
12
13 class MessageBoxView;
14 class WebContents;
15 namespace views {
16 class Window;
17 }
18
19 class JavascriptMessageBoxDialog : public views::DialogDelegate {
20 public:
21 JavascriptMessageBoxDialog(AppModalDialog* parent,
22 const std::wstring& message_text,
23 const std::wstring& default_prompt_text,
24 bool display_suppress_checkbox);
25
26 virtual ~JavascriptMessageBoxDialog();
27
28 // Methods called from AppModalDialog.
29 void ShowModalDialog();
30 void ActivateModalDialog();
31 void CloseModalDialog();
32
33 // views::DialogDelegate Methods:
34 virtual int GetDialogButtons() const;
35 virtual std::wstring GetWindowTitle() const;
36 virtual void WindowClosing();
37 virtual void DeleteDelegate();
38 virtual bool Cancel();
39 virtual bool Accept();
40 virtual std::wstring GetDialogButtonLabel(DialogButton button) const;
41
42 // views::WindowDelegate Methods:
43 virtual bool IsModal() const { return true; }
44 virtual views::View* GetContentsView();
45 virtual views::View* GetInitiallyFocusedView();
46
47 private:
48 WebContents* web_contents() {
49 return parent_->web_contents();
50 }
51
52 // A pointer to the AppModalDialog that owns us.
53 AppModalDialog* parent_;
54
55 // The message box view whose commands we handle.
56 MessageBoxView* message_box_view_;
57
58 // The dialog if it is currently visible.
59 views::Window* dialog_;
60
61 DISALLOW_COPY_AND_ASSIGN(JavascriptMessageBoxDialog);
62 };
63
64 #endif // CHROME_BROWSER_VIEWS_JSMESSAGE_BOX_DIALOG_H_
OLDNEW
« no previous file with comments | « chrome/browser/views/browser_views.vcproj ('k') | chrome/browser/views/jsmessage_box_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698