| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2011 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_UI_WEBUI_TAB_MODAL_DIALOG_UI_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_TAB_MODAL_DIALOG_UI_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/basictypes.h" |
| 10 #include "base/memory/scoped_ptr.h" |
| 11 |
| 12 class TabContents; |
| 13 class TabModalDialogDelegate; |
| 14 |
| 15 // Displays a tab-modal dialog, i.e. a dialog that will block the current page |
| 16 // but still allow the user to switch to a different page. |
| 17 // To display the dialog, allocate this object on the heap. It will open the |
| 18 // dialog from its constructor and then delete itself when the user dismisses |
| 19 // the dialog. |
| 20 class TabModalDialogUI { |
| 21 public: |
| 22 TabModalDialogUI(TabModalDialogDelegate* delegate, |
| 23 TabContents* tab_contents); |
| 24 ~TabModalDialogUI(); |
| 25 |
| 26 // Invoked when the dialog is closed. Notifies the controller of the user's |
| 27 // response. |
| 28 void OnDialogClosed(bool accept); |
| 29 |
| 30 private: |
| 31 scoped_ptr<TabModalDialogDelegate> delegate_; |
| 32 |
| 33 DISALLOW_COPY_AND_ASSIGN(TabModalDialogUI); |
| 34 }; |
| 35 |
| 36 #endif // CHROME_BROWSER_UI_WEBUI_TAB_MODAL_DIALOG_UI_H_ |
| OLD | NEW |