| 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_COMMON_SERVICE_INFO_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_SERVICE_INFO_H_ |
| 6 #define CONTENT_PUBLIC_COMMON_SERVICE_INFO_H_ | 6 #define CONTENT_PUBLIC_COMMON_SERVICE_INFO_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/message_loop/message_loop.h" |
| 12 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
| 14 #include "base/threading/platform_thread.h" |
| 13 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
| 14 | 16 |
| 15 namespace service_manager { | 17 namespace service_manager { |
| 16 class Service; | 18 class Service; |
| 17 } | 19 } |
| 18 | 20 |
| 19 namespace content { | 21 namespace content { |
| 20 | 22 |
| 21 // ServiceInfo provides details necessary to construct and bind new instances | 23 // ServiceInfo provides details necessary to construct and bind new instances |
| 22 // of embedded services. | 24 // of embedded services. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 36 // for this service. If null, behavior depends on the value of | 38 // for this service. If null, behavior depends on the value of |
| 37 // |use_own_thread| below. | 39 // |use_own_thread| below. |
| 38 scoped_refptr<base::SingleThreadTaskRunner> task_runner; | 40 scoped_refptr<base::SingleThreadTaskRunner> task_runner; |
| 39 | 41 |
| 40 // If |task_runner| is null, setting this to |true| will give each instance of | 42 // If |task_runner| is null, setting this to |true| will give each instance of |
| 41 // this service its own thread to run on. Setting this to |false| (the | 43 // this service its own thread to run on. Setting this to |false| (the |
| 42 // default) will instead run the service on the main thread's task runner. | 44 // default) will instead run the service on the main thread's task runner. |
| 43 // | 45 // |
| 44 // If |task_runner| is not null, this value is ignored. | 46 // If |task_runner| is not null, this value is ignored. |
| 45 bool use_own_thread = false; | 47 bool use_own_thread = false; |
| 48 |
| 49 // If the service uses its own thread, this determines the type of the message |
| 50 // loop used by the thread. |
| 51 base::MessageLoop::Type message_loop_type = base::MessageLoop::TYPE_DEFAULT; |
| 52 |
| 53 // If the service uses its own thread, this determines the priority of the |
| 54 // thread. |
| 55 base::ThreadPriority thread_priority = base::ThreadPriority::NORMAL; |
| 46 }; | 56 }; |
| 47 | 57 |
| 48 } // namespace content | 58 } // namespace content |
| 49 | 59 |
| 50 #endif // CONTENT_PUBLIC_COMMON_SERVICE_INFO_H_ | 60 #endif // CONTENT_PUBLIC_COMMON_SERVICE_INFO_H_ |
| OLD | NEW |