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

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

Issue 2778363002: Mus-WS / Aura-Mus: Propagate LocalSurfaceId on WindowTreeHost creation (Closed)
Patch Set: Add comments Created 3 years, 8 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/aura/mus/window_tree_client_unittest.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 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 12 matching lines...) Expand all
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 cc::FrameSinkId(1, 1), base::nullopt);
34 } 34 }
35 35
36 WindowTreeHostMus* WindowTreeClientPrivate::CallWmNewDisplayAdded( 36 WindowTreeHostMus* WindowTreeClientPrivate::CallWmNewDisplayAdded(
37 const display::Display& display) { 37 const display::Display& display) {
38 ui::mojom::WindowDataPtr root_data(ui::mojom::WindowData::New()); 38 ui::mojom::WindowDataPtr root_data(ui::mojom::WindowData::New());
39 root_data->parent_id = 0; 39 root_data->parent_id = 0;
40 root_data->window_id = next_window_id_++; 40 root_data->window_id = next_window_id_++;
41 root_data->visible = true; 41 root_data->visible = true;
42 root_data->bounds = gfx::Rect(display.bounds().size()); 42 root_data->bounds = gfx::Rect(display.bounds().size());
43 const bool parent_drawn = true; 43 const bool parent_drawn = true;
44 return CallWmNewDisplayAdded(display, std::move(root_data), parent_drawn); 44 return CallWmNewDisplayAdded(display, std::move(root_data), parent_drawn);
45 } 45 }
46 46
47 WindowTreeHostMus* WindowTreeClientPrivate::CallWmNewDisplayAdded( 47 WindowTreeHostMus* WindowTreeClientPrivate::CallWmNewDisplayAdded(
48 const display::Display& display, 48 const display::Display& display,
49 ui::mojom::WindowDataPtr root_data, 49 ui::mojom::WindowDataPtr root_data,
50 bool parent_drawn) { 50 bool parent_drawn) {
51 return tree_client_impl_->WmNewDisplayAddedImpl( 51 return tree_client_impl_->WmNewDisplayAddedImpl(
52 display, std::move(root_data), parent_drawn, cc::FrameSinkId(1, 1)); 52 display, std::move(root_data), parent_drawn, cc::FrameSinkId(1, 1),
53 base::nullopt);
53 } 54 }
54 55
55 void WindowTreeClientPrivate::CallOnWindowInputEvent( 56 void WindowTreeClientPrivate::CallOnWindowInputEvent(
56 Window* window, 57 Window* window,
57 std::unique_ptr<ui::Event> event) { 58 std::unique_ptr<ui::Event> event) {
58 const uint32_t event_id = 0u; 59 const uint32_t event_id = 0u;
59 const uint32_t observer_id = 0u; 60 const uint32_t observer_id = 0u;
60 const int64_t display_id = 0; 61 const int64_t display_id = 0;
61 tree_client_impl_->OnWindowInputEvent( 62 tree_client_impl_->OnWindowInputEvent(
62 event_id, WindowPortMus::Get(window)->server_id(), display_id, 63 event_id, WindowPortMus::Get(window)->server_id(), display_id,
(...skipping 27 matching lines...) Expand all
90 bool WindowTreeClientPrivate::HasPointerWatcher() { 91 bool WindowTreeClientPrivate::HasPointerWatcher() {
91 return tree_client_impl_->has_pointer_watcher_; 92 return tree_client_impl_->has_pointer_watcher_;
92 } 93 }
93 94
94 Window* WindowTreeClientPrivate::GetWindowByServerId(Id id) { 95 Window* WindowTreeClientPrivate::GetWindowByServerId(Id id) {
95 WindowMus* window = tree_client_impl_->GetWindowByServerId(id); 96 WindowMus* window = tree_client_impl_->GetWindowByServerId(id);
96 return window ? window->GetWindow() : nullptr; 97 return window ? window->GetWindow() : nullptr;
97 } 98 }
98 99
99 } // namespace aura 100 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/mus/window_tree_client_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698