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

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

Issue 373006: Implement window.alert() and its cousins for extensions.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_VIEWS_JSMESSAGE_BOX_DIALOG_H_ 5 #ifndef CHROME_BROWSER_VIEWS_JSMESSAGE_BOX_DIALOG_H_
6 #define CHROME_BROWSER_VIEWS_JSMESSAGE_BOX_DIALOG_H_ 6 #define CHROME_BROWSER_VIEWS_JSMESSAGE_BOX_DIALOG_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "chrome/browser/app_modal_dialog.h" 10 #include "chrome/browser/app_modal_dialog.h"
11 #include "views/window/dialog_delegate.h" 11 #include "views/window/dialog_delegate.h"
12 12
13 class MessageBoxView; 13 class MessageBoxView;
14 class TabContents; 14 class JavaScriptMessageBoxClient;
15 namespace views { 15 namespace views {
16 class Window; 16 class Window;
17 } 17 }
18 18
19 class JavascriptMessageBoxDialog : public views::DialogDelegate { 19 class JavascriptMessageBoxDialog : public views::DialogDelegate {
20 public: 20 public:
21 JavascriptMessageBoxDialog(AppModalDialog* parent, 21 JavascriptMessageBoxDialog(AppModalDialog* parent,
22 const std::wstring& message_text, 22 const std::wstring& message_text,
23 const std::wstring& default_prompt_text, 23 const std::wstring& default_prompt_text,
24 bool display_suppress_checkbox); 24 bool display_suppress_checkbox);
(...skipping 15 matching lines...) Expand all
40 virtual std::wstring GetDialogButtonLabel( 40 virtual std::wstring GetDialogButtonLabel(
41 MessageBoxFlags::DialogButton button) const; 41 MessageBoxFlags::DialogButton button) const;
42 42
43 // views::WindowDelegate Methods: 43 // views::WindowDelegate Methods:
44 virtual bool IsModal() const { return true; } 44 virtual bool IsModal() const { return true; }
45 virtual views::View* GetContentsView(); 45 virtual views::View* GetContentsView();
46 virtual views::View* GetInitiallyFocusedView(); 46 virtual views::View* GetInitiallyFocusedView();
47 virtual void OnClose(); 47 virtual void OnClose();
48 48
49 private: 49 private:
50 TabContents* tab_contents() { 50 JavaScriptMessageBoxClient* client() {
51 return parent_->tab_contents(); 51 return parent_->client();
52 } 52 }
53 53
54 // A pointer to the AppModalDialog that owns us. 54 // A pointer to the AppModalDialog that owns us.
55 AppModalDialog* parent_; 55 AppModalDialog* parent_;
56 56
57 // The message box view whose commands we handle. 57 // The message box view whose commands we handle.
58 MessageBoxView* message_box_view_; 58 MessageBoxView* message_box_view_;
59 59
60 // The dialog if it is currently visible. 60 // The dialog if it is currently visible.
61 views::Window* dialog_; 61 views::Window* dialog_;
62 62
63 DISALLOW_COPY_AND_ASSIGN(JavascriptMessageBoxDialog); 63 DISALLOW_COPY_AND_ASSIGN(JavascriptMessageBoxDialog);
64 }; 64 };
65 65
66 #endif // CHROME_BROWSER_VIEWS_JSMESSAGE_BOX_DIALOG_H_ 66 #endif // CHROME_BROWSER_VIEWS_JSMESSAGE_BOX_DIALOG_H_
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.cc ('k') | chrome/browser/views/jsmessage_box_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698