OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "components/app_modal_dialogs/javascript_dialog_manager.h" | |
msw
2014/11/05 03:53:55
You can remove this file and let clients use the I
oshima
2014/11/05 21:42:18
I did ask this question in #20, and avi@ seems to
msw
2014/11/05 22:59:06
Avi missed this question, and I don't have a stron
Avi (use Gerrit)
2014/11/06 05:26:57
Hmmm. Yes, I did miss this.
Impl makes sense in s
oshima
2014/11/06 06:32:06
JavaScriptDialogManager is an interface in public
| |
6 | |
7 #include "base/memory/scoped_ptr.h" | |
msw
2014/11/05 03:53:55
nit: the header includes this, so it's not needed
oshima
2014/11/05 21:42:18
Done.
| |
8 #include "components/app_modal_dialogs/javascript_dialog_extensions_client.h" | |
9 #include "components/app_modal_dialogs/javascript_dialog_manager_impl.h" | |
10 #include "components/app_modal_dialogs/javascript_native_dialog_factory.h" | |
11 | |
12 content::JavaScriptDialogManager* GetJavaScriptDialogManagerInstance() { | |
13 return JavaScriptDialogManagerImpl::GetInstance(); | |
14 } | |
15 | |
16 void SetJavaScriptDialogExtensionsClient( | |
17 scoped_ptr<JavaScriptDialogExtensionsClient> new_client) { | |
18 JavaScriptDialogManagerImpl::GetInstance()->SetExtensionsClient( | |
msw
2014/11/05 03:53:55
nit: use GetJavaScriptDialogManagerInstance.
oshima
2014/11/05 21:42:18
The type needs to be Impl. (The method above retur
| |
19 new_client.Pass()); | |
20 } | |
21 | |
22 void SetJavaScriptNativeDialogFactory( | |
msw
2014/11/05 03:53:55
nit: reorder to match declarations (if you keep th
oshima
2014/11/05 21:42:18
Done.
| |
23 scoped_ptr<JavaScriptNativeDialogFactory> new_factory) { | |
24 JavaScriptDialogManagerImpl::GetInstance()->SetNativeDialogFactory( | |
msw
2014/11/05 03:53:55
ditto nit: use GetJavaScriptDialogManagerInstance.
oshima
2014/11/05 21:42:18
same here
| |
25 new_factory.Pass()); | |
26 } | |
OLD | NEW |