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

Side by Side Diff: ash/mus/window_manager.cc

Issue 2826453003: Makes functions in container_finder take aura::Window (Closed)
Patch Set: cleanup Created 3 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 | « ash/mus/top_level_window_factory.cc ('k') | ash/root_window_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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/window_manager.h" 5 #include "ash/mus/window_manager.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 349
350 void WindowManager::OnWmSetModalType(aura::Window* window, ui::ModalType type) { 350 void WindowManager::OnWmSetModalType(aura::Window* window, ui::ModalType type) {
351 ui::ModalType old_type = window->GetProperty(aura::client::kModalKey); 351 ui::ModalType old_type = window->GetProperty(aura::client::kModalKey);
352 if (type == old_type) 352 if (type == old_type)
353 return; 353 return;
354 354
355 window->SetProperty(aura::client::kModalKey, type); 355 window->SetProperty(aura::client::kModalKey, type);
356 if (type != ui::MODAL_TYPE_SYSTEM && old_type != ui::MODAL_TYPE_SYSTEM) 356 if (type != ui::MODAL_TYPE_SYSTEM && old_type != ui::MODAL_TYPE_SYSTEM)
357 return; 357 return;
358 358
359 WmWindow* new_parent = 359 aura::Window* new_parent = wm::GetDefaultParent(window, window->bounds());
360 wm::GetDefaultParent(WmWindow::Get(window), window->bounds());
361 DCHECK(new_parent); 360 DCHECK(new_parent);
362 if (window->parent()) 361 if (window->parent())
363 window->parent()->RemoveChild(window); 362 window->parent()->RemoveChild(window);
364 new_parent->aura_window()->AddChild(window); 363 new_parent->AddChild(window);
365 } 364 }
366 365
367 void WindowManager::OnWmSetCanFocus(aura::Window* window, bool can_focus) { 366 void WindowManager::OnWmSetCanFocus(aura::Window* window, bool can_focus) {
368 NonClientFrameController* non_client_frame_controller = 367 NonClientFrameController* non_client_frame_controller =
369 NonClientFrameController::Get(window); 368 NonClientFrameController::Get(window);
370 if (non_client_frame_controller) 369 if (non_client_frame_controller)
371 non_client_frame_controller->set_can_activate(can_focus); 370 non_client_frame_controller->set_can_activate(can_focus);
372 } 371 }
373 372
374 aura::Window* WindowManager::OnWmCreateTopLevelWindow( 373 aura::Window* WindowManager::OnWmCreateTopLevelWindow(
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 bool WindowManager::IsWindowActive(aura::Window* window) { 560 bool WindowManager::IsWindowActive(aura::Window* window) {
562 return Shell::Get()->activation_client()->GetActiveWindow() == window; 561 return Shell::Get()->activation_client()->GetActiveWindow() == window;
563 } 562 }
564 563
565 void WindowManager::OnWmDeactivateWindow(aura::Window* window) { 564 void WindowManager::OnWmDeactivateWindow(aura::Window* window) {
566 Shell::Get()->activation_client()->DeactivateWindow(window); 565 Shell::Get()->activation_client()->DeactivateWindow(window);
567 } 566 }
568 567
569 } // namespace mus 568 } // namespace mus
570 } // namespace ash 569 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/top_level_window_factory.cc ('k') | ash/root_window_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698