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

Side by Side Diff: mash/wm/bridge/wm_root_window_controller_mus.cc

Issue 2002243002: Gets mash to use WmToplevelWindowEventHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback Created 4 years, 7 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 | « mash/wm/bridge/wm_globals_mus.cc ('k') | mash/wm/drag_window_resizer.h » ('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 "mash/wm/bridge/wm_root_window_controller_mus.h" 5 #include "mash/wm/bridge/wm_root_window_controller_mus.h"
6 6
7 #include "ash/wm/common/wm_root_window_controller_observer.h" 7 #include "ash/wm/common/wm_root_window_controller_observer.h"
8 #include "components/mus/public/cpp/window.h" 8 #include "components/mus/public/cpp/window.h"
9 #include "components/mus/public/cpp/window_property.h" 9 #include "components/mus/public/cpp/window_property.h"
10 #include "components/mus/public/cpp/window_tree_connection.h" 10 #include "components/mus/public/cpp/window_tree_connection.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 void WmRootWindowControllerMus::ConfigureWidgetInitParamsForContainer( 105 void WmRootWindowControllerMus::ConfigureWidgetInitParamsForContainer(
106 views::Widget* widget, 106 views::Widget* widget,
107 int shell_container_id, 107 int shell_container_id,
108 views::Widget::InitParams* init_params) { 108 views::Widget::InitParams* init_params) {
109 init_params->parent_mus = 109 init_params->parent_mus =
110 root_window_controller_->root()->GetChildByLocalId(shell_container_id); 110 root_window_controller_->root()->GetChildByLocalId(shell_container_id);
111 DCHECK(init_params->parent_mus); 111 DCHECK(init_params->parent_mus);
112 mus::Window* new_window = 112 mus::Window* new_window =
113 root_window_controller_->root()->connection()->NewWindow(); 113 root_window_controller_->root()->connection()->NewWindow();
114 WmWindowMus::Get(new_window)->set_widget(widget);
114 init_params->native_widget = new views::NativeWidgetMus( 115 init_params->native_widget = new views::NativeWidgetMus(
115 widget, root_window_controller_->GetConnector(), new_window, 116 widget, root_window_controller_->GetConnector(), new_window,
116 mus::mojom::SurfaceType::DEFAULT); 117 mus::mojom::SurfaceType::DEFAULT);
117 } 118 }
118 119
119 ash::wm::WmWindow* WmRootWindowControllerMus::FindEventTarget( 120 ash::wm::WmWindow* WmRootWindowControllerMus::FindEventTarget(
120 const gfx::Point& location_in_screen) { 121 const gfx::Point& location_in_screen) {
121 NOTIMPLEMENTED(); 122 NOTIMPLEMENTED();
122 return nullptr; 123 return nullptr;
123 } 124 }
124 125
125 void WmRootWindowControllerMus::AddObserver( 126 void WmRootWindowControllerMus::AddObserver(
126 ash::wm::WmRootWindowControllerObserver* observer) { 127 ash::wm::WmRootWindowControllerObserver* observer) {
127 observers_.AddObserver(observer); 128 observers_.AddObserver(observer);
128 } 129 }
129 130
130 void WmRootWindowControllerMus::RemoveObserver( 131 void WmRootWindowControllerMus::RemoveObserver(
131 ash::wm::WmRootWindowControllerObserver* observer) { 132 ash::wm::WmRootWindowControllerObserver* observer) {
132 observers_.RemoveObserver(observer); 133 observers_.RemoveObserver(observer);
133 } 134 }
134 135
135 } // namespace wm 136 } // namespace wm
136 } // namespace mash 137 } // namespace mash
OLDNEW
« no previous file with comments | « mash/wm/bridge/wm_globals_mus.cc ('k') | mash/wm/drag_window_resizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698