OLD | NEW |
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_JS_MODAL_DIALOG_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_JS_MODAL_DIALOG_VIEWS_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_JS_MODAL_DIALOG_VIEWS_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_JS_MODAL_DIALOG_VIEWS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include "base/memory/scoped_ptr.h" |
10 | |
11 #include "chrome/browser/ui/app_modal_dialogs/js_modal_dialog.h" | |
12 #include "chrome/browser/ui/app_modal_dialogs/native_app_modal_dialog.h" | 10 #include "chrome/browser/ui/app_modal_dialogs/native_app_modal_dialog.h" |
13 #include "ui/views/window/dialog_delegate.h" | 11 #include "ui/views/window/dialog_delegate.h" |
14 | 12 |
| 13 class JavaScriptAppModalDialog; |
| 14 |
15 namespace views { | 15 namespace views { |
16 class MessageBoxView; | 16 class MessageBoxView; |
17 } | 17 } |
18 | 18 |
19 class JSModalDialogViews : public NativeAppModalDialog, | 19 class JSModalDialogViews : public NativeAppModalDialog, |
20 public views::DialogDelegate { | 20 public views::DialogDelegate { |
21 public: | 21 public: |
22 explicit JSModalDialogViews(JavaScriptAppModalDialog* parent); | 22 explicit JSModalDialogViews(JavaScriptAppModalDialog* parent); |
23 virtual ~JSModalDialogViews(); | 23 virtual ~JSModalDialogViews(); |
24 | 24 |
(...skipping 18 matching lines...) Expand all Loading... |
43 // Overridden from views::WidgetDelegate: | 43 // Overridden from views::WidgetDelegate: |
44 virtual bool IsModal() const OVERRIDE; | 44 virtual bool IsModal() const OVERRIDE; |
45 virtual views::View* GetContentsView() OVERRIDE; | 45 virtual views::View* GetContentsView() OVERRIDE; |
46 virtual views::View* GetInitiallyFocusedView() OVERRIDE; | 46 virtual views::View* GetInitiallyFocusedView() OVERRIDE; |
47 virtual void OnClose() OVERRIDE; | 47 virtual void OnClose() OVERRIDE; |
48 virtual views::Widget* GetWidget() OVERRIDE; | 48 virtual views::Widget* GetWidget() OVERRIDE; |
49 virtual const views::Widget* GetWidget() const OVERRIDE; | 49 virtual const views::Widget* GetWidget() const OVERRIDE; |
50 | 50 |
51 private: | 51 private: |
52 // A pointer to the AppModalDialog that owns us. | 52 // A pointer to the AppModalDialog that owns us. |
53 JavaScriptAppModalDialog* parent_; | 53 scoped_ptr<JavaScriptAppModalDialog> parent_; |
54 | 54 |
55 // The message box view whose commands we handle. | 55 // The message box view whose commands we handle. |
56 views::MessageBoxView* message_box_view_; | 56 views::MessageBoxView* message_box_view_; |
57 | 57 |
58 DISALLOW_COPY_AND_ASSIGN(JSModalDialogViews); | 58 DISALLOW_COPY_AND_ASSIGN(JSModalDialogViews); |
59 }; | 59 }; |
60 | 60 |
61 #endif // CHROME_BROWSER_UI_VIEWS_JS_MODAL_DIALOG_VIEWS_H_ | 61 #endif // CHROME_BROWSER_UI_VIEWS_JS_MODAL_DIALOG_VIEWS_H_ |
OLD | NEW |