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 CONTENT_SHELL_SHELL_JAVASCRIPT_DIALOG_CREATOR_H_ | 5 #ifndef CONTENT_SHELL_SHELL_JAVASCRIPT_DIALOG_CREATOR_H_ |
6 #define CONTENT_SHELL_SHELL_JAVASCRIPT_DIALOG_CREATOR_H_ | 6 #define CONTENT_SHELL_SHELL_JAVASCRIPT_DIALOG_CREATOR_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/callback_forward.h" | 9 #include "base/callback_forward.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 // Called by the ShellJavaScriptDialog when it closes. | 41 // Called by the ShellJavaScriptDialog when it closes. |
42 void DialogClosed(ShellJavaScriptDialog* dialog); | 42 void DialogClosed(ShellJavaScriptDialog* dialog); |
43 | 43 |
44 // Used for content_browsertests. | 44 // Used for content_browsertests. |
45 void set_dialog_request_callback( | 45 void set_dialog_request_callback( |
46 base::Callback<void()> dialog_request_callback) { | 46 base::Callback<void()> dialog_request_callback) { |
47 dialog_request_callback_ = dialog_request_callback; | 47 dialog_request_callback_ = dialog_request_callback; |
48 } | 48 } |
49 | 49 |
50 private: | 50 private: |
51 #if defined(OS_MACOSX) || defined(OS_WIN) | 51 #if defined(OS_MACOSX) || defined(OS_WIN) || defined(TOOLKIT_GTK) |
52 // The dialog being shown. No queueing. | 52 // The dialog being shown. No queueing. |
53 scoped_ptr<ShellJavaScriptDialog> dialog_; | 53 scoped_ptr<ShellJavaScriptDialog> dialog_; |
54 #else | 54 #else |
55 // TODO: implement ShellJavaScriptDialog for other platforms, drop this #if | 55 // TODO: implement ShellJavaScriptDialog for other platforms, drop this #if |
56 #endif | 56 #endif |
57 | 57 |
58 base::Callback<void()> dialog_request_callback_; | 58 base::Callback<void()> dialog_request_callback_; |
59 | 59 |
60 DISALLOW_COPY_AND_ASSIGN(ShellJavaScriptDialogCreator); | 60 DISALLOW_COPY_AND_ASSIGN(ShellJavaScriptDialogCreator); |
61 }; | 61 }; |
62 | 62 |
63 } // namespace content | 63 } // namespace content |
64 | 64 |
65 #endif // CONTENT_SHELL_SHELL_JAVASCRIPT_DIALOG_CREATOR_H_ | 65 #endif // CONTENT_SHELL_SHELL_JAVASCRIPT_DIALOG_CREATOR_H_ |
OLD | NEW |