"Fossies" - the Fresh Open Source Software Archive

Member "brave-core-1.31.87/chromium_src/chrome/browser/ui/views/accelerator_table.cc" (19 Oct 2021, 1171 Bytes) of package /linux/www/brave-core-1.31.87.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "accelerator_table.cc" see the Fossies "Dox" file reference documentation.

    1 /* Copyright (c) 2020 The Brave Authors. All rights reserved.
    2  * This Source Code Form is subject to the terms of the Mozilla Public
    3  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
    4  * You can obtain one at http://mozilla.org/MPL/2.0/. */
    5 
    6 #include "chrome/browser/ui/views/accelerator_table.h"
    7 
    8 #define GetAcceleratorList GetAcceleratorList_ChromiumImpl
    9 #include "../../../../../../chrome/browser/ui/views/accelerator_table.cc"
   10 #undef GetAcceleratorList
   11 
   12 namespace {
   13 
   14 const AcceleratorMapping kBraveAcceleratorMap[] = {
   15 #if defined(OS_MAC)
   16     // Command-Option-N
   17     {ui::VKEY_N, ui::EF_ALT_DOWN | ui::EF_PLATFORM_ACCELERATOR,
   18      IDC_NEW_OFFTHERECORD_WINDOW_TOR},
   19 #else
   20     // Alt-Shift-N
   21     {ui::VKEY_N, ui::EF_ALT_DOWN | ui::EF_SHIFT_DOWN,
   22      IDC_NEW_OFFTHERECORD_WINDOW_TOR},
   23 #endif
   24 };
   25 
   26 }  // namespace
   27 
   28 std::vector<AcceleratorMapping> GetAcceleratorList() {
   29   std::vector<AcceleratorMapping> accelerator_list(
   30       GetAcceleratorList_ChromiumImpl());
   31 
   32   accelerator_list.insert(
   33       accelerator_list.end(),
   34       kBraveAcceleratorMap,
   35       kBraveAcceleratorMap + base::size(kBraveAcceleratorMap));
   36 
   37   return accelerator_list;
   38 }