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

Side by Side Diff: chrome/browser/ui/webui/tab_modal_confirm_dialog_webui.h

Issue 8986005: Reland r114898: Add TabModalConfirmDialogDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix and cleanup Created 9 years 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
OLDNEW
(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_CONFIRM_DIALOG_WEBUI_H_
6 #define CHROME_BROWSER_UI_WEBUI_TAB_MODAL_CONFIRM_DIALOG_WEBUI_H_
7 #pragma once
8
9 #if !(defined(USE_AURA) || defined(TOOLKIT_VIEWS))
10 #error Tab-modal confirm dialog should be shown with native UI.
11 #endif
12
13 #include "base/basictypes.h"
14 #include "base/memory/scoped_ptr.h"
15
16 class TabContentsWrapper;
17 class TabModalConfirmDialogDelegate;
18
19 // Displays a tab-modal dialog, i.e. a dialog that will block the current page
20 // but still allow the user to switch to a different page.
21 // To display the dialog, allocate this object on the heap. It will open the
22 // dialog from its constructor and then delete itself when the user dismisses
23 // the dialog.
24 class TabModalConfirmDialogUI {
25 public:
26 TabModalConfirmDialogUI(TabModalConfirmDialogDelegate* delegate,
27 TabContentsWrapper* wrapper);
28 ~TabModalConfirmDialogUI();
29
30 // Invoked when the dialog is closed. Notifies the controller of the user's
31 // response.
32 void OnDialogClosed(bool accept);
33
34 private:
35 scoped_ptr<TabModalConfirmDialogDelegate> delegate_;
36
37 DISALLOW_COPY_AND_ASSIGN(TabModalConfirmDialogUI);
38 };
39
40 #endif // CHROME_BROWSER_UI_WEBUI_TAB_MODAL_CONFIRM_DIALOG_WEBUI_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698