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

Side by Side Diff: native_client_sdk/src/examples/api/vpn_provider/vpn_provider_helper.cc

Issue 2342353003: [nacl-sdk] Fix nacl sdk example on windows. (Closed)
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "vpn_provider_helper.h" 5 #include "vpn_provider_helper.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "ppapi/cpp/var_dictionary.h" 9 #include "ppapi/cpp/var_dictionary.h"
10 10
11 #ifdef WIN32
12 # undef PostMessage
13 #endif
14
11 VpnProviderHelper::VpnProviderHelper(pp::Instance* instance) 15 VpnProviderHelper::VpnProviderHelper(pp::Instance* instance)
12 : instance_(instance), 16 : instance_(instance),
13 thread_(pp::InstanceHandle(instance)), 17 thread_(pp::InstanceHandle(instance)),
14 vpn_(pp::InstanceHandle(instance)), 18 vpn_(pp::InstanceHandle(instance)),
15 factory_(this), 19 factory_(this),
16 send_packet_pending_(false) { 20 send_packet_pending_(false) {
17 thread_.Start(); 21 thread_.Start();
18 } 22 }
19 23
20 void VpnProviderHelper::Init() { 24 void VpnProviderHelper::Init() {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 instance_->PostMessage(ss.str()); 123 instance_->PostMessage(ss.str());
120 124
121 vpn_.SendPacket( 125 vpn_.SendPacket(
122 send_packet_queue_.front(), 126 send_packet_queue_.front(),
123 factory_.NewCallback(&VpnProviderHelper::SendPacketCompletionCallback)); 127 factory_.NewCallback(&VpnProviderHelper::SendPacketCompletionCallback));
124 send_packet_queue_.pop(); 128 send_packet_queue_.pop();
125 } else { 129 } else {
126 send_packet_pending_ = false; 130 send_packet_pending_ = false;
127 } 131 }
128 } 132 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698