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

Side by Side Diff: content/public/browser/mojo_app_connection.h

Issue 1687693002: Rename ConnectToService to ConnectToInterface() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sp2
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
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 #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"
(...skipping 19 matching lines...) Expand all
30 virtual ~MojoAppConnection() {} 30 virtual ~MojoAppConnection() {}
31 31
32 // Creates a new connection to the application at |url| using |requestor_url| 32 // Creates a new connection to the application at |url| using |requestor_url|
33 // to identify the requestor upon connection. This may be called from any 33 // to identify the requestor upon connection. This may be called from any
34 // thread. 34 // thread.
35 static scoped_ptr<MojoAppConnection> Create(const GURL& url, 35 static scoped_ptr<MojoAppConnection> Create(const GURL& url,
36 const GURL& requestor_url); 36 const GURL& requestor_url);
37 37
38 // Connects to a service within the application. 38 // Connects to a service within the application.
39 template <typename Interface> 39 template <typename Interface>
40 void ConnectToService(mojo::InterfacePtr<Interface>* proxy) { 40 void GetInterface(mojo::InterfacePtr<Interface>* proxy) {
41 ConnectToService(Interface::Name_, mojo::GetProxy(proxy).PassMessagePipe()); 41 GetInterface(Interface::Name_, mojo::GetProxy(proxy).PassMessagePipe());
42 } 42 }
43 43
44 virtual void ConnectToService(const std::string& service_name, 44 virtual void GetInterface(const std::string& interface_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_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mus.cc ('k') | content/renderer/mus/render_widget_mus_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698