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

Side by Side Diff: athena/input/input_manager_impl.cc

Issue 332443005: Enable accelerators on web activity window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "athena/input/public/input_manager.h" 5 #include "athena/input/public/input_manager.h"
6 6
7 #include "athena/input/accelerator_manager_impl.h" 7 #include "athena/input/accelerator_manager_impl.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "ui/aura/client/event_client.h" 9 #include "ui/aura/client/event_client.h"
10 #include "ui/aura/env.h" 10 #include "ui/aura/env.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 virtual scoped_ptr<ui::EventTargetIterator> GetChildIterator() const OVERRIDE; 47 virtual scoped_ptr<ui::EventTargetIterator> GetChildIterator() const OVERRIDE;
48 virtual ui::EventTargeter* GetEventTargeter() OVERRIDE; 48 virtual ui::EventTargeter* GetEventTargeter() OVERRIDE;
49 virtual void OnEvent(ui::Event* event) OVERRIDE; 49 virtual void OnEvent(ui::Event* event) OVERRIDE;
50 50
51 scoped_ptr<AcceleratorManagerImpl> accelerator_manager_; 51 scoped_ptr<AcceleratorManagerImpl> accelerator_manager_;
52 52
53 DISALLOW_COPY_AND_ASSIGN(InputManagerImpl); 53 DISALLOW_COPY_AND_ASSIGN(InputManagerImpl);
54 }; 54 };
55 55
56 InputManagerImpl::InputManagerImpl() 56 InputManagerImpl::InputManagerImpl()
57 : accelerator_manager_(new AcceleratorManagerImpl) { 57 : accelerator_manager_(
58 AcceleratorManagerImpl::CreateGlobalAcceleratorManager()) {
58 DCHECK(!instance); 59 DCHECK(!instance);
59 instance = this; 60 instance = this;
60 } 61 }
61 62
62 InputManagerImpl::~InputManagerImpl() { 63 InputManagerImpl::~InputManagerImpl() {
63 DCHECK_EQ(instance, this); 64 DCHECK_EQ(instance, this);
64 Shutdown(); 65 Shutdown();
65 instance = NULL; 66 instance = NULL;
66 } 67 }
67 68
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 } 115 }
115 116
116 // static 117 // static
117 void InputManager::Shutdown() { 118 void InputManager::Shutdown() {
118 DCHECK(instance); 119 DCHECK(instance);
119 delete instance; 120 delete instance;
120 DCHECK(!instance); 121 DCHECK(!instance);
121 } 122 }
122 123
123 } // namespace athena 124 } // namespace athena
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698