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

Unified Diff: ui/views/mus/surface_binding.cc

Issue 2187103002: services/ui: Remove unused connector argument (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build errors Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/mus/surface_binding.h ('k') | ui/views/mus/surface_context_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/surface_binding.cc
diff --git a/ui/views/mus/surface_binding.cc b/ui/views/mus/surface_binding.cc
index d5daa7dbf4de273b9b78791ea609c24a087a4bcd..659766aed3a89fc04422efea4af4804b4e0f5365 100644
--- a/ui/views/mus/surface_binding.cc
+++ b/ui/views/mus/surface_binding.cc
@@ -37,8 +37,7 @@ namespace views {
// remain the PerClientState is deleted and the underlying map cleaned up.
class SurfaceBinding::PerClientState : public base::RefCounted<PerClientState> {
public:
- static PerClientState* Get(shell::Connector* connector,
- ui::WindowTreeClient* client);
+ static PerClientState* Get(ui::WindowTreeClient* client);
std::unique_ptr<cc::OutputSurface> CreateOutputSurface(
ui::Window* window,
@@ -49,13 +48,12 @@ class SurfaceBinding::PerClientState : public base::RefCounted<PerClientState> {
friend class base::RefCounted<PerClientState>;
- PerClientState(shell::Connector* connector, ui::WindowTreeClient* client);
+ explicit PerClientState(ui::WindowTreeClient* client);
~PerClientState();
static base::LazyInstance<
base::ThreadLocalPointer<ClientToStateMap>>::Leaky window_states;
- shell::Connector* connector_;
ui::WindowTreeClient* client_;
DISALLOW_COPY_AND_ASSIGN(PerClientState);
@@ -68,18 +66,14 @@ base::LazyInstance<base::ThreadLocalPointer<
// static
SurfaceBinding::PerClientState* SurfaceBinding::PerClientState::Get(
- shell::Connector* connector,
ui::WindowTreeClient* client) {
- // |connector| can be null in some unit-tests.
- if (!connector)
- return nullptr;
ClientToStateMap* window_map = window_states.Pointer()->Get();
if (!window_map) {
window_map = new ClientToStateMap;
window_states.Pointer()->Set(window_map);
}
if (!(*window_map)[client])
- (*window_map)[client] = new PerClientState(connector, client);
+ (*window_map)[client] = new PerClientState(client);
return (*window_map)[client];
}
@@ -87,15 +81,13 @@ std::unique_ptr<cc::OutputSurface>
SurfaceBinding::PerClientState::CreateOutputSurface(
ui::Window* window,
ui::mojom::SurfaceType surface_type) {
- scoped_refptr<cc::ContextProvider> context_provider(
- new ui::ContextProvider(connector_));
+ scoped_refptr<cc::ContextProvider> context_provider(new ui::ContextProvider);
return base::WrapUnique(new ui::OutputSurface(
context_provider, window->RequestSurface(surface_type)));
}
-SurfaceBinding::PerClientState::PerClientState(shell::Connector* connector,
- ui::WindowTreeClient* client)
- : connector_(connector), client_(client) {}
+SurfaceBinding::PerClientState::PerClientState(ui::WindowTreeClient* client)
+ : client_(client) {}
SurfaceBinding::PerClientState::~PerClientState() {
ClientToStateMap* window_map = window_states.Pointer()->Get();
@@ -110,12 +102,11 @@ SurfaceBinding::PerClientState::~PerClientState() {
// SurfaceBinding --------------------------------------------------------------
-SurfaceBinding::SurfaceBinding(shell::Connector* connector,
- ui::Window* window,
+SurfaceBinding::SurfaceBinding(ui::Window* window,
ui::mojom::SurfaceType surface_type)
: window_(window),
surface_type_(surface_type),
- state_(PerClientState::Get(connector, window->window_tree())) {}
+ state_(PerClientState::Get(window->window_tree())) {}
SurfaceBinding::~SurfaceBinding() {}
« no previous file with comments | « ui/views/mus/surface_binding.h ('k') | ui/views/mus/surface_context_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698