| OLD | NEW |
| 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 #ifndef CONTENT_BROWSER_MOJO_MOJO_APP_CONNECTION_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_MOJO_MOJO_APP_CONNECTION_IMPL_H_ |
| 6 #define CONTENT_BROWSER_MOJO_MOJO_APP_CONNECTION_IMPL_H_ | 6 #define CONTENT_BROWSER_MOJO_MOJO_APP_CONNECTION_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "content/public/browser/mojo_app_connection.h" | 9 #include "content/public/browser/mojo_app_connection.h" |
| 10 #include "mojo/shell/public/interfaces/interface_provider.mojom.h" | 10 #include "services/shell/public/interfaces/interface_provider.mojom.h" |
| 11 | 11 |
| 12 namespace content { | 12 namespace content { |
| 13 | 13 |
| 14 // Implementation of the app connection mechanism provided to browser code. | 14 // Implementation of the app connection mechanism provided to browser code. |
| 15 class MojoAppConnectionImpl : public MojoAppConnection { | 15 class MojoAppConnectionImpl : public MojoAppConnection { |
| 16 public: | 16 public: |
| 17 // Takes a BrowserContext and derives a mojo userid from it for this | 17 // Takes a BrowserContext and derives a mojo userid from it for this |
| 18 // connection. | 18 // connection. |
| 19 MojoAppConnectionImpl(const std::string& user_id, | 19 MojoAppConnectionImpl(const std::string& user_id, |
| 20 const std::string& name, | 20 const std::string& name, |
| 21 const std::string& requestor_name); | 21 const std::string& requestor_name); |
| 22 ~MojoAppConnectionImpl() override; | 22 ~MojoAppConnectionImpl() override; |
| 23 | 23 |
| 24 private: | 24 private: |
| 25 // MojoAppConnection: | 25 // MojoAppConnection: |
| 26 void GetInterface(const std::string& interface_name, | 26 void GetInterface(const std::string& interface_name, |
| 27 mojo::ScopedMessagePipeHandle handle) override; | 27 mojo::ScopedMessagePipeHandle handle) override; |
| 28 | 28 |
| 29 mojo::shell::mojom::InterfaceProviderPtr interfaces_; | 29 mojo::shell::mojom::InterfaceProviderPtr interfaces_; |
| 30 | 30 |
| 31 DISALLOW_COPY_AND_ASSIGN(MojoAppConnectionImpl); | 31 DISALLOW_COPY_AND_ASSIGN(MojoAppConnectionImpl); |
| 32 }; | 32 }; |
| 33 | 33 |
| 34 } // namespace content | 34 } // namespace content |
| 35 | 35 |
| 36 #endif // CONTENT_BROWSER_MOJO_MOJO_APP_CONNECTION_IMPL_H_ | 36 #endif // CONTENT_BROWSER_MOJO_MOJO_APP_CONNECTION_IMPL_H_ |
| OLD | NEW |