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

Side by Side Diff: ash/shell.cc

Issue 2237903003: mash: Migrate Shelf aura::Window uses to WmWindow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move shelf notify functions to WmShell. 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 | « ash/shell.h ('k') | ash/wm/panels/panel_layout_manager_unittest.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/shell.h" 5 #include "ash/shell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 DCHECK(session_state_delegate_); 366 DCHECK(session_state_delegate_);
367 DCHECK_GT(session_state_delegate_->NumberOfLoggedInUsers(), 0); 367 DCHECK_GT(session_state_delegate_->NumberOfLoggedInUsers(), 0);
368 wm_shell_->CreateShelfDelegate(); 368 wm_shell_->CreateShelfDelegate();
369 369
370 RootWindowControllerList controllers = GetAllRootWindowControllers(); 370 RootWindowControllerList controllers = GetAllRootWindowControllers();
371 for (RootWindowControllerList::iterator iter = controllers.begin(); 371 for (RootWindowControllerList::iterator iter = controllers.begin();
372 iter != controllers.end(); ++iter) 372 iter != controllers.end(); ++iter)
373 (*iter)->CreateShelf(); 373 (*iter)->CreateShelf();
374 } 374 }
375 375
376 void Shell::OnShelfCreatedForRootWindow(WmWindow* root_window) {
377 FOR_EACH_OBSERVER(ShellObserver, *wm_shell_->shell_observers(),
378 OnShelfCreatedForRootWindow(root_window));
379 }
380
381 void Shell::CreateKeyboard() { 376 void Shell::CreateKeyboard() {
382 if (in_mus_) 377 if (in_mus_)
383 return; 378 return;
384 // TODO(bshe): Primary root window controller may not be the controller to 379 // TODO(bshe): Primary root window controller may not be the controller to
385 // attach virtual keyboard. See http://crbug.com/303429 380 // attach virtual keyboard. See http://crbug.com/303429
386 InitKeyboard(); 381 InitKeyboard();
387 GetPrimaryRootWindowController()->ActivateKeyboard( 382 GetPrimaryRootWindowController()->ActivateKeyboard(
388 keyboard::KeyboardController::GetInstance()); 383 keyboard::KeyboardController::GetInstance());
389 } 384 }
390 385
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 #endif 431 #endif
437 432
438 void Shell::UpdateShelfVisibility() { 433 void Shell::UpdateShelfVisibility() {
439 RootWindowControllerList controllers = GetAllRootWindowControllers(); 434 RootWindowControllerList controllers = GetAllRootWindowControllers();
440 for (RootWindowControllerList::iterator iter = controllers.begin(); 435 for (RootWindowControllerList::iterator iter = controllers.begin();
441 iter != controllers.end(); ++iter) 436 iter != controllers.end(); ++iter)
442 if ((*iter)->shelf_widget()) 437 if ((*iter)->shelf_widget())
443 (*iter)->UpdateShelfVisibility(); 438 (*iter)->UpdateShelfVisibility();
444 } 439 }
445 440
446 void Shell::OnShelfAlignmentChanged(WmWindow* root_window) {
447 FOR_EACH_OBSERVER(ShellObserver, *wm_shell_->shell_observers(),
448 OnShelfAlignmentChanged(root_window));
449 }
450
451 void Shell::OnShelfAutoHideBehaviorChanged(WmWindow* root_window) {
452 FOR_EACH_OBSERVER(ShellObserver, *wm_shell_->shell_observers(),
453 OnShelfAutoHideBehaviorChanged(root_window));
454 }
455
456 void Shell::CreateModalBackground(aura::Window* window) { 441 void Shell::CreateModalBackground(aura::Window* window) {
457 RootWindowControllerList controllers = GetAllRootWindowControllers(); 442 RootWindowControllerList controllers = GetAllRootWindowControllers();
458 for (RootWindowControllerList::iterator iter = controllers.begin(); 443 for (RootWindowControllerList::iterator iter = controllers.begin();
459 iter != controllers.end(); ++iter) 444 iter != controllers.end(); ++iter)
460 (*iter)->GetSystemModalLayoutManager(window)->CreateModalBackground(); 445 (*iter)->GetSystemModalLayoutManager(window)->CreateModalBackground();
461 } 446 }
462 447
463 void Shell::OnModalWindowRemoved(aura::Window* removed) { 448 void Shell::OnModalWindowRemoved(aura::Window* removed) {
464 RootWindowControllerList controllers = GetAllRootWindowControllers(); 449 RootWindowControllerList controllers = GetAllRootWindowControllers();
465 bool activated = false; 450 bool activated = false;
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const { 1038 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const {
1054 return std::unique_ptr<ui::EventTargetIterator>(); 1039 return std::unique_ptr<ui::EventTargetIterator>();
1055 } 1040 }
1056 1041
1057 ui::EventTargeter* Shell::GetEventTargeter() { 1042 ui::EventTargeter* Shell::GetEventTargeter() {
1058 NOTREACHED(); 1043 NOTREACHED();
1059 return nullptr; 1044 return nullptr;
1060 } 1045 }
1061 1046
1062 } // namespace ash 1047 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.h ('k') | ash/wm/panels/panel_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698