Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: ppapi/proxy/ppb_network_monitor_private_proxy.h

Issue 23819033: Simplify PPB_NetworkMonitor proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 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 PPAPI_PROXY_PPB_NETWORK_MONITOR_PRIVATE_PROXY_H_
6 #define PPAPI_PROXY_PPB_NETWORK_MONITOR_PRIVATE_PROXY_H_
7
8 #include <list>
9
10 #include "base/observer_list.h"
11 #include "ppapi/proxy/interface_proxy.h"
12 #include "ppapi/shared_impl/ppb_network_list_private_shared.h"
13 #include "ppapi/shared_impl/scoped_pp_resource.h"
14 #include "ppapi/thunk/ppb_network_monitor_api.h"
15
16 namespace base {
17 class MessageLoopProxy;
18 } // namespace base
19
20 namespace ppapi {
21 namespace proxy {
22
23 class PPB_NetworkMonitor_Private_Proxy : public InterfaceProxy {
24 public:
25 explicit PPB_NetworkMonitor_Private_Proxy(Dispatcher* dispatcher);
26 virtual ~PPB_NetworkMonitor_Private_Proxy();
27
28 // Creates n NetworkManager object in the plugin process.
29 static PP_Resource CreateProxyResource(PP_Instance instance);
30
31 // InterfaceProxy implementation.
32 virtual bool OnMessageReceived(const IPC::Message& msg);
33
34 static const ApiID kApiID = API_ID_PPB_NETWORKMANAGER_PRIVATE;
35
36 private:
37 class NetworkMonitor;
38 friend class NetworkMonitor;
39
40 // IPC message handler for the messages received from the browser.
41 void OnPluginMsgNetworkList(uint32 plugin_dispatcher_id,
42 const ppapi::NetworkList& list);
43
44 // Called by NetworkMonitor destructor.
45 void OnNetworkMonitorDeleted(NetworkMonitor* monitor,
46 PP_Instance instance);
47
48 ObserverList<NetworkMonitor> monitors_;
49
50 scoped_refptr<NetworkListStorage> current_list_;
51
52 DISALLOW_COPY_AND_ASSIGN(PPB_NetworkMonitor_Private_Proxy);
53 };
54
55 } // namespace proxy
56 } // namespace ppapi
57
58 #endif // PPAPI_PROXY_PPB_NETWORK_MONITOR_PRIVATE_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698