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

Side by Side Diff: content/browser/renderer_host/pepper/pepper_host_resolver_private_shared.h

Issue 11411357: PPB_HostResolver_Private is switched to the new Pepper proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed MockPluginDelegate. Created 8 years 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 CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_HOST_RESOLVER_PRIVATE_SHARED _H_
6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_HOST_RESOLVER_PRIVATE_SHARED _H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/basictypes.h"
12 #include "base/memory/weak_ptr.h"
13 #include "ppapi/host/host_message_context.h"
14
15 struct PP_HostResolver_Private_Hint;
16 struct PP_NetAddress_Private;
17
18 namespace net {
19 class AddressList;
20 class HostResolver;
21 }
22
23 namespace ppapi {
24 struct HostPortPair;
25 }
26
27 namespace content {
28
29 class PepperHostResolverPrivateShared {
yzshen1 2012/12/20 20:00:20 What not merging this into the host?
ygorshenin1 2012/12/21 12:53:26 Done.
30 public:
31 struct BoundInfo {
32 explicit BoundInfo(const ppapi::host::ReplyMessageContext& reply_context)
33 : reply_context(reply_context) {
34 }
35
36 ppapi::host::ReplyMessageContext reply_context;
37 };
38
39 PepperHostResolverPrivateShared();
40 virtual ~PepperHostResolverPrivateShared();
41
42 void HostResolverResolve(const BoundInfo& bound_info,
43 const ppapi::HostPortPair& host_port,
44 const PP_HostResolver_Private_Hint& hint);
45
46 virtual void HostResolverSendReply(
47 bool succeeded,
48 const std::string& canonical_name,
49 const std::vector<PP_NetAddress_Private>& net_address_list,
50 const BoundInfo& bound_info) = 0;
51
52 virtual void HostResolverSendError(const BoundInfo& bound_info) = 0;
53
54 virtual net::HostResolver* GetHostResolver() = 0;
55
56 private:
57 void OnLookupFinished(int result,
58 const net::AddressList& addresses,
59 const BoundInfo& bound_info);
60
61 base::WeakPtrFactory<PepperHostResolverPrivateShared> weak_factory_;
62
63 DISALLOW_COPY_AND_ASSIGN(PepperHostResolverPrivateShared);
64 };
65
66 } // namespace content
67
68 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_HOST_RESOLVER_PRIVATE_SHA RED_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698