OLD | NEW |
| (Empty) |
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. | |
4 | |
5 #include "ios/chrome/browser/omnibox/omnibox_event_global_tracker.h" | |
6 | |
7 #include "base/memory/singleton.h" | |
8 | |
9 OmniboxEventGlobalTracker* OmniboxEventGlobalTracker::GetInstance() { | |
10 return Singleton<OmniboxEventGlobalTracker>::get(); | |
11 } | |
12 | |
13 scoped_ptr<base::CallbackList<void(OmniboxLog*)>::Subscription> | |
14 OmniboxEventGlobalTracker::RegisterCallback(const OnURLOpenedCallback& cb) { | |
15 return on_url_opened_callback_list_.Add(cb); | |
16 } | |
17 | |
18 void OmniboxEventGlobalTracker::OnURLOpened(OmniboxLog* log) { | |
19 on_url_opened_callback_list_.Notify(log); | |
20 } | |
21 | |
22 OmniboxEventGlobalTracker::OmniboxEventGlobalTracker() {} | |
23 | |
24 OmniboxEventGlobalTracker::~OmniboxEventGlobalTracker() {} | |
OLD | NEW |