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

Side by Side Diff: mash/wm/root_window_controller.cc

Issue 1863523006: mash: Make system tray bubble close when another window is activated (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 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 | « mash/wm/public/interfaces/container.mojom ('k') | ui/views/bubble/tray_bubble_view.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/root_window_controller.h" 5 #include "mash/wm/root_window_controller.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "components/mus/common/util.h" 10 #include "components/mus/common/util.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 layout_manager_[user_background].reset(new BackgroundLayout(user_background)); 123 layout_manager_[user_background].reset(new BackgroundLayout(user_background));
124 mus::Window* login_app = GetWindowForContainer(mojom::Container::LOGIN_APP); 124 mus::Window* login_app = GetWindowForContainer(mojom::Container::LOGIN_APP);
125 layout_manager_[login_app].reset(new ScreenlockLayout(login_app)); 125 layout_manager_[login_app].reset(new ScreenlockLayout(login_app));
126 mus::Window* user_shelf = GetWindowForContainer(mojom::Container::USER_SHELF); 126 mus::Window* user_shelf = GetWindowForContainer(mojom::Container::USER_SHELF);
127 layout_manager_[user_shelf].reset(new ShelfLayout(user_shelf)); 127 layout_manager_[user_shelf].reset(new ShelfLayout(user_shelf));
128 128
129 mus::Window* window = GetWindowForContainer(mojom::Container::USER_WINDOWS); 129 mus::Window* window = GetWindowForContainer(mojom::Container::USER_WINDOWS);
130 layout_manager_[window].reset(new WindowLayout(window)); 130 layout_manager_[window].reset(new WindowLayout(window));
131 window_manager_client()->AddActivationParent(window); 131 window_manager_client()->AddActivationParent(window);
132 132
133 // Bubble windows must be allowed to activate because some of them rely on
134 // deactivation to close.
135 mus::Window* bubbles = GetWindowForContainer(mojom::Container::BUBBLES);
136 window_manager_client()->AddActivationParent(bubbles);
137
133 AddAccelerators(); 138 AddAccelerators();
134 139
135 window_manager_->Initialize(this, app_->session()); 140 window_manager_->Initialize(this, app_->session());
136 141
137 shadow_controller_.reset(new ShadowController(root->connection())); 142 shadow_controller_.reset(new ShadowController(root->connection()));
138 143
139 app_->OnRootWindowControllerDoneInit(this); 144 app_->OnRootWindowControllerDoneInit(this);
140 } 145 }
141 146
142 void RootWindowController::OnConnectionLost( 147 void RootWindowController::OnConnectionLost(
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 mojom::Container::USER_PRIVATE); 191 mojom::Container::USER_PRIVATE);
187 CreateContainer(mojom::Container::USER_STICKY_WINDOWS, 192 CreateContainer(mojom::Container::USER_STICKY_WINDOWS,
188 mojom::Container::USER_PRIVATE); 193 mojom::Container::USER_PRIVATE);
189 CreateContainer(mojom::Container::USER_PRESENTATION_WINDOWS, 194 CreateContainer(mojom::Container::USER_PRESENTATION_WINDOWS,
190 mojom::Container::USER_PRIVATE); 195 mojom::Container::USER_PRIVATE);
191 CreateContainer(mojom::Container::USER_SHELF, mojom::Container::USER_PRIVATE); 196 CreateContainer(mojom::Container::USER_SHELF, mojom::Container::USER_PRIVATE);
192 CreateContainer(mojom::Container::LOGIN_WINDOWS, mojom::Container::ROOT); 197 CreateContainer(mojom::Container::LOGIN_WINDOWS, mojom::Container::ROOT);
193 CreateContainer(mojom::Container::LOGIN_APP, mojom::Container::LOGIN_WINDOWS); 198 CreateContainer(mojom::Container::LOGIN_APP, mojom::Container::LOGIN_WINDOWS);
194 CreateContainer(mojom::Container::LOGIN_SHELF, 199 CreateContainer(mojom::Container::LOGIN_SHELF,
195 mojom::Container::LOGIN_WINDOWS); 200 mojom::Container::LOGIN_WINDOWS);
201 CreateContainer(mojom::Container::BUBBLES, mojom::Container::ROOT);
196 CreateContainer(mojom::Container::SYSTEM_MODAL_WINDOWS, 202 CreateContainer(mojom::Container::SYSTEM_MODAL_WINDOWS,
197 mojom::Container::ROOT); 203 mojom::Container::ROOT);
198 CreateContainer(mojom::Container::KEYBOARD, mojom::Container::ROOT); 204 CreateContainer(mojom::Container::KEYBOARD, mojom::Container::ROOT);
199 CreateContainer(mojom::Container::MENUS, mojom::Container::ROOT); 205 CreateContainer(mojom::Container::MENUS, mojom::Container::ROOT);
200 CreateContainer(mojom::Container::TOOLTIPS, mojom::Container::ROOT); 206 CreateContainer(mojom::Container::TOOLTIPS, mojom::Container::ROOT);
201 } 207 }
202 208
203 } // namespace wm 209 } // namespace wm
204 } // namespace mash 210 } // namespace mash
OLDNEW
« no previous file with comments | « mash/wm/public/interfaces/container.mojom ('k') | ui/views/bubble/tray_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698