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

Side by Side Diff: mojo/shell/public/cpp/lib/application_test_base.cc

Issue 1728083002: Extract a Connector interface from Shell that can be cloned & passed to other threads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@12uid
Patch Set: . Created 4 years, 9 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/shell/public/cpp/connector.h ('k') | mojo/shell/public/cpp/lib/connection_impl.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <utility> 5 #include <utility>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "mojo/public/cpp/bindings/binding.h" 10 #include "mojo/public/cpp/bindings/binding.h"
11 #include "mojo/public/cpp/environment/environment.h" 11 #include "mojo/public/cpp/environment/environment.h"
12 #include "mojo/public/cpp/system/message_pipe.h" 12 #include "mojo/public/cpp/system/message_pipe.h"
13 #include "mojo/shell/public/cpp/application_test_base.h" 13 #include "mojo/shell/public/cpp/application_test_base.h"
14 #include "mojo/shell/public/cpp/shell_connection.h" 14 #include "mojo/shell/public/cpp/shell_connection.h"
15 #include "mojo/shell/public/interfaces/shell_client.mojom.h" 15 #include "mojo/shell/public/interfaces/shell_client.mojom.h"
16 16
17 namespace mojo { 17 namespace mojo {
18 namespace test { 18 namespace test {
19 19
20 namespace { 20 namespace {
21 // Share the application URL with multiple application tests. 21 // Share the application URL with multiple application tests.
22 String g_url; 22 String g_url;
23 uint32_t g_id = shell::mojom::Shell::kInvalidApplicationID; 23 uint32_t g_id = shell::mojom::Connector::kInvalidApplicationID;
24 uint32_t g_user_id = shell::mojom::Shell::kUserRoot; 24 uint32_t g_user_id = shell::mojom::Connector::kUserRoot;
25 25
26 // ShellClient request handle passed from the shell in MojoMain, stored in 26 // ShellClient request handle passed from the shell in MojoMain, stored in
27 // between SetUp()/TearDown() so we can (re-)intialize new ShellConnections. 27 // between SetUp()/TearDown() so we can (re-)intialize new ShellConnections.
28 InterfaceRequest<shell::mojom::ShellClient> g_shell_client_request; 28 InterfaceRequest<shell::mojom::ShellClient> g_shell_client_request;
29 29
30 // Shell pointer passed in the initial mojo.ShellClient.Initialize() call, 30 // Shell pointer passed in the initial mojo.ShellClient.Initialize() call,
31 // stored in between initial setup and the first test and between SetUp/TearDown 31 // stored in between initial setup and the first test and between SetUp/TearDown
32 // calls so we can (re-)initialize new ShellConnections. 32 // calls so we can (re-)initialize new ShellConnections.
33 shell::mojom::ShellPtr g_shell; 33 shell::mojom::ShellPtr g_shell;
34 34
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 if (ShouldCreateDefaultRunLoop()) 170 if (ShouldCreateDefaultRunLoop())
171 Environment::DestroyDefaultRunLoop(); 171 Environment::DestroyDefaultRunLoop();
172 } 172 }
173 173
174 bool ApplicationTestBase::ShouldCreateDefaultRunLoop() { 174 bool ApplicationTestBase::ShouldCreateDefaultRunLoop() {
175 return true; 175 return true;
176 } 176 }
177 177
178 } // namespace test 178 } // namespace test
179 } // namespace mojo 179 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/public/cpp/connector.h ('k') | mojo/shell/public/cpp/lib/connection_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698