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

Side by Side Diff: ash/accelerators/accelerator_dispatcher.h

Issue 10143001: Work in progress: Adds MessagePumpDispatcher::ShouldExit(). This is used to handle the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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
« no previous file with comments | « no previous file | ash/accelerators/accelerator_dispatcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef ASH_ACCELERATORS_ACCELERATOR_DISPATCHER_H_ 5 #ifndef ASH_ACCELERATORS_ACCELERATOR_DISPATCHER_H_
6 #define ASH_ACCELERATORS_ACCELERATOR_DISPATCHER_H_ 6 #define ASH_ACCELERATORS_ACCELERATOR_DISPATCHER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ash/ash_export.h" 9 #include "ash/ash_export.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 10 matching lines...) Expand all
21 // events to a system IME. 21 // events to a system IME.
22 class ASH_EXPORT AcceleratorDispatcher : public MessageLoop::Dispatcher, 22 class ASH_EXPORT AcceleratorDispatcher : public MessageLoop::Dispatcher,
23 public aura::WindowObserver { 23 public aura::WindowObserver {
24 public: 24 public:
25 explicit AcceleratorDispatcher(MessageLoop::Dispatcher* nested_dispatcher, 25 explicit AcceleratorDispatcher(MessageLoop::Dispatcher* nested_dispatcher,
26 aura::Window* associated_window); 26 aura::Window* associated_window);
27 virtual ~AcceleratorDispatcher(); 27 virtual ~AcceleratorDispatcher();
28 28
29 // MessageLoop::Dispatcher overrides: 29 // MessageLoop::Dispatcher overrides:
30 virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; 30 virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE;
31 virtual bool ShouldExit() OVERRIDE;
31 32
32 // aura::WindowObserver overrides: 33 // aura::WindowObserver overrides:
33 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; 34 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
34 35
35 private: 36 private:
36 MessageLoop::Dispatcher* nested_dispatcher_; 37 MessageLoop::Dispatcher* nested_dispatcher_;
37 38
38 // Window associated with |nested_dispatcher_| which is used to determine 39 // Window associated with |nested_dispatcher_| which is used to determine
39 // whether the |nested_dispatcher_| is allowed to receive events. 40 // whether the |nested_dispatcher_| is allowed to receive events.
40 aura::Window* associated_window_; 41 aura::Window* associated_window_;
41 42
42 DISALLOW_COPY_AND_ASSIGN(AcceleratorDispatcher); 43 DISALLOW_COPY_AND_ASSIGN(AcceleratorDispatcher);
43 }; 44 };
44 45
45 } // namespace ash 46 } // namespace ash
46 47
47 #endif // ASH_ACCELERATORS_ACCELERATOR_DISPATCHER_H_ 48 #endif // ASH_ACCELERATORS_ACCELERATOR_DISPATCHER_H_
OLDNEW
« no previous file with comments | « no previous file | ash/accelerators/accelerator_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698