Index: components/app_modal_dialogs/javascript_dialog_manager_client.cc |
diff --git a/components/app_modal_dialogs/javascript_dialog_manager_client.cc b/components/app_modal_dialogs/javascript_dialog_manager_client.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c893098d5e80145d69f6a69dfbd19dc21ffaf54d |
--- /dev/null |
+++ b/components/app_modal_dialogs/javascript_dialog_manager_client.cc |
@@ -0,0 +1,23 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "components/app_modal_dialogs/javascript_dialog_manager_client.h" |
+ |
+namespace { |
+ |
+JavaScriptDialogManagerClient* client = nullptr; |
+ |
+} //namespace |
+ |
+void SetJavaScriptDialogManagerClient( |
+ scoped_ptr<JavaScriptDialogManagerClient> new_client) { |
+ delete client; |
+ client = new_client.release(); |
Avi (use Gerrit)
2014/10/29 17:40:57
Wait, what?
This is clearly ownership semantics,
oshima
2014/10/31 15:54:45
This needs to be set by embedder so we can't use S
|
+} |
+ |
+JavaScriptDialogManagerClient* GetJavaScriptDialogManagerClient() { |
+ CHECK(client); |
+ return client; |
+} |
+ |