| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "chrome/browser/ui/tab_modal_confirm_dialog.h" | 10 #include "chrome/browser/ui/tab_modal_confirm_dialog.h" |
| 11 #include "ui/gfx/native_widget_types.h" | 11 #include "ui/gfx/native_widget_types.h" |
| 12 #include "ui/views/window/dialog_delegate.h" | 12 #include "ui/views/window/dialog_delegate.h" |
| 13 | 13 |
| 14 namespace content { |
| 15 class WebContents; |
| 16 } |
| 17 |
| 14 namespace views { | 18 namespace views { |
| 15 class MessageBoxView; | 19 class MessageBoxView; |
| 16 } | 20 } |
| 17 | 21 |
| 18 // 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 |
| 19 // but still allow the user to switch to a different page. | 23 // but still allow the user to switch to a different page. |
| 20 // 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 |
| 21 // 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 |
| 22 // the dialog. | 26 // the dialog. |
| 23 class TabModalConfirmDialogViews : public TabModalConfirmDialog, | 27 class TabModalConfirmDialogViews : public TabModalConfirmDialog, |
| 24 public views::DialogDelegate { | 28 public views::DialogDelegate { |
| 25 public: | 29 public: |
| 26 TabModalConfirmDialogViews(TabModalConfirmDialogDelegate* delegate, | 30 TabModalConfirmDialogViews(TabModalConfirmDialogDelegate* delegate, |
| 27 TabContents* tab_contents, | 31 content::WebContents* web_contents, |
| 28 bool enable_chrome_style); | 32 bool enable_chrome_style); |
| 29 | 33 |
| 30 // views::DialogDelegate: | 34 // views::DialogDelegate: |
| 31 virtual string16 GetWindowTitle() const OVERRIDE; | 35 virtual string16 GetWindowTitle() const OVERRIDE; |
| 32 virtual string16 GetDialogButtonLabel(ui::DialogButton button) const OVERRIDE; | 36 virtual string16 GetDialogButtonLabel(ui::DialogButton button) const OVERRIDE; |
| 33 virtual bool UseChromeStyle() const OVERRIDE; | 37 virtual bool UseChromeStyle() const OVERRIDE; |
| 34 virtual bool Cancel() OVERRIDE; | 38 virtual bool Cancel() OVERRIDE; |
| 35 virtual bool Accept() OVERRIDE; | 39 virtual bool Accept() OVERRIDE; |
| 36 | 40 |
| 37 // views::WidgetDelegate: | 41 // views::WidgetDelegate: |
| (...skipping 13 matching lines...) Expand all Loading... |
| 51 | 55 |
| 52 // The message box view whose commands we handle. | 56 // The message box view whose commands we handle. |
| 53 views::MessageBoxView* message_box_view_; | 57 views::MessageBoxView* message_box_view_; |
| 54 | 58 |
| 55 bool enable_chrome_style_; | 59 bool enable_chrome_style_; |
| 56 | 60 |
| 57 DISALLOW_COPY_AND_ASSIGN(TabModalConfirmDialogViews); | 61 DISALLOW_COPY_AND_ASSIGN(TabModalConfirmDialogViews); |
| 58 }; | 62 }; |
| 59 | 63 |
| 60 #endif // CHROME_BROWSER_UI_VIEWS_TAB_MODAL_CONFIRM_DIALOG_VIEWS_H_ | 64 #endif // CHROME_BROWSER_UI_VIEWS_TAB_MODAL_CONFIRM_DIALOG_VIEWS_H_ |
| OLD | NEW |