OLD | NEW |
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_delegate_aura.h" | 7 #include "ash/accelerators/accelerator_controller_delegate_aura.h" |
8 #include "ash/aura/wm_shell_aura.h" | 8 #include "ash/aura/wm_shell_aura.h" |
9 #include "ash/metrics/user_metrics_recorder.h" | 9 #include "ash/metrics/user_metrics_recorder.h" |
10 #include "ash/screenshot_delegate.h" | 10 #include "ash/screenshot_delegate.h" |
| 11 #include "base/metrics/user_metrics.h" |
11 #include "base/metrics/user_metrics_action.h" | 12 #include "base/metrics/user_metrics_action.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 base::RecordAction(UserMetricsAction("Menu_Take_Screenshot")); |
18 ash::ScreenshotDelegate* screenshot_delegate = | 18 ash::ScreenshotDelegate* screenshot_delegate = |
19 ash::WmShellAura::Get() | 19 ash::WmShellAura::Get() |
20 ->accelerator_controller_delegate() | 20 ->accelerator_controller_delegate() |
21 ->screenshot_delegate(); | 21 ->screenshot_delegate(); |
22 if (screenshot_delegate && | 22 if (screenshot_delegate && |
23 screenshot_delegate->CanTakeScreenshot()) { | 23 screenshot_delegate->CanTakeScreenshot()) { |
24 screenshot_delegate->HandleTakeScreenshotForAllRootWindows(); | 24 screenshot_delegate->HandleTakeScreenshotForAllRootWindows(); |
25 } | 25 } |
26 } | 26 } |
OLD | NEW |