Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / browser / ui / extensions / accelerator_priority.h
blob0908d125cc898f970e66363cd9daa6c386c282af
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
3 // found in the LICENSE file.
5 // The accelerator priority functions are intended to distinguish between
6 // accelerators that should preserve the built-in Chrome keybinding semantics
7 // (normal) and accelerators that should always override web page key handling
8 // (high). High priority is used for all accelerators assigned to extensions,
9 // except for the Ctrl+D bookmarking shortcut which is assigned normal priority
10 // when bound by an extension that requests the privilege to override the
11 // bookmark UI. This is currently the only case where we allow an extension to
12 // replace a built-in Chrome accelerator, and it should have the same behavior
13 // as the built-in accelerator.
15 #ifndef CHROME_BROWSER_UI_EXTENSIONS_ACCELERATOR_PRIORITY_H_
16 #define CHROME_BROWSER_UI_EXTENSIONS_ACCELERATOR_PRIORITY_H_
18 #include <string>
20 #include "ui/base/accelerators/accelerator_manager.h"
22 namespace content {
23 class BrowserContext;
26 namespace extensions {
27 class Extension;
30 namespace ui {
31 class Accelerator;
34 // Returns the registration priority to be used when registering |accelerator|
35 // for |extension|.
36 ui::AcceleratorManager::HandlerPriority GetAcceleratorPriority(
37 const ui::Accelerator& accelerator,
38 const extensions::Extension* extension);
40 // Returns the registration priority to be used when registering |accelerator|
41 // for the extension with ID |extension_id|.
42 ui::AcceleratorManager::HandlerPriority GetAcceleratorPriorityById(
43 const ui::Accelerator& accelerator,
44 const std::string& extension_id,
45 content::BrowserContext* browser_context);
47 #endif // CHROME_BROWSER_UI_EXTENSIONS_ACCELERATOR_PRIORITY_H_