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

Side by Side Diff: shell/application_manager/application_manager.h

Issue 1118843003: Remove some InterfacePtr<> methods which directly deal with message pipe handles. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ 5 #ifndef SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_
6 #define SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ 6 #define SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 const GURL& requestor_url, 73 const GURL& requestor_url,
74 mojo::InterfaceRequest<mojo::ServiceProvider> services, 74 mojo::InterfaceRequest<mojo::ServiceProvider> services,
75 mojo::ServiceProviderPtr exposed_services, 75 mojo::ServiceProviderPtr exposed_services,
76 const base::Closure& on_application_end); 76 const base::Closure& on_application_end);
77 77
78 template <typename Interface> 78 template <typename Interface>
79 inline void ConnectToService(const GURL& application_url, 79 inline void ConnectToService(const GURL& application_url,
80 mojo::InterfacePtr<Interface>* ptr) { 80 mojo::InterfacePtr<Interface>* ptr) {
81 mojo::ScopedMessagePipeHandle service_handle = 81 mojo::ScopedMessagePipeHandle service_handle =
82 ConnectToServiceByName(application_url, Interface::Name_); 82 ConnectToServiceByName(application_url, Interface::Name_);
83 ptr->Bind(service_handle.Pass()); 83 ptr->Bind(mojo::InterfacePtrInfo<Interface>(service_handle.Pass(), 0u));
84 } 84 }
85 85
86 mojo::ScopedMessagePipeHandle ConnectToServiceByName( 86 mojo::ScopedMessagePipeHandle ConnectToServiceByName(
87 const GURL& application_url, 87 const GURL& application_url,
88 const std::string& interface_name); 88 const std::string& interface_name);
89 89
90 void RegisterContentHandler(const std::string& mime_type, 90 void RegisterContentHandler(const std::string& mime_type,
91 const GURL& content_handler_url); 91 const GURL& content_handler_url);
92 92
93 // Sets the default Loader to be used if not overridden by SetLoaderForURL() 93 // Sets the default Loader to be used if not overridden by SetLoaderForURL()
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 ScopedVector<NativeRunner> native_runners_; 236 ScopedVector<NativeRunner> native_runners_;
237 bool disable_cache_; 237 bool disable_cache_;
238 base::WeakPtrFactory<ApplicationManager> weak_ptr_factory_; 238 base::WeakPtrFactory<ApplicationManager> weak_ptr_factory_;
239 239
240 DISALLOW_COPY_AND_ASSIGN(ApplicationManager); 240 DISALLOW_COPY_AND_ASSIGN(ApplicationManager);
241 }; 241 };
242 242
243 } // namespace shell 243 } // namespace shell
244 244
245 #endif // SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ 245 #endif // SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698