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

Side by Side Diff: mojo/shell/public/cpp/shell_test.h

Issue 1769163002: Add a instance groups to Connect(), and introduce an Identity struct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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/shell_connection.h ('k') | mojo/shell/public/interfaces/connector.mojom » ('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 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 #ifndef MOJO_SHELL_PUBLIC_CPP_SHELL_TEST_H_ 5 #ifndef MOJO_SHELL_PUBLIC_CPP_SHELL_TEST_H_
6 #define MOJO_SHELL_PUBLIC_CPP_SHELL_TEST_H_ 6 #define MOJO_SHELL_PUBLIC_CPP_SHELL_TEST_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "mojo/public/cpp/system/macros.h" 9 #include "mojo/public/cpp/system/macros.h"
10 #include "mojo/shell/public/cpp/connector.h" 10 #include "mojo/shell/public/cpp/connector.h"
(...skipping 17 matching lines...) Expand all
28 // to customize this should subclass this class instead of ShellClient, 28 // to customize this should subclass this class instead of ShellClient,
29 // otherwise they will have to call ShellTest::InitializeCalled() to forward 29 // otherwise they will have to call ShellTest::InitializeCalled() to forward
30 // metadata from Initialize() to the test. 30 // metadata from Initialize() to the test.
31 class ShellTestClient : public mojo::ShellClient { 31 class ShellTestClient : public mojo::ShellClient {
32 public: 32 public:
33 explicit ShellTestClient(ShellTest* test); 33 explicit ShellTestClient(ShellTest* test);
34 ~ShellTestClient() override; 34 ~ShellTestClient() override;
35 35
36 protected: 36 protected:
37 void Initialize(Connector* connector, 37 void Initialize(Connector* connector,
38 const std::string& name, 38 const Identity& identity,
39 const std::string& user_id,
40 uint32_t id) override; 39 uint32_t id) override;
41 40
42 private: 41 private:
43 ShellTest* test_; 42 ShellTest* test_;
44 43
45 DISALLOW_COPY_AND_ASSIGN(ShellTestClient); 44 DISALLOW_COPY_AND_ASSIGN(ShellTestClient);
46 }; 45 };
47 46
48 class ShellTest : public testing::Test { 47 class ShellTest : public testing::Test {
49 public: 48 public:
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 std::string initialize_userid_ = shell::mojom::kInheritUserID; 98 std::string initialize_userid_ = shell::mojom::kInheritUserID;
100 uint32_t initialize_instance_id_ = shell::mojom::kInvalidInstanceID; 99 uint32_t initialize_instance_id_ = shell::mojom::kInvalidInstanceID;
101 100
102 DISALLOW_COPY_AND_ASSIGN(ShellTest); 101 DISALLOW_COPY_AND_ASSIGN(ShellTest);
103 }; 102 };
104 103
105 } // namespace test 104 } // namespace test
106 } // namespace mojo 105 } // namespace mojo
107 106
108 #endif // MOJO_SHELL_PUBLIC_CPP_SHELL_TEST_H_ 107 #endif // MOJO_SHELL_PUBLIC_CPP_SHELL_TEST_H_
OLDNEW
« no previous file with comments | « mojo/shell/public/cpp/shell_connection.h ('k') | mojo/shell/public/interfaces/connector.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698