OLD | NEW |
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 SERVICES_NAVIGATION_NAVIGATION_H_ | 5 #ifndef SERVICES_NAVIGATION_NAVIGATION_H_ |
6 #define SERVICES_NAVIGATION_NAVIGATION_H_ | 6 #define SERVICES_NAVIGATION_NAVIGATION_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/sequenced_task_runner.h" | 9 #include "base/sequenced_task_runner.h" |
10 #include "content/public/common/connection_filter.h" | 10 #include "content/public/common/connection_filter.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 class Navigation : public content::ConnectionFilter, | 23 class Navigation : public content::ConnectionFilter, |
24 public shell::InterfaceFactory<mojom::ViewFactory>, | 24 public shell::InterfaceFactory<mojom::ViewFactory>, |
25 public mojom::ViewFactory { | 25 public mojom::ViewFactory { |
26 public: | 26 public: |
27 Navigation(); | 27 Navigation(); |
28 ~Navigation() override; | 28 ~Navigation() override; |
29 | 29 |
30 private: | 30 private: |
31 // content::ConnectionFilter: | 31 // content::ConnectionFilter: |
32 bool OnConnect(shell::Connection* connection, | 32 bool OnConnect(const shell::Identity& remote_identity, |
| 33 shell::InterfaceRegistry* registry, |
33 shell::Connector* connector) override; | 34 shell::Connector* connector) override; |
34 | 35 |
35 // shell::InterfaceFactory<mojom::ViewFactory>: | 36 // shell::InterfaceFactory<mojom::ViewFactory>: |
36 void Create(const shell::Identity& remote_identity, | 37 void Create(const shell::Identity& remote_identity, |
37 mojom::ViewFactoryRequest request) override; | 38 mojom::ViewFactoryRequest request) override; |
38 | 39 |
39 // mojom::ViewFactory: | 40 // mojom::ViewFactory: |
40 void CreateView(mojom::ViewClientPtr client, | 41 void CreateView(mojom::ViewClientPtr client, |
41 mojom::ViewRequest request) override; | 42 mojom::ViewRequest request) override; |
42 | 43 |
43 void ViewFactoryLost(); | 44 void ViewFactoryLost(); |
44 | 45 |
45 scoped_refptr<base::SequencedTaskRunner> view_task_runner_; | 46 scoped_refptr<base::SequencedTaskRunner> view_task_runner_; |
46 | 47 |
47 shell::Connector* connector_ = nullptr; | 48 shell::Connector* connector_ = nullptr; |
48 std::string client_user_id_; | 49 std::string client_user_id_; |
49 | 50 |
50 shell::ServiceContextRefFactory ref_factory_; | 51 shell::ServiceContextRefFactory ref_factory_; |
51 std::set<std::unique_ptr<shell::ServiceContextRef>> refs_; | 52 std::set<std::unique_ptr<shell::ServiceContextRef>> refs_; |
52 | 53 |
53 mojo::BindingSet<mojom::ViewFactory> bindings_; | 54 mojo::BindingSet<mojom::ViewFactory> bindings_; |
54 | 55 |
55 DISALLOW_COPY_AND_ASSIGN(Navigation); | 56 DISALLOW_COPY_AND_ASSIGN(Navigation); |
56 }; | 57 }; |
57 | 58 |
58 } // navigation | 59 } // navigation |
59 | 60 |
60 #endif // SERVICES_NAVIGATION_NAVIGATION_H_ | 61 #endif // SERVICES_NAVIGATION_NAVIGATION_H_ |
OLD | NEW |