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

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

Issue 2752593008: Move AcceleratorController from WmShell to Shell (Closed)
Patch Set: fix include 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
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/metrics/user_metrics_recorder.h" 9 #include "ash/metrics/user_metrics_recorder.h"
9 #include "ash/screenshot_delegate.h" 10 #include "ash/screenshot_delegate.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 = 18 ash::ScreenshotDelegate* screenshot_delegate =
19 ash::Shell::GetInstance() 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/ash/palette_delegate_chromeos.cc ('k') | chrome/browser/ui/views/chrome_views_delegate_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698