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

Side by Side Diff: native_client_sdk/src/examples/geturl/geturl_handler.cc

Issue 11147004: use CXX compiler for c++ files (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 2 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 <stdio.h> 5 #include <stdio.h>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 #include "ppapi/c/pp_errors.h" 7 #include "ppapi/c/pp_errors.h"
8 #include "ppapi/c/ppb_instance.h" 8 #include "ppapi/c/ppb_instance.h"
9 #include "ppapi/cpp/module.h" 9 #include "ppapi/cpp/module.h"
10 #include "ppapi/cpp/var.h" 10 #include "ppapi/cpp/var.h"
11 11
12 #include "geturl_handler.h" 12 #include "geturl_handler.h"
13 13
14 #ifdef WIN32 14 #ifdef WIN32
15 #undef min 15 #undef min
16 #undef max 16 #undef max
17 #undef PostMessage 17 #undef PostMessage
18 #endif 18 #endif
19 19
20 #ifdef _MSC_VER
21 // Allow 'this' in initializer list
22 #pragma warning(disable : 4355)
23 #endif
24
20 GetURLHandler* GetURLHandler::Create(pp::Instance* instance, 25 GetURLHandler* GetURLHandler::Create(pp::Instance* instance,
21 const std::string& url) { 26 const std::string& url) {
22 return new GetURLHandler(instance, url); 27 return new GetURLHandler(instance, url);
23 } 28 }
24 29
25 GetURLHandler::GetURLHandler(pp::Instance* instance, 30 GetURLHandler::GetURLHandler(pp::Instance* instance,
26 const std::string& url) 31 const std::string& url)
27 : instance_(instance), 32 : instance_(instance),
28 url_(url), 33 url_(url),
29 url_request_(instance), 34 url_request_(instance),
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 printf("GetURLHandler::ReportResult(Ok).\n"); 159 printf("GetURLHandler::ReportResult(Ok).\n");
155 else 160 else
156 printf("GetURLHandler::ReportResult(Err). %s\n", text.c_str()); 161 printf("GetURLHandler::ReportResult(Err). %s\n", text.c_str());
157 fflush(stdout); 162 fflush(stdout);
158 if (instance_) { 163 if (instance_) {
159 pp::Var var_result(fname + "\n" + text); 164 pp::Var var_result(fname + "\n" + text);
160 instance_->PostMessage(var_result); 165 instance_->PostMessage(var_result);
161 } 166 }
162 } 167 }
163 168
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698