| 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 "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
| 10 #include "components/app_modal/javascript_app_modal_dialog.h" | 10 #include "components/app_modal/javascript_app_modal_dialog.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 void SetNativeDialogFactory( | 28 void SetNativeDialogFactory( |
| 29 scoped_ptr<JavaScriptNativeDialogFactory> factory); | 29 scoped_ptr<JavaScriptNativeDialogFactory> factory); |
| 30 | 30 |
| 31 // JavaScript dialogs may be opened by an extensions/app, thus they need | 31 // JavaScript dialogs may be opened by an extensions/app, thus they need |
| 32 // access to extensions functionality. This sets a client interface to | 32 // access to extensions functionality. This sets a client interface to |
| 33 // access //extensions. | 33 // access //extensions. |
| 34 void SetExtensionsClient( | 34 void SetExtensionsClient( |
| 35 scoped_ptr<JavaScriptDialogExtensionsClient> extensions_client); | 35 scoped_ptr<JavaScriptDialogExtensionsClient> extensions_client); |
| 36 | 36 |
| 37 private: | 37 private: |
| 38 friend struct DefaultSingletonTraits<JavaScriptDialogManager>; | 38 friend struct base::DefaultSingletonTraits<JavaScriptDialogManager>; |
| 39 | 39 |
| 40 JavaScriptDialogManager(); | 40 JavaScriptDialogManager(); |
| 41 ~JavaScriptDialogManager() override; | 41 ~JavaScriptDialogManager() override; |
| 42 | 42 |
| 43 // JavaScriptDialogManager: | 43 // JavaScriptDialogManager: |
| 44 void RunJavaScriptDialog(content::WebContents* web_contents, | 44 void RunJavaScriptDialog(content::WebContents* web_contents, |
| 45 const GURL& origin_url, | 45 const GURL& origin_url, |
| 46 const std::string& accept_lang, | 46 const std::string& accept_lang, |
| 47 content::JavaScriptMessageType message_type, | 47 content::JavaScriptMessageType message_type, |
| 48 const base::string16& message_text, | 48 const base::string16& message_text, |
| (...skipping 29 matching lines...) Expand all Loading... |
| 78 | 78 |
| 79 scoped_ptr<JavaScriptNativeDialogFactory> native_dialog_factory_; | 79 scoped_ptr<JavaScriptNativeDialogFactory> native_dialog_factory_; |
| 80 scoped_ptr<JavaScriptDialogExtensionsClient> extensions_client_; | 80 scoped_ptr<JavaScriptDialogExtensionsClient> extensions_client_; |
| 81 | 81 |
| 82 DISALLOW_COPY_AND_ASSIGN(JavaScriptDialogManager); | 82 DISALLOW_COPY_AND_ASSIGN(JavaScriptDialogManager); |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 } // namespace app_modal | 85 } // namespace app_modal |
| 86 | 86 |
| 87 #endif // COMPONENTS_APP_MODAL_JAVASCRIPT_DIALOG_MANAGER_H_ | 87 #endif // COMPONENTS_APP_MODAL_JAVASCRIPT_DIALOG_MANAGER_H_ |
| OLD | NEW |