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

Side by Side Diff: ash/mus/bridge/wm_root_window_controller_mus.cc

Issue 2429173005: Mus+Ash: Replace (Server)WindowSurface with (Server)WindowCompositorFrameSink (Closed)
Patch Set: Rebased Created 4 years, 2 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 "ash/mus/bridge/wm_root_window_controller_mus.h" 5 #include "ash/mus/bridge/wm_root_window_controller_mus.h"
6 6
7 #include "ash/mus/bridge/wm_shelf_mus.h" 7 #include "ash/mus/bridge/wm_shelf_mus.h"
8 #include "ash/mus/bridge/wm_shell_mus.h" 8 #include "ash/mus/bridge/wm_shell_mus.h"
9 #include "ash/mus/bridge/wm_window_mus.h" 9 #include "ash/mus/bridge/wm_window_mus.h"
10 #include "ash/mus/root_window_controller.h" 10 #include "ash/mus/root_window_controller.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 init_params->parent_mus = WmWindowMus::GetMusWindow( 101 init_params->parent_mus = WmWindowMus::GetMusWindow(
102 WmWindowMus::Get(root_window_controller_->root()) 102 WmWindowMus::Get(root_window_controller_->root())
103 ->GetChildByShellWindowId(shell_container_id)); 103 ->GetChildByShellWindowId(shell_container_id));
104 DCHECK(init_params->parent_mus); 104 DCHECK(init_params->parent_mus);
105 ui::Window* new_window = 105 ui::Window* new_window =
106 root_window_controller_->root()->window_tree()->NewWindow( 106 root_window_controller_->root()->window_tree()->NewWindow(
107 &(init_params->mus_properties)); 107 &(init_params->mus_properties));
108 WmWindowMus::Get(new_window) 108 WmWindowMus::Get(new_window)
109 ->set_widget(widget, WmWindowMus::WidgetCreationType::INTERNAL); 109 ->set_widget(widget, WmWindowMus::WidgetCreationType::INTERNAL);
110 init_params->native_widget = new views::NativeWidgetMus( 110 init_params->native_widget = new views::NativeWidgetMus(
111 widget, new_window, ui::mojom::SurfaceType::DEFAULT); 111 widget, new_window, ui::mojom::CompositorFrameSinkType::DEFAULT);
112 } 112 }
113 113
114 WmWindow* WmRootWindowControllerMus::FindEventTarget( 114 WmWindow* WmRootWindowControllerMus::FindEventTarget(
115 const gfx::Point& location_in_screen) { 115 const gfx::Point& location_in_screen) {
116 NOTIMPLEMENTED(); 116 NOTIMPLEMENTED();
117 return nullptr; 117 return nullptr;
118 } 118 }
119 119
120 gfx::Point WmRootWindowControllerMus::GetLastMouseLocationInRoot() { 120 gfx::Point WmRootWindowControllerMus::GetLastMouseLocationInRoot() {
121 gfx::Point location = root_window_controller_->window_manager() 121 gfx::Point location = root_window_controller_->window_manager()
122 ->window_tree_client() 122 ->window_tree_client()
123 ->GetCursorScreenPoint(); 123 ->GetCursorScreenPoint();
124 location -= 124 location -=
125 root_window_controller_->display().bounds().origin().OffsetFromOrigin(); 125 root_window_controller_->display().bounds().origin().OffsetFromOrigin();
126 return location; 126 return location;
127 } 127 }
128 128
129 bool WmRootWindowControllerMus::ShouldDestroyWindowInCloseChildWindows( 129 bool WmRootWindowControllerMus::ShouldDestroyWindowInCloseChildWindows(
130 WmWindow* window) { 130 WmWindow* window) {
131 ui::Window* ui_window = WmWindowMus::GetMusWindow(window); 131 ui::Window* ui_window = WmWindowMus::GetMusWindow(window);
132 return ui_window->WasCreatedByThisClient() || 132 return ui_window->WasCreatedByThisClient() ||
133 ui_window->window_tree()->GetRoots().count(ui_window); 133 ui_window->window_tree()->GetRoots().count(ui_window);
134 } 134 }
135 135
136 } // namespace mus 136 } // namespace mus
137 } // namespace ash 137 } // namespace ash
OLDNEW
« no previous file with comments | « ash/autoclick/mus/autoclick_application.cc ('k') | ash/mus/frame/detached_title_area_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698