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

Side by Side Diff: ui/views/mus/surface_binding.cc

Issue 1687693002: Rename ConnectToService to ConnectToInterface() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sp2
Patch Set: . Created 4 years, 10 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 | « ui/views/mus/screen_mus.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "ui/views/mus/surface_binding.h" 5 #include "ui/views/mus/surface_binding.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 DCHECK(window_map); 117 DCHECK(window_map);
118 DCHECK_EQ(this, (*window_map)[connection_]); 118 DCHECK_EQ(this, (*window_map)[connection_]);
119 window_map->erase(connection_); 119 window_map->erase(connection_);
120 if (window_map->empty()) { 120 if (window_map->empty()) {
121 delete window_map; 121 delete window_map;
122 window_states.Pointer()->Set(nullptr); 122 window_states.Pointer()->Set(nullptr);
123 } 123 }
124 } 124 }
125 125
126 void SurfaceBinding::PerConnectionState::Init() { 126 void SurfaceBinding::PerConnectionState::Init() {
127 shell_->ConnectToService("mojo:mus", &gpu_); 127 shell_->ConnectToInterface("mojo:mus", &gpu_);
128 } 128 }
129 129
130 // SurfaceBinding -------------------------------------------------------------- 130 // SurfaceBinding --------------------------------------------------------------
131 131
132 SurfaceBinding::SurfaceBinding(mojo::Shell* shell, 132 SurfaceBinding::SurfaceBinding(mojo::Shell* shell,
133 mus::Window* window, 133 mus::Window* window,
134 mus::mojom::SurfaceType surface_type) 134 mus::mojom::SurfaceType surface_type)
135 : window_(window), 135 : window_(window),
136 surface_type_(surface_type), 136 surface_type_(surface_type),
137 state_(PerConnectionState::Get(shell, window->connection())) {} 137 state_(PerConnectionState::Get(shell, window->connection())) {}
138 138
139 SurfaceBinding::~SurfaceBinding() {} 139 SurfaceBinding::~SurfaceBinding() {}
140 140
141 scoped_ptr<cc::OutputSurface> SurfaceBinding::CreateOutputSurface() { 141 scoped_ptr<cc::OutputSurface> SurfaceBinding::CreateOutputSurface() {
142 return state_->CreateOutputSurface(window_, surface_type_); 142 return state_->CreateOutputSurface(window_, surface_type_);
143 } 143 }
144 144
145 } // namespace views 145 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/mus/screen_mus.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698