OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/first_run/desktop_cleaner.h" | 5 #include "ash/first_run/desktop_cleaner.h" |
6 | 6 |
7 #include "ash/public/cpp/shell_window_ids.h" | 7 #include "ash/public/cpp/shell_window_ids.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ui/aura/window_event_dispatcher.h" | 9 #include "ui/aura/window_event_dispatcher.h" |
10 #include "ui/aura/window_observer.h" | 10 #include "ui/aura/window_observer.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 88 |
89 DISALLOW_COPY_AND_ASSIGN(NotificationBlocker); | 89 DISALLOW_COPY_AND_ASSIGN(NotificationBlocker); |
90 }; | 90 }; |
91 | 91 |
92 DesktopCleaner::DesktopCleaner() { | 92 DesktopCleaner::DesktopCleaner() { |
93 // TODO(dzhioev): Add support for secondary displays. | 93 // TODO(dzhioev): Add support for secondary displays. |
94 aura::Window* root_window = Shell::GetInstance()->GetPrimaryRootWindow(); | 94 aura::Window* root_window = Shell::GetInstance()->GetPrimaryRootWindow(); |
95 for (size_t i = 0; i < arraysize(kContainerIdsToHide); ++i) { | 95 for (size_t i = 0; i < arraysize(kContainerIdsToHide); ++i) { |
96 aura::Window* container = | 96 aura::Window* container = |
97 Shell::GetContainer(root_window, kContainerIdsToHide[i]); | 97 Shell::GetContainer(root_window, kContainerIdsToHide[i]); |
98 container_hiders_.push_back(make_linked_ptr(new ContainerHider(container))); | 98 container_hiders_.push_back(base::MakeUnique<ContainerHider>(container)); |
99 } | 99 } |
100 notification_blocker_.reset(new NotificationBlocker()); | 100 notification_blocker_.reset(new NotificationBlocker()); |
101 } | 101 } |
102 | 102 |
103 DesktopCleaner::~DesktopCleaner() {} | 103 DesktopCleaner::~DesktopCleaner() {} |
104 | 104 |
105 // static | 105 // static |
106 std::vector<int> DesktopCleaner::GetContainersToHideForTest() { | 106 std::vector<int> DesktopCleaner::GetContainersToHideForTest() { |
107 return std::vector<int>(kContainerIdsToHide, | 107 return std::vector<int>(kContainerIdsToHide, |
108 kContainerIdsToHide + arraysize(kContainerIdsToHide)); | 108 kContainerIdsToHide + arraysize(kContainerIdsToHide)); |
109 } | 109 } |
110 | 110 |
111 } // namespace ash | 111 } // namespace ash |
OLD | NEW |