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

Side by Side Diff: content/utility/utility_thread_impl.h

Issue 1149833007: Embed a mojo ApplicationManager in content/browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_UTILITY_UTILITY_THREAD_IMPL_H_ 5 #ifndef CONTENT_UTILITY_UTILITY_THREAD_IMPL_H_
6 #define CONTENT_UTILITY_UTILITY_THREAD_IMPL_H_ 6 #define CONTENT_UTILITY_UTILITY_THREAD_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/memory/scoped_ptr.h"
13 #include "content/child/child_thread_impl.h" 14 #include "content/child/child_thread_impl.h"
14 #include "content/common/content_export.h" 15 #include "content/common/content_export.h"
16 #include "content/common/process_control.mojom.h"
15 #include "content/public/utility/utility_thread.h" 17 #include "content/public/utility/utility_thread.h"
18 #include "mojo/common/weak_binding_set.h"
16 19
17 namespace base { 20 namespace base {
18 class FilePath; 21 class FilePath;
19 } 22 }
20 23
21 namespace content { 24 namespace content {
22 class BlinkPlatformImpl; 25 class BlinkPlatformImpl;
23 class UtilityBlinkPlatformImpl; 26 class UtilityBlinkPlatformImpl;
27 class UtilityProcessControlImpl;
24 28
25 #if defined(COMPILER_MSVC) 29 #if defined(COMPILER_MSVC)
26 // See explanation for other RenderViewHostImpl which is the same issue. 30 // See explanation for other RenderViewHostImpl which is the same issue.
27 #pragma warning(push) 31 #pragma warning(push)
28 #pragma warning(disable: 4250) 32 #pragma warning(disable: 4250)
29 #endif 33 #endif
30 34
31 // This class represents the background thread where the utility task runs. 35 // This class represents the background thread where the utility task runs.
32 class UtilityThreadImpl : public UtilityThread, 36 class UtilityThreadImpl : public UtilityThread,
33 public ChildThreadImpl { 37 public ChildThreadImpl {
(...skipping 13 matching lines...) Expand all
47 bool OnControlMessageReceived(const IPC::Message& msg) override; 51 bool OnControlMessageReceived(const IPC::Message& msg) override;
48 52
49 // IPC message handlers. 53 // IPC message handlers.
50 void OnBatchModeStarted(); 54 void OnBatchModeStarted();
51 void OnBatchModeFinished(); 55 void OnBatchModeFinished();
52 56
53 #if defined(OS_POSIX) && defined(ENABLE_PLUGINS) 57 #if defined(OS_POSIX) && defined(ENABLE_PLUGINS)
54 void OnLoadPlugins(const std::vector<base::FilePath>& plugin_paths); 58 void OnLoadPlugins(const std::vector<base::FilePath>& plugin_paths);
55 #endif 59 #endif
56 60
61 void BindProcessControlRequest(
62 mojo::InterfaceRequest<content::ProcessControl> request);
63
57 // True when we're running in batch mode. 64 // True when we're running in batch mode.
58 bool batch_mode_; 65 bool batch_mode_;
59 66
60 scoped_ptr<UtilityBlinkPlatformImpl> blink_platform_impl_; 67 scoped_ptr<UtilityBlinkPlatformImpl> blink_platform_impl_;
61 68
69 // Process control for Mojo application hosting.
70 scoped_ptr<UtilityProcessControlImpl> process_control_;
71
72 // Bindings to the ProcessControl impl.
73 mojo::WeakBindingSet<ProcessControl> process_control_bindings_;
74
62 DISALLOW_COPY_AND_ASSIGN(UtilityThreadImpl); 75 DISALLOW_COPY_AND_ASSIGN(UtilityThreadImpl);
63 }; 76 };
64 77
65 #if defined(COMPILER_MSVC) 78 #if defined(COMPILER_MSVC)
66 #pragma warning(pop) 79 #pragma warning(pop)
67 #endif 80 #endif
68 81
69 } // namespace content 82 } // namespace content
70 83
71 #endif // CONTENT_UTILITY_UTILITY_THREAD_IMPL_H_ 84 #endif // CONTENT_UTILITY_UTILITY_THREAD_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698