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

Side by Side Diff: chrome/browser/ui/views/tab_modal_confirm_dialog_views.h

Issue 10540100: TabContentsWrapper -> TabContents, part 48. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 6 months 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
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_VIEWS_TAB_MODAL_CONFIRM_DIALOG_VIEWS_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TAB_MODAL_CONFIRM_DIALOG_VIEWS_H_
6 #define CHROME_BROWSER_UI_VIEWS_TAB_MODAL_CONFIRM_DIALOG_VIEWS_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TAB_MODAL_CONFIRM_DIALOG_VIEWS_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ui/gfx/native_widget_types.h" 9 #include "ui/gfx/native_widget_types.h"
10 #include "ui/views/window/dialog_delegate.h" 10 #include "ui/views/window/dialog_delegate.h"
11 11
12 class TabContents; 12 class TabContents;
13 typedef TabContents TabContentsWrapper;
14 class TabModalConfirmDialogDelegate; 13 class TabModalConfirmDialogDelegate;
15 14
16 namespace views { 15 namespace views {
17 class MessageBoxView; 16 class MessageBoxView;
18 } 17 }
19 18
20 // Displays a tab-modal dialog, i.e. a dialog that will block the current page 19 // Displays a tab-modal dialog, i.e. a dialog that will block the current page
21 // but still allow the user to switch to a different page. 20 // but still allow the user to switch to a different page.
22 // To display the dialog, allocate this object on the heap. It will open the 21 // To display the dialog, allocate this object on the heap. It will open the
23 // dialog from its constructor and then delete itself when the user dismisses 22 // dialog from its constructor and then delete itself when the user dismisses
24 // the dialog. 23 // the dialog.
25 class TabModalConfirmDialogViews : public views::DialogDelegate { 24 class TabModalConfirmDialogViews : public views::DialogDelegate {
26 public: 25 public:
27 TabModalConfirmDialogViews(TabModalConfirmDialogDelegate* delegate, 26 TabModalConfirmDialogViews(TabModalConfirmDialogDelegate* delegate,
28 TabContentsWrapper* wrapper); 27 TabContents* tab_contents);
29 28
30 // views::DialogDelegate: 29 // views::DialogDelegate:
31 virtual string16 GetWindowTitle() const OVERRIDE; 30 virtual string16 GetWindowTitle() const OVERRIDE;
32 virtual string16 GetDialogButtonLabel(ui::DialogButton button) const OVERRIDE; 31 virtual string16 GetDialogButtonLabel(ui::DialogButton button) const OVERRIDE;
33 virtual bool Cancel() OVERRIDE; 32 virtual bool Cancel() OVERRIDE;
34 virtual bool Accept() OVERRIDE; 33 virtual bool Accept() OVERRIDE;
35 34
36 // views::WidgetDelegate: 35 // views::WidgetDelegate:
37 virtual views::View* GetContentsView() OVERRIDE; 36 virtual views::View* GetContentsView() OVERRIDE;
38 virtual views::Widget* GetWidget() OVERRIDE; 37 virtual views::Widget* GetWidget() OVERRIDE;
39 virtual const views::Widget* GetWidget() const OVERRIDE; 38 virtual const views::Widget* GetWidget() const OVERRIDE;
40 virtual void DeleteDelegate() OVERRIDE; 39 virtual void DeleteDelegate() OVERRIDE;
41 40
42 private: 41 private:
43 virtual ~TabModalConfirmDialogViews(); 42 virtual ~TabModalConfirmDialogViews();
44 43
45 scoped_ptr<TabModalConfirmDialogDelegate> delegate_; 44 scoped_ptr<TabModalConfirmDialogDelegate> delegate_;
46 45
47 // The message box view whose commands we handle. 46 // The message box view whose commands we handle.
48 views::MessageBoxView* message_box_view_; 47 views::MessageBoxView* message_box_view_;
49 48
50 DISALLOW_COPY_AND_ASSIGN(TabModalConfirmDialogViews); 49 DISALLOW_COPY_AND_ASSIGN(TabModalConfirmDialogViews);
51 }; 50 };
52 51
53 #endif // CHROME_BROWSER_UI_VIEWS_TAB_MODAL_CONFIRM_DIALOG_VIEWS_H_ 52 #endif // CHROME_BROWSER_UI_VIEWS_TAB_MODAL_CONFIRM_DIALOG_VIEWS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698