1// Copyright 2013 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#ifndef CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_EVENT_ROUTER_H_
6#define CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_EVENT_ROUTER_H_
7
8#include "components/keyed_service/core/keyed_service.h"
9#include "extensions/browser/event_router.h"
10
11class Profile;
12
13namespace extensions {
14
15// This is an event router that will observe listeners to |NetworksChanged| and
16// |NetworkListChanged| events. On ChromeOS it will forward these events
17// from the NetworkStateHandler to the JavaScript Networking API.
18class NetworkingPrivateEventRouter : public KeyedService,
19                                     public EventRouter::Observer {
20 public:
21  static NetworkingPrivateEventRouter* Create(Profile* profile);
22
23 protected:
24  NetworkingPrivateEventRouter() {}
25
26 private:
27  DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateEventRouter);
28};
29
30}  // namespace extensions
31
32#endif  // CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_EVENT_ROUTER_H_
33
34