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_PUBLIC_BROWSER_MOJO_APP_CONNECTION_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_MOJO_APP_CONNECTION_H_ |
6 #define CONTENT_PUBLIC_BROWSER_MOJO_APP_CONNECTION_H_ | 6 #define CONTENT_PUBLIC_BROWSER_MOJO_APP_CONNECTION_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
12 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_ptr.h" | 12 #include "mojo/public/cpp/bindings/interface_ptr.h" |
13 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h" | 13 #include "mojo/public/cpp/bindings/interface_request.h" |
14 #include "third_party/mojo/src/mojo/public/cpp/system/message_pipe.h" | 14 #include "mojo/public/cpp/system/message_pipe.h" |
15 | 15 |
16 class GURL; | 16 class GURL; |
17 | 17 |
18 namespace content { | 18 namespace content { |
19 | 19 |
20 // A virtual app URL identifying the browser itself. This should be used for | 20 // A virtual app URL identifying the browser itself. This should be used for |
21 // a connection's |requestor_url| when connecting from browser code to apps that | 21 // a connection's |requestor_url| when connecting from browser code to apps that |
22 // don't require a more specific request context. | 22 // don't require a more specific request context. |
23 CONTENT_EXPORT extern const char kBrowserMojoAppUrl[]; | 23 CONTENT_EXPORT extern const char kBrowserMojoAppUrl[]; |
24 | 24 |
(...skipping 16 matching lines...) Expand all Loading... |
41 ConnectToService(Interface::Name_, mojo::GetProxy(proxy).PassMessagePipe()); | 41 ConnectToService(Interface::Name_, mojo::GetProxy(proxy).PassMessagePipe()); |
42 } | 42 } |
43 | 43 |
44 virtual void ConnectToService(const std::string& service_name, | 44 virtual void ConnectToService(const std::string& service_name, |
45 mojo::ScopedMessagePipeHandle handle) = 0; | 45 mojo::ScopedMessagePipeHandle handle) = 0; |
46 }; | 46 }; |
47 | 47 |
48 } // namespace content | 48 } // namespace content |
49 | 49 |
50 #endif // CONTENT_PUBLIC_BROWSER_MOJO_APP_CONNECTION_H_ | 50 #endif // CONTENT_PUBLIC_BROWSER_MOJO_APP_CONNECTION_H_ |
OLD | NEW |