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

Side by Side Diff: chrome/browser/ui/ash/ash_util.cc

Issue 2769213005: Adds kWillProcessAccelerator_KeyEventProperty (Closed)
Patch Set: cleanup Created 3 years, 9 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
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 #include "chrome/browser/ui/ash/ash_util.h" 5 #include "chrome/browser/ui/ash/ash_util.h"
6 6
7 #include "ash/common/accelerators/accelerator_controller.h" 7 #include "ash/common/accelerators/accelerator_controller.h"
8 #include "ash/common/mojo_interface_factory.h" 8 #include "ash/common/mojo_interface_factory.h"
9 #include "ash/public/interfaces/event_properties.mojom.h"
9 #include "ash/shell.h" 10 #include "ash/shell.h"
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "build/build_config.h" 12 #include "build/build_config.h"
12 #include "chrome/browser/ui/ash/ash_init.h" 13 #include "chrome/browser/ui/ash/ash_init.h"
13 #include "content/public/common/service_names.mojom.h" 14 #include "content/public/common/service_names.mojom.h"
14 #include "services/service_manager/public/cpp/interface_registry.h" 15 #include "services/service_manager/public/cpp/interface_registry.h"
15 #include "services/service_manager/public/cpp/service.h" 16 #include "services/service_manager/public/cpp/service.h"
16 #include "services/service_manager/public/interfaces/interface_provider_spec.moj om.h" 17 #include "services/service_manager/public/interfaces/interface_provider_spec.moj om.h"
17 #include "services/service_manager/runner/common/client_util.h" 18 #include "services/service_manager/runner/common/client_util.h"
18 #include "ui/aura/window_event_dispatcher.h" 19 #include "ui/aura/window_event_dispatcher.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 } 64 }
64 65
65 bool IsAcceleratorDeprecated(const ui::Accelerator& accelerator) { 66 bool IsAcceleratorDeprecated(const ui::Accelerator& accelerator) {
66 // When running in mash the browser doesn't handle ash accelerators. 67 // When running in mash the browser doesn't handle ash accelerators.
67 if (IsRunningInMash()) 68 if (IsRunningInMash())
68 return false; 69 return false;
69 70
70 return ash::Shell::Get()->accelerator_controller()->IsDeprecated(accelerator); 71 return ash::Shell::Get()->accelerator_controller()->IsDeprecated(accelerator);
71 } 72 }
72 73
74 bool WillAshProcessAcceleratorForEvent(const ui::KeyEvent& key_event) {
75 return key_event.properties() &&
76 key_event.properties()->count(
77 ash::mojom::kWillProcessAccelerator_KeyEventProperty);
78 }
79
73 } // namespace ash_util 80 } // namespace ash_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698