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

Side by Side Diff: gpu/ipc/service/gpu_init.h

Issue 2342003003: [WIP] Mus: Pass the mojo connector to OzonePlatform::InitializeForGPU (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « content/gpu/gpu_main.cc ('k') | gpu/ipc/service/gpu_init.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 GPU_IPC_SERVICE_GPU_INIT_H_ 5 #ifndef GPU_IPC_SERVICE_GPU_INIT_H_
6 #define GPU_IPC_SERVICE_GPU_INIT_H_ 6 #define GPU_IPC_SERVICE_GPU_INIT_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "gpu/config/gpu_info.h" 10 #include "gpu/config/gpu_info.h"
11 #include "gpu/gpu_export.h" 11 #include "gpu/gpu_export.h"
12 12
13 namespace shell {
14 class Connector;
15 }
16
13 namespace base { 17 namespace base {
14 class CommandLine; 18 class CommandLine;
15 } 19 }
16 20
17 namespace gpu { 21 namespace gpu {
18 22
19 class GpuWatchdogThread; 23 class GpuWatchdogThread;
20 24
21 class GPU_EXPORT GpuSandboxHelper { 25 class GPU_EXPORT GpuSandboxHelper {
22 public: 26 public:
23 virtual ~GpuSandboxHelper() {} 27 virtual ~GpuSandboxHelper() {}
24 28
25 virtual void PreSandboxStartup() = 0; 29 virtual void PreSandboxStartup() = 0;
26 30
27 virtual bool EnsureSandboxInitialized() = 0; 31 virtual bool EnsureSandboxInitialized() = 0;
28 }; 32 };
29 33
30 class GPU_EXPORT GpuInit { 34 class GPU_EXPORT GpuInit {
31 public: 35 public:
32 GpuInit(); 36 GpuInit();
33 ~GpuInit(); 37 ~GpuInit();
34 38
35 void set_sandbox_helper(GpuSandboxHelper* helper) { 39 void set_sandbox_helper(GpuSandboxHelper* helper) {
36 sandbox_helper_ = helper; 40 sandbox_helper_ = helper;
37 } 41 }
38 42
39 bool InitializeAndStartSandbox(const base::CommandLine& command_line); 43 bool InitializeAndStartSandbox(const base::CommandLine& command_line,
44 shell::Connector* connector);
40 45
41 const GPUInfo& gpu_info() const { return gpu_info_; } 46 const GPUInfo& gpu_info() const { return gpu_info_; }
42 GpuWatchdogThread* watchdog_thread() { return watchdog_thread_.get(); } 47 GpuWatchdogThread* watchdog_thread() { return watchdog_thread_.get(); }
43 48
44 private: 49 private:
45 GpuSandboxHelper* sandbox_helper_ = nullptr; 50 GpuSandboxHelper* sandbox_helper_ = nullptr;
46 scoped_refptr<GpuWatchdogThread> watchdog_thread_; 51 scoped_refptr<GpuWatchdogThread> watchdog_thread_;
47 GPUInfo gpu_info_; 52 GPUInfo gpu_info_;
48 53
49 DISALLOW_COPY_AND_ASSIGN(GpuInit); 54 DISALLOW_COPY_AND_ASSIGN(GpuInit);
50 }; 55 };
51 56
52 } // namespace gpu 57 } // namespace gpu
53 58
54 #endif // GPU_IPC_SERVICE_GPU_INIT_H_ 59 #endif // GPU_IPC_SERVICE_GPU_INIT_H_
OLDNEW
« no previous file with comments | « content/gpu/gpu_main.cc ('k') | gpu/ipc/service/gpu_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698