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

Side by Side Diff: content/browser/mojo/mojo_shell_context.h

Issue 1737933002: mojo leveldb: Get profile and leveldb connected to DOMStorageContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add OWNERS file by request. Created 4 years, 9 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_BROWSER_MOJO_MOJO_SHELL_CONTEXT_H_ 5 #ifndef CONTENT_BROWSER_MOJO_MOJO_SHELL_CONTEXT_H_
6 #define CONTENT_BROWSER_MOJO_MOJO_SHELL_CONTEXT_H_ 6 #define CONTENT_BROWSER_MOJO_MOJO_SHELL_CONTEXT_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 25 matching lines...) Expand all
36 // services. This is only intended for use in browser code that's not part of 36 // services. This is only intended for use in browser code that's not part of
37 // some Mojo application. May be called from any thread. |requestor_name| is 37 // some Mojo application. May be called from any thread. |requestor_name| is
38 // given to the target application as the requestor's name upon connection. 38 // given to the target application as the requestor's name upon connection.
39 static void ConnectToApplication( 39 static void ConnectToApplication(
40 const std::string& name, 40 const std::string& name,
41 const std::string& requestor_name, 41 const std::string& requestor_name,
42 mojo::shell::mojom::InterfaceProviderRequest request, 42 mojo::shell::mojom::InterfaceProviderRequest request,
43 mojo::shell::mojom::InterfaceProviderPtr exposed_services, 43 mojo::shell::mojom::InterfaceProviderPtr exposed_services,
44 const mojo::shell::mojom::Connector::ConnectCallback& callback); 44 const mojo::shell::mojom::Connector::ConnectCallback& callback);
45 45
46 // Like ConnectToApplication(), but connects to the application as a specific
47 // userid.
48 static void ConnectToApplicationWithUserId(
Ben Goodger (Google) 2016/03/11 23:21:38 I think so few people use this class now that you
49 const std::string& user_id,
50 const std::string& name,
51 const std::string& requestor_name,
52 mojo::shell::mojom::InterfaceProviderRequest request,
53 mojo::shell::mojom::InterfaceProviderPtr exposed_services,
54 const mojo::shell::mojom::Connector::ConnectCallback& callback);
55
46 static void SetApplicationsForTest(const StaticApplicationMap* apps); 56 static void SetApplicationsForTest(const StaticApplicationMap* apps);
47 57
48 private: 58 private:
49 class Proxy; 59 class Proxy;
50 friend class Proxy; 60 friend class Proxy;
51 61
52 void ConnectToApplicationOnOwnThread( 62 void ConnectToApplicationOnOwnThread(
63 const std::string& user_id,
53 const std::string& name, 64 const std::string& name,
54 const std::string& requestor_name, 65 const std::string& requestor_name,
55 mojo::shell::mojom::InterfaceProviderRequest request, 66 mojo::shell::mojom::InterfaceProviderRequest request,
56 mojo::shell::mojom::InterfaceProviderPtr exposed_services, 67 mojo::shell::mojom::InterfaceProviderPtr exposed_services,
57 const mojo::shell::mojom::Connector::ConnectCallback& callback); 68 const mojo::shell::mojom::Connector::ConnectCallback& callback);
58 69
59 static base::LazyInstance<scoped_ptr<Proxy>> proxy_; 70 static base::LazyInstance<scoped_ptr<Proxy>> proxy_;
60 71
61 scoped_ptr<mojo::shell::Shell> shell_; 72 scoped_ptr<mojo::shell::Shell> shell_;
62 73
63 DISALLOW_COPY_AND_ASSIGN(MojoShellContext); 74 DISALLOW_COPY_AND_ASSIGN(MojoShellContext);
64 }; 75 };
65 76
66 } // namespace content 77 } // namespace content
67 78
68 #endif // CONTENT_BROWSER_MOJO_MOJO_SHELL_CONTEXT_H_ 79 #endif // CONTENT_BROWSER_MOJO_MOJO_SHELL_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698