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

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

Issue 2771233002: Remove the wrapper functions content::RecordAction et al (Closed)
Patch Set: Rebased Created 3 years, 9 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_commands.cc ('k') | chrome/browser/ui/browser_instant_controller.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_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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_commands.cc ('k') | chrome/browser/ui/browser_instant_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698