OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef EXTENSIONS_BROWSER_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_EVENT_ROUTE
R_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_EVENT_ROUTE
R_H_ |
6 #define EXTENSIONS_BROWSER_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_EVENT_ROUTE
R_H_ | 6 #define EXTENSIONS_BROWSER_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_EVENT_ROUTE
R_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "components/keyed_service/core/keyed_service.h" | 9 #include "components/keyed_service/core/keyed_service.h" |
10 #include "extensions/browser/event_router.h" | 10 #include "extensions/browser/event_router.h" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 class BrowserContext; | 13 class BrowserContext; |
14 } | 14 } |
15 | 15 |
16 namespace extensions { | 16 namespace extensions { |
17 | 17 |
18 class NetworkingPrivateDelegate; | |
19 | |
20 // This is an event router that will observe listeners to |NetworksChanged| and | 18 // This is an event router that will observe listeners to |NetworksChanged| and |
21 // |NetworkListChanged| events. On ChromeOS it will forward these events | 19 // |NetworkListChanged| events. On ChromeOS it will forward these events |
22 // from the NetworkStateHandler to the JavaScript Networking API. | 20 // from the NetworkStateHandler to the JavaScript Networking API. |
23 class NetworkingPrivateEventRouter : public KeyedService, | 21 class NetworkingPrivateEventRouter : public KeyedService, |
24 public EventRouter::Observer { | 22 public EventRouter::Observer { |
25 public: | 23 public: |
26 static NetworkingPrivateEventRouter* Create( | 24 static NetworkingPrivateEventRouter* Create( |
27 content::BrowserContext* browser_context); | 25 content::BrowserContext* browser_context); |
28 | 26 |
29 protected: | 27 protected: |
30 NetworkingPrivateEventRouter() {} | 28 NetworkingPrivateEventRouter() {} |
31 | 29 |
32 private: | 30 private: |
33 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateEventRouter); | 31 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateEventRouter); |
34 }; | 32 }; |
35 | 33 |
36 } // namespace extensions | 34 } // namespace extensions |
37 | 35 |
38 #endif // EXTENSIONS_BROWSER_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_EVENT_RO
UTER_H_ | 36 #endif // EXTENSIONS_BROWSER_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_EVENT_RO
UTER_H_ |
OLD | NEW |