Index: ios/chrome/browser/omnibox/omnibox_edit_model_observer_relay.cc |
diff --git a/ios/chrome/browser/omnibox/omnibox_edit_model_observer_relay.cc b/ios/chrome/browser/omnibox/omnibox_edit_model_observer_relay.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4b84ea3219883be14754e79050539f7c24502358 |
--- /dev/null |
+++ b/ios/chrome/browser/omnibox/omnibox_edit_model_observer_relay.cc |
@@ -0,0 +1,24 @@ |
+// Copyright 2015 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 "ios/chrome/browser/omnibox/omnibox_edit_model_observer_relay.h" |
+ |
+#include "base/memory/singleton.h" |
+ |
+OmniboxEditModelObserverRelay* OmniboxEditModelObserverRelay::GetInstance() { |
+ return Singleton<OmniboxEditModelObserverRelay>::get(); |
+} |
+ |
+scoped_ptr<base::CallbackList<void(OmniboxLog*)>::Subscription> |
+OmniboxEditModelObserverRelay::RegisterCallback(const OnURLOpenedCallback& cb) { |
+ return on_url_opened_callback_list_.Add(cb); |
+} |
+ |
+void OmniboxEditModelObserverRelay::OnURLOpened(OmniboxLog* log) { |
+ on_url_opened_callback_list_.Notify(log); |
+} |
+ |
+OmniboxEditModelObserverRelay::OmniboxEditModelObserverRelay() {} |
+ |
+OmniboxEditModelObserverRelay::~OmniboxEditModelObserverRelay() {} |