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

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

Issue 2194893002: services/ui: Revert CLs that broke Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 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 | « no previous file | ash/mus/non_client_frame_controller.cc » ('j') | 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 "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/common/wm/workspace/workspace_layout_manager.h" 7 #include "ash/common/wm/workspace/workspace_layout_manager.h"
8 #include "ash/common/wm/workspace/workspace_layout_manager_backdrop_delegate.h" 8 #include "ash/common/wm/workspace/workspace_layout_manager_backdrop_delegate.h"
9 #include "ash/common/wm_root_window_controller_observer.h" 9 #include "ash/common/wm_root_window_controller_observer.h"
10 #include "ash/mus/bridge/wm_shelf_mus.h" 10 #include "ash/mus/bridge/wm_shelf_mus.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 views::Widget::InitParams* init_params) { 119 views::Widget::InitParams* init_params) {
120 init_params->parent_mus = WmWindowMus::GetMusWindow( 120 init_params->parent_mus = WmWindowMus::GetMusWindow(
121 WmWindowMus::Get(root_window_controller_->root()) 121 WmWindowMus::Get(root_window_controller_->root())
122 ->GetChildByShellWindowId(shell_container_id)); 122 ->GetChildByShellWindowId(shell_container_id));
123 DCHECK(init_params->parent_mus); 123 DCHECK(init_params->parent_mus);
124 ui::Window* new_window = 124 ui::Window* new_window =
125 root_window_controller_->root()->window_tree()->NewWindow(); 125 root_window_controller_->root()->window_tree()->NewWindow();
126 WmWindowMus::Get(new_window) 126 WmWindowMus::Get(new_window)
127 ->set_widget(widget, WmWindowMus::WidgetCreationType::INTERNAL); 127 ->set_widget(widget, WmWindowMus::WidgetCreationType::INTERNAL);
128 init_params->native_widget = new views::NativeWidgetMus( 128 init_params->native_widget = new views::NativeWidgetMus(
129 widget, new_window, ui::mojom::SurfaceType::DEFAULT); 129 widget, root_window_controller_->GetConnector(), new_window,
130 ui::mojom::SurfaceType::DEFAULT);
130 } 131 }
131 132
132 WmWindow* WmRootWindowControllerMus::FindEventTarget( 133 WmWindow* WmRootWindowControllerMus::FindEventTarget(
133 const gfx::Point& location_in_screen) { 134 const gfx::Point& location_in_screen) {
134 NOTIMPLEMENTED(); 135 NOTIMPLEMENTED();
135 return nullptr; 136 return nullptr;
136 } 137 }
137 138
138 gfx::Point WmRootWindowControllerMus::GetLastMouseLocationInRoot() { 139 gfx::Point WmRootWindowControllerMus::GetLastMouseLocationInRoot() {
139 gfx::Point location = root_window_controller_->window_manager() 140 gfx::Point location = root_window_controller_->window_manager()
140 ->window_tree_client() 141 ->window_tree_client()
141 ->GetCursorScreenPoint(); 142 ->GetCursorScreenPoint();
142 location -= 143 location -=
143 root_window_controller_->display().bounds().origin().OffsetFromOrigin(); 144 root_window_controller_->display().bounds().origin().OffsetFromOrigin();
144 return location; 145 return location;
145 } 146 }
146 147
147 void WmRootWindowControllerMus::AddObserver( 148 void WmRootWindowControllerMus::AddObserver(
148 WmRootWindowControllerObserver* observer) { 149 WmRootWindowControllerObserver* observer) {
149 observers_.AddObserver(observer); 150 observers_.AddObserver(observer);
150 } 151 }
151 152
152 void WmRootWindowControllerMus::RemoveObserver( 153 void WmRootWindowControllerMus::RemoveObserver(
153 WmRootWindowControllerObserver* observer) { 154 WmRootWindowControllerObserver* observer) {
154 observers_.RemoveObserver(observer); 155 observers_.RemoveObserver(observer);
155 } 156 }
156 157
157 } // namespace mus 158 } // namespace mus
158 } // namespace ash 159 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/mus/non_client_frame_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698