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

Side by Side Diff: content/renderer/mus/render_widget_mus_connection.h

Issue 2233003003: services/ui: Inject GpuService instance where needed, instead of singleton. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 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_RENDERER_MUS_RENDER_WIDGET_MUS_CONNECTION_H_ 5 #ifndef CONTENT_RENDERER_MUS_RENDER_WIDGET_MUS_CONNECTION_H_
6 #define CONTENT_RENDERER_MUS_RENDER_WIDGET_MUS_CONNECTION_H_ 6 #define CONTENT_RENDERER_MUS_RENDER_WIDGET_MUS_CONNECTION_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/threading/thread_checker.h" 9 #include "base/threading/thread_checker.h"
10 #include "cc/output/output_surface.h" 10 #include "cc/output/output_surface.h"
11 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
12 #include "content/renderer/input/render_widget_input_handler_delegate.h" 12 #include "content/renderer/input/render_widget_input_handler_delegate.h"
13 #include "content/renderer/mus/compositor_mus_connection.h" 13 #include "content/renderer/mus/compositor_mus_connection.h"
14 #include "services/ui/public/cpp/window_surface.h" 14 #include "services/ui/public/cpp/window_surface.h"
15 15
16 namespace ui {
17 class GpuService;
18 }
19
16 namespace content { 20 namespace content {
17 21
18 class InputHandlerManager; 22 class InputHandlerManager;
19 23
20 // Use on main thread. 24 // Use on main thread.
21 class CONTENT_EXPORT RenderWidgetMusConnection 25 class CONTENT_EXPORT RenderWidgetMusConnection
22 : public RenderWidgetInputHandlerDelegate { 26 : public RenderWidgetInputHandlerDelegate {
23 public: 27 public:
24 // Bind to a WindowTreeClient request. 28 // Bind to a WindowTreeClient request.
25 void Bind(mojo::InterfaceRequest<ui::mojom::WindowTreeClient> request); 29 void Bind(mojo::InterfaceRequest<ui::mojom::WindowTreeClient> request);
26 30
27 // Create a cc output surface. 31 // Create a cc output surface.
28 std::unique_ptr<cc::OutputSurface> CreateOutputSurface(); 32 std::unique_ptr<cc::OutputSurface> CreateOutputSurface(ui::GpuService* gpu);
29 33
30 static RenderWidgetMusConnection* Get(int routing_id); 34 static RenderWidgetMusConnection* Get(int routing_id);
31 35
32 // Get the connection from a routing_id, if the connection doesn't exist, 36 // Get the connection from a routing_id, if the connection doesn't exist,
33 // a new connection will be created. 37 // a new connection will be created.
34 static RenderWidgetMusConnection* GetOrCreate(int routing_id); 38 static RenderWidgetMusConnection* GetOrCreate(int routing_id);
35 39
36 private: 40 private:
37 friend class CompositorMusConnection; 41 friend class CompositorMusConnection;
38 friend class CompositorMusConnectionTest; 42 friend class CompositorMusConnectionTest;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 75
72 // Used to verify single threaded access. 76 // Used to verify single threaded access.
73 base::ThreadChecker thread_checker_; 77 base::ThreadChecker thread_checker_;
74 78
75 DISALLOW_COPY_AND_ASSIGN(RenderWidgetMusConnection); 79 DISALLOW_COPY_AND_ASSIGN(RenderWidgetMusConnection);
76 }; 80 };
77 81
78 } // namespace content 82 } // namespace content
79 83
80 #endif // CONTENT_RENDERER_MUS_RENDER_WIDGET_MUS_CONNECTION_H_ 84 #endif // CONTENT_RENDERER_MUS_RENDER_WIDGET_MUS_CONNECTION_H_
OLDNEW
« no previous file with comments | « ash/mus/window_manager_application.cc ('k') | content/renderer/mus/render_widget_mus_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698