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

Side by Side Diff: ui/aura/test/mus/window_tree_client_private.cc

Issue 2764433003: mus-ws: Plumb FrameSinkId to Children (Closed)
Patch Set: Addressed Antoine's comment Created 3 years, 9 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 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 "ui/aura/test/mus/window_tree_client_private.h" 5 #include "ui/aura/test/mus/window_tree_client_private.h"
6 6
7 #include "ui/aura/mus/window_port_mus.h" 7 #include "ui/aura/mus/window_port_mus.h"
8 #include "ui/aura/mus/window_tree_client.h" 8 #include "ui/aura/mus/window_tree_client.h"
9 #include "ui/aura/window.h" 9 #include "ui/aura/window.h"
10 #include "ui/display/display.h" 10 #include "ui/display/display.h"
(...skipping 11 matching lines...) Expand all
22 WindowTreeClientPrivate::~WindowTreeClientPrivate() {} 22 WindowTreeClientPrivate::~WindowTreeClientPrivate() {}
23 23
24 void WindowTreeClientPrivate::OnEmbed(ui::mojom::WindowTree* window_tree) { 24 void WindowTreeClientPrivate::OnEmbed(ui::mojom::WindowTree* window_tree) {
25 ui::mojom::WindowDataPtr root_data(ui::mojom::WindowData::New()); 25 ui::mojom::WindowDataPtr root_data(ui::mojom::WindowData::New());
26 root_data->parent_id = 0; 26 root_data->parent_id = 0;
27 root_data->window_id = next_window_id_++; 27 root_data->window_id = next_window_id_++;
28 root_data->visible = true; 28 root_data->visible = true;
29 const int64_t display_id = 1; 29 const int64_t display_id = 1;
30 const Id focused_window_id = 0; 30 const Id focused_window_id = 0;
31 tree_client_impl_->OnEmbedImpl(window_tree, 1, std::move(root_data), 31 tree_client_impl_->OnEmbedImpl(window_tree, 1, std::move(root_data),
32 display_id, focused_window_id, true); 32 display_id, focused_window_id, true,
33 cc::FrameSinkId(1, 1));
33 } 34 }
34 35
35 WindowTreeHostMus* WindowTreeClientPrivate::CallWmNewDisplayAdded( 36 WindowTreeHostMus* WindowTreeClientPrivate::CallWmNewDisplayAdded(
36 const display::Display& display) { 37 const display::Display& display) {
37 ui::mojom::WindowDataPtr root_data(ui::mojom::WindowData::New()); 38 ui::mojom::WindowDataPtr root_data(ui::mojom::WindowData::New());
38 root_data->parent_id = 0; 39 root_data->parent_id = 0;
39 root_data->window_id = next_window_id_++; 40 root_data->window_id = next_window_id_++;
40 root_data->visible = true; 41 root_data->visible = true;
41 root_data->bounds = gfx::Rect(display.bounds().size()); 42 root_data->bounds = gfx::Rect(display.bounds().size());
42 const bool parent_drawn = true; 43 const bool parent_drawn = true;
43 return CallWmNewDisplayAdded(display, std::move(root_data), parent_drawn); 44 return CallWmNewDisplayAdded(display, std::move(root_data), parent_drawn);
44 } 45 }
45 46
46 WindowTreeHostMus* WindowTreeClientPrivate::CallWmNewDisplayAdded( 47 WindowTreeHostMus* WindowTreeClientPrivate::CallWmNewDisplayAdded(
47 const display::Display& display, 48 const display::Display& display,
48 ui::mojom::WindowDataPtr root_data, 49 ui::mojom::WindowDataPtr root_data,
49 bool parent_drawn) { 50 bool parent_drawn) {
50 return tree_client_impl_->WmNewDisplayAddedImpl(display, std::move(root_data), 51 return tree_client_impl_->WmNewDisplayAddedImpl(
51 parent_drawn); 52 display, std::move(root_data), parent_drawn, cc::FrameSinkId(1, 1));
52 } 53 }
53 54
54 void WindowTreeClientPrivate::CallOnWindowInputEvent( 55 void WindowTreeClientPrivate::CallOnWindowInputEvent(
55 Window* window, 56 Window* window,
56 std::unique_ptr<ui::Event> event) { 57 std::unique_ptr<ui::Event> event) {
57 const uint32_t event_id = 0u; 58 const uint32_t event_id = 0u;
58 const uint32_t observer_id = 0u; 59 const uint32_t observer_id = 0u;
59 const int64_t display_id = 0; 60 const int64_t display_id = 0;
60 tree_client_impl_->OnWindowInputEvent( 61 tree_client_impl_->OnWindowInputEvent(
61 event_id, WindowPortMus::Get(window)->server_id(), display_id, 62 event_id, WindowPortMus::Get(window)->server_id(), display_id,
(...skipping 27 matching lines...) Expand all
89 bool WindowTreeClientPrivate::HasPointerWatcher() { 90 bool WindowTreeClientPrivate::HasPointerWatcher() {
90 return tree_client_impl_->has_pointer_watcher_; 91 return tree_client_impl_->has_pointer_watcher_;
91 } 92 }
92 93
93 Window* WindowTreeClientPrivate::GetWindowByServerId(Id id) { 94 Window* WindowTreeClientPrivate::GetWindowByServerId(Id id) {
94 WindowMus* window = tree_client_impl_->GetWindowByServerId(id); 95 WindowMus* window = tree_client_impl_->GetWindowByServerId(id);
95 return window ? window->GetWindow() : nullptr; 96 return window ? window->GetWindow() : nullptr;
96 } 97 }
97 98
98 } // namespace aura 99 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/mus/window_tree_host_mus_unittest.cc ('k') | ui/views/mus/desktop_window_tree_host_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698