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

Side by Side Diff: ash/container_delegate_aura.cc

Issue 2025413002: Moves RootWindowControllerCommon and LayoutManager to common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@use_root_window_controller_common
Patch Set: merge 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
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 "ash/container_delegate_aura.h" 5 #include "ash/container_delegate_aura.h"
6 6
7 #include "ash/common/shell_window_ids.h"
7 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
8 #include "ash/shell_window_ids.h"
9 #include "ui/views/widget/widget.h" 9 #include "ui/views/widget/widget.h"
10 10
11 namespace ash { 11 namespace ash {
12 namespace { 12 namespace {
13 13
14 bool IsInContainer(views::Widget* widget, int container_id) { 14 bool IsInContainer(views::Widget* widget, int container_id) {
15 aura::Window* window = widget->GetNativeWindow(); 15 aura::Window* window = widget->GetNativeWindow();
16 RootWindowController* root_controller = 16 RootWindowController* root_controller =
17 GetRootWindowController(window->GetRootWindow()); 17 GetRootWindowController(window->GetRootWindow());
18 if (!root_controller) 18 if (!root_controller)
19 return false; 19 return false;
20 return root_controller->GetContainer(container_id)->Contains(window); 20 return root_controller->GetContainer(container_id)->Contains(window);
21 } 21 }
22 22
23 } // namespace 23 } // namespace
24 24
25 ContainerDelegateAura::ContainerDelegateAura() {} 25 ContainerDelegateAura::ContainerDelegateAura() {}
26 26
27 ContainerDelegateAura::~ContainerDelegateAura() {} 27 ContainerDelegateAura::~ContainerDelegateAura() {}
28 28
29 bool ContainerDelegateAura::IsInMenuContainer(views::Widget* widget) { 29 bool ContainerDelegateAura::IsInMenuContainer(views::Widget* widget) {
30 return IsInContainer(widget, kShellWindowId_MenuContainer); 30 return IsInContainer(widget, kShellWindowId_MenuContainer);
31 } 31 }
32 32
33 bool ContainerDelegateAura::IsInStatusContainer(views::Widget* widget) { 33 bool ContainerDelegateAura::IsInStatusContainer(views::Widget* widget) {
34 return IsInContainer(widget, kShellWindowId_StatusContainer); 34 return IsInContainer(widget, kShellWindowId_StatusContainer);
35 } 35 }
36 36
37 } // namespace ash 37 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm/workspace/workspace_window_resizer.cc ('k') | ash/desktop_background/desktop_background_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698