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

Side by Side Diff: mojo/shell/capability_filter_test.h

Issue 1674903003: Extract shell methods from ApplicationImpl into a base class, and pass this to Initialize() instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojom
Patch Set: . Created 4 years, 10 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/application_package_apptest.cc ('k') | mojo/shell/capability_filter_test.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 "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "mojo/shell/application_loader.h" 9 #include "mojo/shell/application_loader.h"
10 #include "mojo/shell/application_manager.h" 10 #include "mojo/shell/application_manager.h"
(...skipping 10 matching lines...) Expand all
21 // This class models an application who will use the shell to interact with a 21 // This class models an application who will use the shell to interact with a
22 // system service. The shell may limit this application's visibility of the full 22 // system service. The shell may limit this application's visibility of the full
23 // set of interfaces exposed by that service. 23 // set of interfaces exposed by that service.
24 class TestApplication : public ApplicationDelegate { 24 class TestApplication : public ApplicationDelegate {
25 public: 25 public:
26 TestApplication(); 26 TestApplication();
27 ~TestApplication() override; 27 ~TestApplication() override;
28 28
29 private: 29 private:
30 // Overridden from ApplicationDelegate: 30 // Overridden from ApplicationDelegate:
31 void Initialize(ApplicationImpl* app) override; 31 void Initialize(Shell* shell, const std::string& url, uint32_t id) override;
32 bool AcceptConnection(ApplicationConnection* connection) override; 32 bool AcceptConnection(ApplicationConnection* connection) override;
33 33
34 void ConnectionClosed(const std::string& service_url); 34 void ConnectionClosed(const std::string& service_url);
35 35
36 ApplicationImpl* app_; 36 Shell* shell_;
37 std::string url_;
37 ValidatorPtr validator_; 38 ValidatorPtr validator_;
38 scoped_ptr<ApplicationConnection> connection1_; 39 scoped_ptr<ApplicationConnection> connection1_;
39 scoped_ptr<ApplicationConnection> connection2_; 40 scoped_ptr<ApplicationConnection> connection2_;
40 41
41 DISALLOW_COPY_AND_ASSIGN(TestApplication); 42 DISALLOW_COPY_AND_ASSIGN(TestApplication);
42 }; 43 };
43 44
44 class TestLoader : public ApplicationLoader { 45 class TestLoader : public ApplicationLoader {
45 public: 46 public:
46 explicit TestLoader(ApplicationDelegate* delegate); 47 explicit TestLoader(ApplicationDelegate* delegate);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 base::MessageLoop loop_; 101 base::MessageLoop loop_;
101 scoped_ptr<ApplicationManager> application_manager_; 102 scoped_ptr<ApplicationManager> application_manager_;
102 ConnectionValidator* validator_; 103 ConnectionValidator* validator_;
103 104
104 DISALLOW_COPY_AND_ASSIGN(CapabilityFilterTest); 105 DISALLOW_COPY_AND_ASSIGN(CapabilityFilterTest);
105 }; 106 };
106 107
107 } // namespace test 108 } // namespace test
108 } // namespace shell 109 } // namespace shell
109 } // namespace mojo 110 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/application_package_apptest.cc ('k') | mojo/shell/capability_filter_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698