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

Side by Side Diff: chrome/browser/ui/cocoa/tab_modal_confirm_dialog_mac.h

Issue 11361046: Remove TabContents from TabModalConfirmDialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: missing include Created 8 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
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/cocoa/tab_modal_confirm_dialog_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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_UI_COCOA_TAB_MODAL_CONFIRM_DIALOG_MAC_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_TAB_MODAL_CONFIRM_DIALOG_MAC_H_
6 #define CHROME_BROWSER_UI_COCOA_TAB_MODAL_CONFIRM_DIALOG_MAC_H_ 6 #define CHROME_BROWSER_UI_COCOA_TAB_MODAL_CONFIRM_DIALOG_MAC_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "chrome/browser/ui/cocoa/constrained_window_mac.h" 11 #include "chrome/browser/ui/cocoa/constrained_window_mac.h"
12 #include "chrome/browser/ui/cocoa/constrained_window/constrained_window_mac2.h" 12 #include "chrome/browser/ui/cocoa/constrained_window/constrained_window_mac2.h"
13 #include "chrome/browser/ui/tab_modal_confirm_dialog.h" 13 #include "chrome/browser/ui/tab_modal_confirm_dialog.h"
14 14
15 @class ConstrainedWindowAlert; 15 @class ConstrainedWindowAlert;
16 class TabContents;
17 class TabModalConfirmDialogDelegate; 16 class TabModalConfirmDialogDelegate;
18 17
18 namespace content {
19 class WebContents;
20 }
21
19 // Displays a tab-modal dialog, i.e. a dialog that will block the current page 22 // 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. 23 // 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 24 // 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 25 // dialog from its constructor and then delete itself when the user dismisses
23 // the dialog. 26 // the dialog.
24 class TabModalConfirmDialogMac 27 class TabModalConfirmDialogMac
25 : public TabModalConfirmDialog, 28 : public TabModalConfirmDialog,
26 public ConstrainedWindowMacDelegateSystemSheet { 29 public ConstrainedWindowMacDelegateSystemSheet {
27 public: 30 public:
28 TabModalConfirmDialogMac(TabModalConfirmDialogDelegate* delegate, 31 TabModalConfirmDialogMac(TabModalConfirmDialogDelegate* delegate,
29 TabContents* tab_contents); 32 content::WebContents* web_contents);
30 33
31 // ConstrainedWindowDelegateMacSystemSheet: 34 // ConstrainedWindowDelegateMacSystemSheet:
32 virtual void DeleteDelegate() OVERRIDE; 35 virtual void DeleteDelegate() OVERRIDE;
33 36
34 private: 37 private:
35 virtual ~TabModalConfirmDialogMac(); 38 virtual ~TabModalConfirmDialogMac();
36 39
37 // TabModalConfirmDialog: 40 // TabModalConfirmDialog:
38 virtual void AcceptTabModalDialog() OVERRIDE; 41 virtual void AcceptTabModalDialog() OVERRIDE;
39 virtual void CancelTabModalDialog() OVERRIDE; 42 virtual void CancelTabModalDialog() OVERRIDE;
40 43
41 scoped_ptr<TabModalConfirmDialogDelegate> delegate_; 44 scoped_ptr<TabModalConfirmDialogDelegate> delegate_;
42 45
43 DISALLOW_COPY_AND_ASSIGN(TabModalConfirmDialogMac); 46 DISALLOW_COPY_AND_ASSIGN(TabModalConfirmDialogMac);
44 }; 47 };
45 48
46 @class TabModalConfirmDialogMacBridge2; 49 @class TabModalConfirmDialogMacBridge2;
47 50
48 // This class is the same as TabModalConfirmDialogMac except that it uses 51 // This class is the same as TabModalConfirmDialogMac except that it uses
49 // the new constrained window look and feel. 52 // the new constrained window look and feel.
50 class TabModalConfirmDialogMac2 : public TabModalConfirmDialog, 53 class TabModalConfirmDialogMac2 : public TabModalConfirmDialog,
51 public ConstrainedWindowMacDelegate2 { 54 public ConstrainedWindowMacDelegate2 {
52 public: 55 public:
53 TabModalConfirmDialogMac2(TabModalConfirmDialogDelegate* delegate, 56 TabModalConfirmDialogMac2(TabModalConfirmDialogDelegate* delegate,
54 TabContents* tab_contents); 57 content::WebContents* web_contents);
55 58
56 private: 59 private:
57 virtual ~TabModalConfirmDialogMac2(); 60 virtual ~TabModalConfirmDialogMac2();
58 61
59 // TabModalConfirmDialog: 62 // TabModalConfirmDialog:
60 virtual void AcceptTabModalDialog() OVERRIDE; 63 virtual void AcceptTabModalDialog() OVERRIDE;
61 virtual void CancelTabModalDialog() OVERRIDE; 64 virtual void CancelTabModalDialog() OVERRIDE;
62 65
63 // ConstrainedWindowMacDelegate2: 66 // ConstrainedWindowMacDelegate2:
64 virtual void OnConstrainedWindowClosed( 67 virtual void OnConstrainedWindowClosed(
65 ConstrainedWindowMac2* window) OVERRIDE; 68 ConstrainedWindowMac2* window) OVERRIDE;
66 69
67 scoped_ptr<ConstrainedWindowMac2> window_; 70 scoped_ptr<ConstrainedWindowMac2> window_;
68 scoped_ptr<TabModalConfirmDialogDelegate> delegate_; 71 scoped_ptr<TabModalConfirmDialogDelegate> delegate_;
69 scoped_nsobject<ConstrainedWindowAlert> alert_; 72 scoped_nsobject<ConstrainedWindowAlert> alert_;
70 scoped_nsobject<TabModalConfirmDialogMacBridge2> bridge_; 73 scoped_nsobject<TabModalConfirmDialogMacBridge2> bridge_;
71 74
72 DISALLOW_COPY_AND_ASSIGN(TabModalConfirmDialogMac2); 75 DISALLOW_COPY_AND_ASSIGN(TabModalConfirmDialogMac2);
73 }; 76 };
74 77
75 #endif // CHROME_BROWSER_UI_COCOA_TAB_MODAL_CONFIRM_DIALOG_MAC_H_ 78 #endif // CHROME_BROWSER_UI_COCOA_TAB_MODAL_CONFIRM_DIALOG_MAC_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/cocoa/tab_modal_confirm_dialog_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698