Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Unified Diff: components/app_modal_dialogs/javascript_dialog_manager_client.cc

Issue 666533007: Move JavaScriptDialogManager, JavascriptAppModalDialogViews to components/app_modal_dialogs (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
+}
+

Powered by Google App Engine
This is Rietveld 408576698