| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_APP_MODAL_DIALOG_H_ | 5 #ifndef CHROME_BROWSER_APP_MODAL_DIALOG_H_ |
| 6 #define CHROME_BROWSER_APP_MODAL_DIALOG_H_ | 6 #define CHROME_BROWSER_APP_MODAL_DIALOG_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
| 13 #include "chrome/common/notification_observer.h" | 13 #include "chrome/common/notification_observer.h" |
| 14 #include "chrome/common/notification_registrar.h" | 14 #include "chrome/common/notification_registrar.h" |
| 15 | 15 |
| 16 // Define NativeDialog type as platform specific dialog view. | 16 // Define NativeDialog type as platform specific dialog view. |
| 17 #if defined(OS_WIN) | 17 #if defined(OS_WIN) |
| 18 class ModalDialogDelegate; | 18 class ModalDialogDelegate; |
| 19 typedef ModalDialogDelegate* NativeDialog; | 19 typedef ModalDialogDelegate* NativeDialog; |
| 20 #elif defined(OS_MACOSX) | 20 #elif defined(OS_MACOSX) |
| 21 typedef void* NativeDialog; | 21 typedef void* NativeDialog; |
| 22 #elif defined(TOOLKIT_USES_GTK) | 22 #elif defined(TOOLKIT_USES_GTK) |
| 23 typedef struct _GtkDialog GtkDialog; | 23 typedef struct _GtkDialog GtkDialog; |
| 24 typedef struct _GtkWidget GtkWidget; | 24 typedef struct _GtkWidget GtkWidget; |
| 25 typedef int gint; | 25 typedef int gint; |
| 26 typedef GtkWidget* NativeDialog; | 26 typedef GtkWidget* NativeDialog; |
| 27 #endif | 27 #endif |
| 28 | 28 |
| 29 class TabContents; | 29 class TabContents; |
| 30 namespace IPC { | |
| 31 class Message; | |
| 32 } | |
| 33 | 30 |
| 34 // A controller+model base class for modal dialogs. | 31 // A controller+model base class for modal dialogs. |
| 35 class AppModalDialog { | 32 class AppModalDialog { |
| 36 public: | 33 public: |
| 37 // A union of data necessary to determine the type of message box to | 34 // A union of data necessary to determine the type of message box to |
| 38 // show. |tab_contents| parameter is optional, if provided that tab will be | 35 // show. |tab_contents| parameter is optional, if provided that tab will be |
| 39 // activated before the modal dialog is displayed. | 36 // activated before the modal dialog is displayed. |
| 40 AppModalDialog(TabContents* tab_contents, const std::wstring& title); | 37 AppModalDialog(TabContents* tab_contents, const std::wstring& title); |
| 41 virtual ~AppModalDialog(); | 38 virtual ~AppModalDialog(); |
| 42 | 39 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 | 102 |
| 106 // True if the dialog should no longer be shown, e.g. because the underlying | 103 // True if the dialog should no longer be shown, e.g. because the underlying |
| 107 // tab navigated away while the dialog was queued. | 104 // tab navigated away while the dialog was queued. |
| 108 bool skip_this_dialog_; | 105 bool skip_this_dialog_; |
| 109 | 106 |
| 110 private: | 107 private: |
| 111 DISALLOW_COPY_AND_ASSIGN(AppModalDialog); | 108 DISALLOW_COPY_AND_ASSIGN(AppModalDialog); |
| 112 }; | 109 }; |
| 113 | 110 |
| 114 #endif // CHROME_BROWSER_APP_MODAL_DIALOG_H_ | 111 #endif // CHROME_BROWSER_APP_MODAL_DIALOG_H_ |
| OLD | NEW |