| OLD | NEW |
| 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_JSMESSAGE_BOX_HANDLER_WIN_H_ | 5 #ifndef CHROME_BROWSER_JSMESSAGE_BOX_HANDLER_WIN_H_ |
| 6 #define CHROME_BROWSER_JSMESSAGE_BOX_HANDLER_WIN_H_ | 6 #define CHROME_BROWSER_JSMESSAGE_BOX_HANDLER_WIN_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/jsmessage_box_handler.h" | 8 #include "chrome/browser/jsmessage_box_handler.h" |
| 9 #include "chrome/common/ipc_message.h" | 9 #include "chrome/common/ipc_message.h" |
| 10 #include "chrome/common/notification_observer.h" | 10 #include "chrome/common/notification_observer.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 virtual bool Cancel(); | 37 virtual bool Cancel(); |
| 38 virtual bool Accept(); | 38 virtual bool Accept(); |
| 39 | 39 |
| 40 // views::AppModalDialogDelegate | 40 // views::AppModalDialogDelegate |
| 41 virtual void ShowModalDialog(); | 41 virtual void ShowModalDialog(); |
| 42 virtual void ActivateModalDialog(); | 42 virtual void ActivateModalDialog(); |
| 43 | 43 |
| 44 // views::WindowDelegate Methods: | 44 // views::WindowDelegate Methods: |
| 45 virtual bool IsModal() const { return true; } | 45 virtual bool IsModal() const { return true; } |
| 46 virtual views::View* GetContentsView(); | 46 virtual views::View* GetContentsView(); |
| 47 virtual views::View* GetInitiallyFocusedView() const; | 47 virtual views::View* GetInitiallyFocusedView(); |
| 48 | 48 |
| 49 private: | 49 private: |
| 50 // NotificationObserver implementation. | 50 // NotificationObserver implementation. |
| 51 virtual void Observe(NotificationType type, | 51 virtual void Observe(NotificationType type, |
| 52 const NotificationSource& source, | 52 const NotificationSource& source, |
| 53 const NotificationDetails& details); | 53 const NotificationDetails& details); |
| 54 | 54 |
| 55 NotificationRegistrar registrar_; | 55 NotificationRegistrar registrar_; |
| 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 IPC message used to reply to the renderer when the message box | 60 // The IPC message used to reply to the renderer when the message box |
| 61 // is dismissed. | 61 // is dismissed. |
| 62 IPC::Message* reply_msg_; | 62 IPC::Message* reply_msg_; |
| 63 | 63 |
| 64 // The associated WebContents. Used to send IPC messages to the renderer. | 64 // The associated WebContents. Used to send IPC messages to the renderer. |
| 65 WebContents* web_contents_; | 65 WebContents* web_contents_; |
| 66 | 66 |
| 67 // Stores flags defined in message_box_view.h which describe the dialog box. | 67 // Stores flags defined in message_box_view.h which describe the dialog box. |
| 68 int dialog_flags_; | 68 int dialog_flags_; |
| 69 | 69 |
| 70 // The dialog if it is currently visible. | 70 // The dialog if it is currently visible. |
| 71 views::Window* dialog_; | 71 views::Window* dialog_; |
| 72 | 72 |
| 73 DISALLOW_COPY_AND_ASSIGN(JavascriptMessageBoxHandler); | 73 DISALLOW_COPY_AND_ASSIGN(JavascriptMessageBoxHandler); |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 #endif // CHROME_BROWSER_JSMESSAGE_BOX_HANDLER_WIN_H_ | 76 #endif // CHROME_BROWSER_JSMESSAGE_BOX_HANDLER_WIN_H_ |
| OLD | NEW |