| OLD | NEW |
| 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 "ui/wm/core/nested_accelerator_dispatcher.h" | 5 #include "ui/wm/core/nested_accelerator_dispatcher.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "ui/base/accelerators/accelerator.h" | 9 #include "ui/base/accelerators/accelerator.h" |
| 10 #include "ui/events/event.h" | 10 #include "ui/events/event.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 #endif | 78 #endif |
| 79 return ui::POST_DISPATCH_NONE; | 79 return ui::POST_DISPATCH_NONE; |
| 80 case NestedAcceleratorDelegate::RESULT_PROCESSED: | 80 case NestedAcceleratorDelegate::RESULT_PROCESSED: |
| 81 return ui::POST_DISPATCH_NONE; | 81 return ui::POST_DISPATCH_NONE; |
| 82 case NestedAcceleratorDelegate::RESULT_NOT_PROCESSED: | 82 case NestedAcceleratorDelegate::RESULT_NOT_PROCESSED: |
| 83 break; | 83 break; |
| 84 } | 84 } |
| 85 } | 85 } |
| 86 ui::PlatformEventDispatcher* prev = *restore_dispatcher_; | 86 ui::PlatformEventDispatcher* prev = *restore_dispatcher_; |
| 87 | 87 |
| 88 return prev ? prev->DispatchEvent(event) | 88 uint32_t perform_default = ui::POST_DISPATCH_PERFORM_DEFAULT; |
| 89 : ui::POST_DISPATCH_PERFORM_DEFAULT; | 89 return prev ? prev->DispatchEvent(event) : perform_default; |
| 90 } | 90 } |
| 91 | 91 |
| 92 scoped_ptr<ui::ScopedEventDispatcher> restore_dispatcher_; | 92 scoped_ptr<ui::ScopedEventDispatcher> restore_dispatcher_; |
| 93 | 93 |
| 94 DISALLOW_COPY_AND_ASSIGN(NestedAcceleratorDispatcherLinux); | 94 DISALLOW_COPY_AND_ASSIGN(NestedAcceleratorDispatcherLinux); |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 scoped_ptr<NestedAcceleratorDispatcher> NestedAcceleratorDispatcher::Create( | 97 scoped_ptr<NestedAcceleratorDispatcher> NestedAcceleratorDispatcher::Create( |
| 98 NestedAcceleratorDelegate* delegate, | 98 NestedAcceleratorDelegate* delegate, |
| 99 base::MessagePumpDispatcher* nested_dispatcher) { | 99 base::MessagePumpDispatcher* nested_dispatcher) { |
| 100 return scoped_ptr<NestedAcceleratorDispatcher>( | 100 return scoped_ptr<NestedAcceleratorDispatcher>( |
| 101 new NestedAcceleratorDispatcherLinux(delegate)); | 101 new NestedAcceleratorDispatcherLinux(delegate)); |
| 102 } | 102 } |
| 103 | 103 |
| 104 } // namespace wm | 104 } // namespace wm |
| OLD | NEW |