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

Side by Side Diff: services/ui/ws/display.cc

Issue 2445873003: Pass root ServerWindow id to FrameGenerator. (Closed)
Patch Set: Pass root ServerWindow instead of id. Created 4 years, 1 month 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 #include "services/ui/ws/display.h" 5 #include "services/ui/ws/display.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 16 matching lines...) Expand all
27 #include "services/ui/ws/window_server_delegate.h" 27 #include "services/ui/ws/window_server_delegate.h"
28 #include "services/ui/ws/window_tree.h" 28 #include "services/ui/ws/window_tree.h"
29 #include "services/ui/ws/window_tree_binding.h" 29 #include "services/ui/ws/window_tree_binding.h"
30 #include "ui/base/cursor/cursor.h" 30 #include "ui/base/cursor/cursor.h"
31 31
32 namespace ui { 32 namespace ui {
33 namespace ws { 33 namespace ws {
34 34
35 Display::Display(WindowServer* window_server, 35 Display::Display(WindowServer* window_server,
36 const PlatformDisplayInitParams& platform_display_init_params) 36 const PlatformDisplayInitParams& platform_display_init_params)
37 : window_server_(window_server), 37 : window_server_(window_server), last_cursor_(mojom::Cursor::CURSOR_NULL) {
38 platform_display_(PlatformDisplay::Create(platform_display_init_params)), 38 CreateRootWindow(platform_display_init_params.metrics.bounds.size());
39 last_cursor_(mojom::Cursor::CURSOR_NULL) { 39
40 // Pass the display root ServerWindow id to PlatformDisplay.
Fady Samuel 2016/10/26 14:33:45 nit: drop id.
kylechar 2016/10/26 14:58:59 Done.
41 PlatformDisplayInitParams param_copy = platform_display_init_params;
42 param_copy.root_window = root_.get();
43 platform_display_.reset(PlatformDisplay::Create(param_copy));
40 platform_display_->Init(this); 44 platform_display_->Init(this);
41 45
42 window_server_->window_manager_window_tree_factory_set()->AddObserver(this); 46 window_server_->window_manager_window_tree_factory_set()->AddObserver(this);
43 window_server_->user_id_tracker()->AddObserver(this); 47 window_server_->user_id_tracker()->AddObserver(this);
44 } 48 }
45 49
46 Display::~Display() { 50 Display::~Display() {
47 window_server_->user_id_tracker()->RemoveObserver(this); 51 window_server_->user_id_tracker()->RemoveObserver(this);
48 52
49 window_server_->window_manager_window_tree_factory_set()->RemoveObserver( 53 window_server_->window_manager_window_tree_factory_set()->RemoveObserver(
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 } 400 }
397 401
398 void Display::OnWindowManagerWindowTreeFactoryReady( 402 void Display::OnWindowManagerWindowTreeFactoryReady(
399 WindowManagerWindowTreeFactory* factory) { 403 WindowManagerWindowTreeFactory* factory) {
400 if (!binding_) 404 if (!binding_)
401 CreateWindowManagerDisplayRootFromFactory(factory); 405 CreateWindowManagerDisplayRootFromFactory(factory);
402 } 406 }
403 407
404 } // namespace ws 408 } // namespace ws
405 } // namespace ui 409 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698