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

Unified Diff: athena/input/input_manager_impl.cc

Issue 863033002: Delete athena/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « athena/input/input_manager_impl.h ('k') | athena/input/input_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/input/input_manager_impl.cc
diff --git a/athena/input/input_manager_impl.cc b/athena/input/input_manager_impl.cc
deleted file mode 100644
index bd901b86641e546390a720f090ebafb32f07e86e..0000000000000000000000000000000000000000
--- a/athena/input/input_manager_impl.cc
+++ /dev/null
@@ -1,116 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "athena/input/input_manager_impl.h"
-
-#include "athena/input/power_button_controller.h"
-#include "base/logging.h"
-#include "ui/aura/env.h"
-#include "ui/aura/window.h"
-
-namespace athena {
-namespace {
-
-InputManager* instance = nullptr;
-
-} // namespace
-
-InputManagerImpl::InputManagerImpl()
- : accelerator_manager_(
- AcceleratorManagerImpl::CreateGlobalAcceleratorManager()),
- power_button_controller_(new PowerButtonController) {
- DCHECK(!instance);
- instance = this;
-}
-
-InputManagerImpl::~InputManagerImpl() {
- DCHECK_EQ(instance, this);
- Shutdown();
- instance = nullptr;
-}
-
-void InputManagerImpl::Init() {
- accelerator_manager_->Init();
- power_button_controller_->InstallAccelerators();
-}
-
-void InputManagerImpl::Shutdown() {
- accelerator_manager_.reset();
-}
-
-void InputManagerImpl::OnRootWindowCreated(aura::Window* root_window) {
- aura::client::SetEventClient(root_window, this);
- accelerator_manager_->OnRootWindowCreated(root_window);
-}
-
-ui::EventTarget* InputManagerImpl::GetTopmostEventTarget() {
- return this;
-}
-
-AcceleratorManager* InputManagerImpl::GetAcceleratorManager() {
- return accelerator_manager_.get();
-}
-
-void InputManagerImpl::AddPowerButtonObserver(PowerButtonObserver* observer) {
- power_button_controller_->AddPowerButtonObserver(observer);
-}
-void InputManagerImpl::RemovePowerButtonObserver(
- PowerButtonObserver* observer) {
- power_button_controller_->RemovePowerButtonObserver(observer);
-}
-
-bool InputManagerImpl::CanProcessEventsWithinSubtree(
- const aura::Window* window) const {
- return window && !window->ignore_events();
-}
-
-ui::EventTarget* InputManagerImpl::GetToplevelEventTarget() {
- return this;
-}
-
-bool InputManagerImpl::CanAcceptEvent(const ui::Event& event) {
- return true;
-}
-
-ui::EventTarget* InputManagerImpl::GetParentTarget() {
- return aura::Env::GetInstance();
-}
-
-scoped_ptr<ui::EventTargetIterator> InputManagerImpl::GetChildIterator() const {
- return scoped_ptr<ui::EventTargetIterator>();
-}
-
-ui::EventTargeter* InputManagerImpl::GetEventTargeter() {
- NOTREACHED();
- return nullptr;
-}
-
-void InputManagerImpl::OnEvent(ui::Event* event) {
-}
-
-int InputManagerImpl::SetPowerButtonTimeoutMsForTest(int timeout) {
- return power_button_controller_->SetPowerButtonTimeoutMsForTest(timeout);
-}
-
-// static
-InputManager* InputManager::Create() {
- (new InputManagerImpl)->Init();
- DCHECK(instance);
- return instance;
-}
-
-// static
-InputManager* InputManager::Get() {
- DCHECK(instance);
- return instance;
-}
-
-// static
-void InputManager::Shutdown() {
- DCHECK(instance);
- delete instance;
- DCHECK(!instance);
-}
-
-} // namespace athena
« no previous file with comments | « athena/input/input_manager_impl.h ('k') | athena/input/input_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698