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

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

Issue 2010473003: Wires up shelf to panel and dock layoutmanagers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 4 years, 6 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/BUILD.gn ('k') | mash/wm/root_window_controller.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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 } 99 }
100 100
101 ash::wm::WmWindow* WmRootWindowControllerMus::GetWindow() { 101 ash::wm::WmWindow* WmRootWindowControllerMus::GetWindow() {
102 return WmWindowMus::Get(root_window_controller_->root()); 102 return WmWindowMus::Get(root_window_controller_->root());
103 } 103 }
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 = WmWindowMus::GetMusWindow(
110 root_window_controller_->root()->GetChildByLocalId(shell_container_id); 110 WmWindowMus::Get(root_window_controller_->root())
111 ->GetChildByShellWindowId(shell_container_id));
111 DCHECK(init_params->parent_mus); 112 DCHECK(init_params->parent_mus);
112 mus::Window* new_window = 113 mus::Window* new_window =
113 root_window_controller_->root()->connection()->NewWindow(); 114 root_window_controller_->root()->connection()->NewWindow();
114 WmWindowMus::Get(new_window)->set_widget(widget); 115 WmWindowMus::Get(new_window)->set_widget(widget);
115 init_params->native_widget = new views::NativeWidgetMus( 116 init_params->native_widget = new views::NativeWidgetMus(
116 widget, root_window_controller_->GetConnector(), new_window, 117 widget, root_window_controller_->GetConnector(), new_window,
117 mus::mojom::SurfaceType::DEFAULT); 118 mus::mojom::SurfaceType::DEFAULT);
118 } 119 }
119 120
120 ash::wm::WmWindow* WmRootWindowControllerMus::FindEventTarget( 121 ash::wm::WmWindow* WmRootWindowControllerMus::FindEventTarget(
121 const gfx::Point& location_in_screen) { 122 const gfx::Point& location_in_screen) {
122 NOTIMPLEMENTED(); 123 NOTIMPLEMENTED();
123 return nullptr; 124 return nullptr;
124 } 125 }
125 126
126 void WmRootWindowControllerMus::AddObserver( 127 void WmRootWindowControllerMus::AddObserver(
127 ash::wm::WmRootWindowControllerObserver* observer) { 128 ash::wm::WmRootWindowControllerObserver* observer) {
128 observers_.AddObserver(observer); 129 observers_.AddObserver(observer);
129 } 130 }
130 131
131 void WmRootWindowControllerMus::RemoveObserver( 132 void WmRootWindowControllerMus::RemoveObserver(
132 ash::wm::WmRootWindowControllerObserver* observer) { 133 ash::wm::WmRootWindowControllerObserver* observer) {
133 observers_.RemoveObserver(observer); 134 observers_.RemoveObserver(observer);
134 } 135 }
135 136
136 } // namespace wm 137 } // namespace wm
137 } // namespace mash 138 } // namespace mash
OLDNEW
« no previous file with comments | « mash/wm/BUILD.gn ('k') | mash/wm/root_window_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698