| 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_JAVASCRIPT_DIALOG_MANAGER_H_ | 5 #ifndef COMPONENTS_APP_MODAL_JAVASCRIPT_DIALOG_MANAGER_H_ |
| 6 #define COMPONENTS_APP_MODAL_JAVASCRIPT_DIALOG_MANAGER_H_ | 6 #define COMPONENTS_APP_MODAL_JAVASCRIPT_DIALOG_MANAGER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 // Sets the JavaScriptNativeDialogFactory used to create platform specific | 29 // Sets the JavaScriptNativeDialogFactory used to create platform specific |
| 30 // dialog window instances. | 30 // dialog window instances. |
| 31 void SetNativeDialogFactory( | 31 void SetNativeDialogFactory( |
| 32 std::unique_ptr<JavaScriptNativeDialogFactory> factory); | 32 std::unique_ptr<JavaScriptNativeDialogFactory> factory); |
| 33 | 33 |
| 34 // JavaScript dialogs may be opened by an extensions/app, thus they need | 34 // JavaScript dialogs may be opened by an extensions/app, thus they need |
| 35 // access to extensions functionality. This sets a client interface to | 35 // access to extensions functionality. This sets a client interface to |
| 36 // access //extensions. | 36 // access //extensions. |
| 37 void SetExtensionsClient( | 37 void SetExtensionsClient( |
| 38 std::unique_ptr<JavaScriptDialogExtensionsClient> extensions_client); | 38 std::unique_ptr<JavaScriptDialogExtensionsClient> extensions_client); |
| 39 JavaScriptDialogExtensionsClient* GetExtensionsClient(); |
| 39 | 40 |
| 40 // Gets the title for a dialog. | 41 // Gets the title for a dialog. |
| 41 base::string16 GetTitle(content::WebContents* web_contents, | 42 base::string16 GetTitle(content::WebContents* web_contents, |
| 42 const GURL& origin_url); | 43 const GURL& origin_url); |
| 43 | 44 |
| 44 // JavaScriptDialogManager: | 45 // JavaScriptDialogManager: |
| 45 void RunJavaScriptDialog(content::WebContents* web_contents, | 46 void RunJavaScriptDialog(content::WebContents* web_contents, |
| 46 const GURL& origin_url, | 47 const GURL& origin_url, |
| 47 content::JavaScriptDialogType dialog_type, | 48 content::JavaScriptDialogType dialog_type, |
| 48 const base::string16& message_text, | 49 const base::string16& message_text, |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 // dialogs. (Since Javascript dialogs are modal, this is even accurate!) | 89 // dialogs. (Since Javascript dialogs are modal, this is even accurate!) |
| 89 base::TimeTicks last_close_time_; | 90 base::TimeTicks last_close_time_; |
| 90 base::TimeTicks last_creation_time_; | 91 base::TimeTicks last_creation_time_; |
| 91 | 92 |
| 92 DISALLOW_COPY_AND_ASSIGN(JavaScriptDialogManager); | 93 DISALLOW_COPY_AND_ASSIGN(JavaScriptDialogManager); |
| 93 }; | 94 }; |
| 94 | 95 |
| 95 } // namespace app_modal | 96 } // namespace app_modal |
| 96 | 97 |
| 97 #endif // COMPONENTS_APP_MODAL_JAVASCRIPT_DIALOG_MANAGER_H_ | 98 #endif // COMPONENTS_APP_MODAL_JAVASCRIPT_DIALOG_MANAGER_H_ |
| OLD | NEW |