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

Side by Side Diff: mash/simple_wm/simple_wm.cc

Issue 2556803002: Making WTH::InitCompositor() protected instead of public. (Closed)
Patch Set: Calling InitHost() instead of InitCompositor() in a couple of places. Created 4 years 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 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 #include "mash/simple_wm/simple_wm.h" 5 #include "mash/simple_wm/simple_wm.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "ui/aura/client/aura_constants.h" 8 #include "ui/aura/client/aura_constants.h"
9 #include "ui/display/screen_base.h" 9 #include "ui/display/screen_base.h"
10 #include "ui/gfx/canvas.h" 10 #include "ui/gfx/canvas.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 screen_->display_list().AddDisplay(display, 189 screen_->display_list().AddDisplay(display,
190 display::DisplayList::Type::PRIMARY); 190 display::DisplayList::Type::PRIMARY);
191 } 191 }
192 192
193 void SimpleWM::OnWmNewDisplay( 193 void SimpleWM::OnWmNewDisplay(
194 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host, 194 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host,
195 const display::Display& display) { 195 const display::Display& display) {
196 // Only handles a single root. 196 // Only handles a single root.
197 DCHECK(!root_); 197 DCHECK(!root_);
198 window_tree_host_ = std::move(window_tree_host); 198 window_tree_host_ = std::move(window_tree_host);
199 window_tree_host_->InitCompositor(); 199 window_tree_host_->InitHost();
200 root_ = window_tree_host_->window(); 200 root_ = window_tree_host_->window();
201 DCHECK(window_manager_client_); 201 DCHECK(window_manager_client_);
202 window_manager_client_->AddActivationParent(root_); 202 window_manager_client_->AddActivationParent(root_);
203 ui::mojom::FrameDecorationValuesPtr frame_decoration_values = 203 ui::mojom::FrameDecorationValuesPtr frame_decoration_values =
204 ui::mojom::FrameDecorationValues::New(); 204 ui::mojom::FrameDecorationValues::New();
205 frame_decoration_values->normal_client_area_insets.Set( 205 frame_decoration_values->normal_client_area_insets.Set(
206 kNonClientTopHeight, kNonClientSize, kNonClientSize, kNonClientSize); 206 kNonClientTopHeight, kNonClientSize, kNonClientSize, kNonClientSize);
207 frame_decoration_values->max_title_bar_button_width = 0; 207 frame_decoration_values->max_title_bar_button_width = 0;
208 window_manager_client_->SetFrameDecorationValues( 208 window_manager_client_->SetFrameDecorationValues(
209 std::move(frame_decoration_values)); 209 std::move(frame_decoration_values));
(...skipping 26 matching lines...) Expand all
236 const std::vector<gfx::Rect>& additional_client_areas) {} 236 const std::vector<gfx::Rect>& additional_client_areas) {}
237 237
238 SimpleWM::FrameView* SimpleWM::GetFrameViewForClientWindow( 238 SimpleWM::FrameView* SimpleWM::GetFrameViewForClientWindow(
239 aura::Window* client_window) { 239 aura::Window* client_window) {
240 auto it = client_window_to_frame_view_.find(client_window); 240 auto it = client_window_to_frame_view_.find(client_window);
241 return it != client_window_to_frame_view_.end() ? it->second : nullptr; 241 return it != client_window_to_frame_view_.end() ? it->second : nullptr;
242 } 242 }
243 243
244 } // namespace simple_wm 244 } // namespace simple_wm
245 245
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698