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

Side by Side Diff: chrome/browser/ui/browser_commands_chromeos.cc

Issue 2162193003: Separates out accelerators using non-common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@accelerators
Patch Set: sim=20 Created 4 years, 5 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 | « chrome/browser/ui/browser_command_controller.cc ('k') | components/exo/pointer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/browser_commands_chromeos.h" 5 #include "chrome/browser/ui/browser_commands_chromeos.h"
6 6
7 #include "ash/accelerators/accelerator_controller.h" 7 #include "ash/accelerators/accelerator_controller_delegate_aura.h"
8 #include "ash/metrics/user_metrics_recorder.h" 8 #include "ash/metrics/user_metrics_recorder.h"
9 #include "ash/screenshot_delegate.h" 9 #include "ash/screenshot_delegate.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
11 #include "base/metrics/user_metrics_action.h" 11 #include "base/metrics/user_metrics_action.h"
12 #include "content/public/browser/user_metrics.h" 12 #include "content/public/browser/user_metrics.h"
13 13
14 using base::UserMetricsAction; 14 using base::UserMetricsAction;
15 15
16 void TakeScreenshot() { 16 void TakeScreenshot() {
17 content::RecordAction(UserMetricsAction("Menu_Take_Screenshot")); 17 content::RecordAction(UserMetricsAction("Menu_Take_Screenshot"));
18 ash::ScreenshotDelegate* screenshot_delegate = ash::Shell::GetInstance()-> 18 ash::ScreenshotDelegate* screenshot_delegate =
19 accelerator_controller()->screenshot_delegate(); 19 ash::Shell::GetInstance()
20 ->accelerator_controller_delegate()
21 ->screenshot_delegate();
20 if (screenshot_delegate && 22 if (screenshot_delegate &&
21 screenshot_delegate->CanTakeScreenshot()) { 23 screenshot_delegate->CanTakeScreenshot()) {
22 screenshot_delegate->HandleTakeScreenshotForAllRootWindows(); 24 screenshot_delegate->HandleTakeScreenshotForAllRootWindows();
23 } 25 }
24 } 26 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_command_controller.cc ('k') | components/exo/pointer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698