OLD | NEW |
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 #include "extensions/browser/api/messaging/native_message_host.h" | 5 #include "extensions/browser/api/messaging/native_message_host.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 std::unique_ptr<remoting::ChromotingHostContext> context = | 99 std::unique_ptr<remoting::ChromotingHostContext> context = |
100 remoting::ChromotingHostContext::CreateForChromeOS( | 100 remoting::ChromotingHostContext::CreateForChromeOS( |
101 make_scoped_refptr(g_browser_process->system_request_context()), | 101 make_scoped_refptr(g_browser_process->system_request_context()), |
102 content::BrowserThread::GetTaskRunnerForThread( | 102 content::BrowserThread::GetTaskRunnerForThread( |
103 content::BrowserThread::IO), | 103 content::BrowserThread::IO), |
104 content::BrowserThread::GetTaskRunnerForThread( | 104 content::BrowserThread::GetTaskRunnerForThread( |
105 content::BrowserThread::UI), | 105 content::BrowserThread::UI), |
106 content::BrowserThread::GetTaskRunnerForThread( | 106 content::BrowserThread::GetTaskRunnerForThread( |
107 content::BrowserThread::FILE)); | 107 content::BrowserThread::FILE)); |
108 std::unique_ptr<NativeMessageHost> host( | 108 std::unique_ptr<NativeMessageHost> host( |
109 new remoting::It2MeNativeMessagingHost(std::move(context), | 109 new remoting::It2MeNativeMessagingHost(/*needs_elevation=*/false, |
| 110 std::move(context), |
110 std::move(host_factory))); | 111 std::move(host_factory))); |
111 return host; | 112 return host; |
112 } | 113 } |
113 | 114 |
114 // If you modify the list of allowed_origins, don't forget to update | 115 // If you modify the list of allowed_origins, don't forget to update |
115 // remoting/host/it2me/com.google.chrome.remote_assistance.json.jinja2 | 116 // remoting/host/it2me/com.google.chrome.remote_assistance.json.jinja2 |
116 // to keep the two lists in sync. | 117 // to keep the two lists in sync. |
117 // TODO(kelvinp): Load the native messaging manifest as a resource file into | 118 // TODO(kelvinp): Load the native messaging manifest as a resource file into |
118 // chrome and fetch the list of allowed_origins from the manifest (see | 119 // chrome and fetch the list of allowed_origins from the manifest (see |
119 // crbug/424743). | 120 // crbug/424743). |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 } | 173 } |
173 *error = kForbiddenError; | 174 *error = kForbiddenError; |
174 return nullptr; | 175 return nullptr; |
175 } | 176 } |
176 } | 177 } |
177 *error = kNotFoundError; | 178 *error = kNotFoundError; |
178 return nullptr; | 179 return nullptr; |
179 } | 180 } |
180 | 181 |
181 } // namespace extensions | 182 } // namespace extensions |
OLD | NEW |