| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/views/frame/browser_view.h" | 5 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 2336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2347 for (size_t i = 0; i < chrome::kAcceleratorMapLength; ++i) { | 2347 for (size_t i = 0; i < chrome::kAcceleratorMapLength; ++i) { |
| 2348 ui::Accelerator accelerator(chrome::kAcceleratorMap[i].keycode, | 2348 ui::Accelerator accelerator(chrome::kAcceleratorMap[i].keycode, |
| 2349 chrome::kAcceleratorMap[i].modifiers); | 2349 chrome::kAcceleratorMap[i].modifiers); |
| 2350 accelerator_table_[accelerator] = chrome::kAcceleratorMap[i].command_id; | 2350 accelerator_table_[accelerator] = chrome::kAcceleratorMap[i].command_id; |
| 2351 | 2351 |
| 2352 // Also register with the focus manager. | 2352 // Also register with the focus manager. |
| 2353 focus_manager->RegisterAccelerator( | 2353 focus_manager->RegisterAccelerator( |
| 2354 accelerator, ui::AcceleratorManager::kNormalPriority, this); | 2354 accelerator, ui::AcceleratorManager::kNormalPriority, this); |
| 2355 } | 2355 } |
| 2356 #endif | 2356 #endif |
| 2357 #if defined(OS_WIN) && defined(USE_AURA) | |
| 2358 if (base::win::GetVersion() < base::win::VERSION_WIN8) { | |
| 2359 ui::Accelerator accelerator(ui::VKEY_A, | |
| 2360 ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN); | |
| 2361 accelerator_table_[accelerator] = IDC_TOGGLE_ASH_DESKTOP; | |
| 2362 focus_manager->RegisterAccelerator( | |
| 2363 accelerator, ui::AcceleratorManager::kNormalPriority, this); | |
| 2364 } | |
| 2365 #endif | |
| 2366 } | 2357 } |
| 2367 | 2358 |
| 2368 int BrowserView::GetCommandIDForAppCommandID(int app_command_id) const { | 2359 int BrowserView::GetCommandIDForAppCommandID(int app_command_id) const { |
| 2369 #if defined(OS_WIN) && !defined(USE_AURA) | 2360 #if defined(OS_WIN) && !defined(USE_AURA) |
| 2370 switch (app_command_id) { | 2361 switch (app_command_id) { |
| 2371 // NOTE: The order here matches the APPCOMMAND declaration order in the | 2362 // NOTE: The order here matches the APPCOMMAND declaration order in the |
| 2372 // Windows headers. | 2363 // Windows headers. |
| 2373 case APPCOMMAND_BROWSER_BACKWARD: return IDC_BACK; | 2364 case APPCOMMAND_BROWSER_BACKWARD: return IDC_BACK; |
| 2374 case APPCOMMAND_BROWSER_FORWARD: return IDC_FORWARD; | 2365 case APPCOMMAND_BROWSER_FORWARD: return IDC_FORWARD; |
| 2375 case APPCOMMAND_BROWSER_REFRESH: return IDC_RELOAD; | 2366 case APPCOMMAND_BROWSER_REFRESH: return IDC_RELOAD; |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2617 | 2608 |
| 2618 Browser* modal_browser = | 2609 Browser* modal_browser = |
| 2619 chrome::FindBrowserWithWebContents(active_dialog->web_contents()); | 2610 chrome::FindBrowserWithWebContents(active_dialog->web_contents()); |
| 2620 if (modal_browser && (browser_ != modal_browser)) { | 2611 if (modal_browser && (browser_ != modal_browser)) { |
| 2621 modal_browser->window()->FlashFrame(true); | 2612 modal_browser->window()->FlashFrame(true); |
| 2622 modal_browser->window()->Activate(); | 2613 modal_browser->window()->Activate(); |
| 2623 } | 2614 } |
| 2624 | 2615 |
| 2625 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); | 2616 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); |
| 2626 } | 2617 } |
| OLD | NEW |