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

Side by Side Diff: ppapi/cpp/network_proxy.cc

Issue 17004010: PPAPI: Move PPB_NetworkProxy out of Dev (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 7 years, 6 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
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "ppapi/cpp/dev/network_proxy_dev.h" 5 #include "ppapi/cpp/network_proxy.h"
6 6
7 #include "ppapi/c/dev/ppb_network_proxy_dev.h" 7 #include "ppapi/c/ppb_network_proxy.h"
8 #include "ppapi/cpp/module_impl.h" 8 #include "ppapi/cpp/module_impl.h"
9 9
10 namespace pp { 10 namespace pp {
11 11
12 namespace { 12 namespace {
13 13
14 template <> const char* interface_name<PPB_NetworkProxy_Dev_0_1>() { 14 template <> const char* interface_name<PPB_NetworkProxy_1_0>() {
15 return PPB_NETWORKPROXY_DEV_INTERFACE_0_1; 15 return PPB_NETWORKPROXY_INTERFACE_1_0;
16 } 16 }
17 17
18 } // namespace 18 } // namespace
19 19
20 // static 20 // static
21 bool NetworkProxy::IsAvailable() { 21 bool NetworkProxy::IsAvailable() {
22 return has_interface<PPB_NetworkProxy_Dev_0_1>(); 22 return has_interface<PPB_NetworkProxy_1_0>();
23 } 23 }
24 24
25 // static 25 // static
26 int32_t NetworkProxy::GetProxyForURL( 26 int32_t NetworkProxy::GetProxyForURL(
27 const InstanceHandle& instance, 27 const InstanceHandle& instance,
28 const Var& url, 28 const Var& url,
29 const CompletionCallbackWithOutput<Var>& callback) { 29 const CompletionCallbackWithOutput<Var>& callback) {
30 if (!has_interface<PPB_NetworkProxy_Dev_0_1>()) 30 if (!has_interface<PPB_NetworkProxy_1_0>())
31 return callback.MayForce(PP_ERROR_NOINTERFACE); 31 return callback.MayForce(PP_ERROR_NOINTERFACE);
32 32
33 return get_interface<PPB_NetworkProxy_Dev_0_1>()->GetProxyForURL( 33 return get_interface<PPB_NetworkProxy_1_0>()->GetProxyForURL(
34 instance.pp_instance(), url.pp_var(), 34 instance.pp_instance(), url.pp_var(),
35 callback.output(), callback.pp_completion_callback()); 35 callback.output(), callback.pp_completion_callback());
36 } 36 }
37 37
38 } // namespace pp 38 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/cpp/network_proxy.h ('k') | ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698