Roll src/third_party/WebKit eac3800:0237a66 (svn 202606:202607)
[chromium-blink-merge.git] / components / omnibox / browser / omnibox_event_global_tracker.cc
blobf03ad82e131d61e7e04ae98aa63a194c37a97c42
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 base::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() {}