1 // Copyright 2015 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.
5 #include "components/omnibox/browser/omnibox_event_global_tracker.h"
7 #include "base/memory/singleton.h"
9 OmniboxEventGlobalTracker
* OmniboxEventGlobalTracker::GetInstance() {
10 return Singleton
<OmniboxEventGlobalTracker
>::get();
13 scoped_ptr
<base::CallbackList
<void(OmniboxLog
*)>::Subscription
>
14 OmniboxEventGlobalTracker::RegisterCallback(const OnURLOpenedCallback
& cb
) {
15 return on_url_opened_callback_list_
.Add(cb
);
18 void OmniboxEventGlobalTracker::OnURLOpened(OmniboxLog
* log
) {
19 on_url_opened_callback_list_
.Notify(log
);
22 OmniboxEventGlobalTracker::OmniboxEventGlobalTracker() {}
24 OmniboxEventGlobalTracker::~OmniboxEventGlobalTracker() {}