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

Side by Side Diff: ui/wm/core/nested_accelerator_dispatcher_linux.cc

Issue 666673005: Explicitly coerce PostDispatchAction to uint32_t in DispatchEvent() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ui_enums
Patch Set: Just clean up the return type issue Created 6 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698