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

Side by Side Diff: mojo/public/cpp/bindings/tests/binding_callback_unittest.cc

Issue 2136733002: Mojo C++ bindings: add a new mode to generator to use native STL/WTF types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@67_new
Patch Set: . Created 4 years, 5 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 | « mojo/public/cpp/bindings/native_enum.h ('k') | mojo/public/cpp/bindings/tests/e2e_perftest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // Saves its two input values in member variables and does nothing else. 80 // Saves its two input values in member variables and does nothing else.
81 void EchoInt(int32_t x, const EchoIntCallback& callback) override { 81 void EchoInt(int32_t x, const EchoIntCallback& callback) override {
82 last_server_value_seen_ = x; 82 last_server_value_seen_ = x;
83 *callback_saved_ = callback; 83 *callback_saved_ = callback;
84 if (!closure_.is_null()) { 84 if (!closure_.is_null()) {
85 closure_.Run(); 85 closure_.Run();
86 closure_.Reset(); 86 closure_.Reset();
87 } 87 }
88 } 88 }
89 89
90 void EchoString(const String& a, 90 void EchoString(const std::string& a,
91 const EchoStringCallback& callback) override { 91 const EchoStringCallback& callback) override {
92 CHECK(false) << "Not implemented."; 92 CHECK(false) << "Not implemented.";
93 } 93 }
94 94
95 void EchoStrings(const String& a, 95 void EchoStrings(const std::string& a,
96 const String& b, 96 const std::string& b,
97 const EchoStringsCallback& callback) override { 97 const EchoStringsCallback& callback) override {
98 CHECK(false) << "Not implemented."; 98 CHECK(false) << "Not implemented.";
99 } 99 }
100 100
101 void EchoMessagePipeHandle( 101 void EchoMessagePipeHandle(
102 ScopedMessagePipeHandle a, 102 ScopedMessagePipeHandle a,
103 const EchoMessagePipeHandleCallback& callback) override { 103 const EchoMessagePipeHandleCallback& callback) override {
104 CHECK(false) << "Not implemented."; 104 CHECK(false) << "Not implemented.";
105 } 105 }
106 106
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 regex.clear(); 337 regex.clear();
338 #endif // OS_WIN 338 #endif // OS_WIN
339 EXPECT_DEATH_IF_SUPPORTED(server_impl.DeleteCallback(), regex.c_str()); 339 EXPECT_DEATH_IF_SUPPORTED(server_impl.DeleteCallback(), regex.c_str());
340 #endif // (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)) && 340 #endif // (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)) &&
341 // !defined(OS_ANDROID) 341 // !defined(OS_ANDROID)
342 } 342 }
343 343
344 } // namespace 344 } // namespace
345 } // namespace test 345 } // namespace test
346 } // namespace mojo 346 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/native_enum.h ('k') | mojo/public/cpp/bindings/tests/e2e_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698