OLD | NEW |
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 | 9 |
10 #include "ash/accelerators/focus_manager_factory.h" | 10 #include "ash/accelerators/focus_manager_factory.h" |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 std::vector<aura::Window*> Shell::GetAllContainers(int container_id) { | 356 std::vector<aura::Window*> Shell::GetAllContainers(int container_id) { |
357 // TODO(oshima): Support multiple root windows. | 357 // TODO(oshima): Support multiple root windows. |
358 std::vector<aura::Window*> containers; | 358 std::vector<aura::Window*> containers; |
359 aura::Window* container = GetPrimaryRootWindow()->GetChildById(container_id); | 359 aura::Window* container = GetPrimaryRootWindow()->GetChildById(container_id); |
360 if (container) | 360 if (container) |
361 containers.push_back(container); | 361 containers.push_back(container); |
362 return containers; | 362 return containers; |
363 } | 363 } |
364 | 364 |
365 void Shell::Init() { | 365 void Shell::Init() { |
366 if (internal::DisplayController::IsVirtualScreenCoordinatesEnabled()) | |
367 VLOG(1) << "Using virtual screen coordinates"; | |
368 // Install the custom factory first so that views::FocusManagers for Tray, | 366 // Install the custom factory first so that views::FocusManagers for Tray, |
369 // Launcher, and WallPaper could be created by the factory. | 367 // Launcher, and WallPaper could be created by the factory. |
370 views::FocusManagerFactory::Install(new AshFocusManagerFactory); | 368 views::FocusManagerFactory::Install(new AshFocusManagerFactory); |
371 | 369 |
372 env_filter_ = new aura::shared::CompoundEventFilter; | 370 env_filter_ = new aura::shared::CompoundEventFilter; |
373 // Pass ownership of the filter to the Env. | 371 // Pass ownership of the filter to the Env. |
374 aura::Env::GetInstance()->SetEventFilter(env_filter_); | 372 aura::Env::GetInstance()->SetEventFilter(env_filter_); |
375 | 373 |
376 aura::Env::GetInstance()->cursor_manager()->set_delegate(this); | 374 aura::Env::GetInstance()->cursor_manager()->set_delegate(this); |
377 | 375 |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
786 } | 784 } |
787 | 785 |
788 void Shell::ShowCursor(bool visible) { | 786 void Shell::ShowCursor(bool visible) { |
789 RootWindowList root_windows = GetAllRootWindows(); | 787 RootWindowList root_windows = GetAllRootWindows(); |
790 for (RootWindowList::iterator iter = root_windows.begin(); | 788 for (RootWindowList::iterator iter = root_windows.begin(); |
791 iter != root_windows.end(); ++iter) | 789 iter != root_windows.end(); ++iter) |
792 (*iter)->ShowCursor(visible); | 790 (*iter)->ShowCursor(visible); |
793 } | 791 } |
794 | 792 |
795 } // namespace ash | 793 } // namespace ash |
OLD | NEW |