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 COMPONENTS_APP_MODAL_VIEWS_JAVASCRIPT_APP_MODAL_DIALOG_VIEWS_H_ | 5 #ifndef COMPONENTS_APP_MODAL_VIEWS_JAVASCRIPT_APP_MODAL_DIALOG_VIEWS_H_ |
6 #define COMPONENTS_APP_MODAL_VIEWS_JAVASCRIPT_APP_MODAL_DIALOG_VIEWS_H_ | 6 #define COMPONENTS_APP_MODAL_VIEWS_JAVASCRIPT_APP_MODAL_DIALOG_VIEWS_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "components/app_modal/native_app_modal_dialog.h" | 9 #include "components/app_modal/native_app_modal_dialog.h" |
10 #include "ui/views/window/dialog_delegate.h" | 10 #include "ui/views/window/dialog_delegate.h" |
11 | 11 |
12 class JavaScriptAppModalDialog; | 12 class JavaScriptAppModalDialog; |
13 | 13 |
14 namespace views { | 14 namespace views { |
15 class MessageBoxView; | 15 class MessageBoxView; |
16 } | 16 } |
17 | 17 |
| 18 namespace app_modal { |
| 19 |
18 class JavaScriptAppModalDialogViews : public NativeAppModalDialog, | 20 class JavaScriptAppModalDialogViews : public NativeAppModalDialog, |
19 public views::DialogDelegate { | 21 public views::DialogDelegate { |
20 public: | 22 public: |
21 explicit JavaScriptAppModalDialogViews(JavaScriptAppModalDialog* parent); | 23 explicit JavaScriptAppModalDialogViews(JavaScriptAppModalDialog* parent); |
22 ~JavaScriptAppModalDialogViews() override; | 24 ~JavaScriptAppModalDialogViews() override; |
23 | 25 |
24 // Overridden from NativeAppModalDialog: | 26 // Overridden from NativeAppModalDialog: |
25 int GetAppModalDialogButtons() const override; | 27 int GetAppModalDialogButtons() const override; |
26 void ShowAppModalDialog() override; | 28 void ShowAppModalDialog() override; |
27 void ActivateAppModalDialog() override; | 29 void ActivateAppModalDialog() override; |
(...skipping 21 matching lines...) Expand all Loading... |
49 private: | 51 private: |
50 // A pointer to the AppModalDialog that owns us. | 52 // A pointer to the AppModalDialog that owns us. |
51 scoped_ptr<JavaScriptAppModalDialog> parent_; | 53 scoped_ptr<JavaScriptAppModalDialog> parent_; |
52 | 54 |
53 // The message box view whose commands we handle. | 55 // The message box view whose commands we handle. |
54 views::MessageBoxView* message_box_view_; | 56 views::MessageBoxView* message_box_view_; |
55 | 57 |
56 DISALLOW_COPY_AND_ASSIGN(JavaScriptAppModalDialogViews); | 58 DISALLOW_COPY_AND_ASSIGN(JavaScriptAppModalDialogViews); |
57 }; | 59 }; |
58 | 60 |
| 61 } // namespace app_modal |
| 62 |
59 #endif // COMPONENTS_APP_MODAL_VIEWS_JAVASCRIPT_APP_MODAL_DIALOG_VIEWS_H_ | 63 #endif // COMPONENTS_APP_MODAL_VIEWS_JAVASCRIPT_APP_MODAL_DIALOG_VIEWS_H_ |
OLD | NEW |