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

Side by Side Diff: ash/accelerators/accelerator_controller.cc

Issue 48523010: [Refactor] Introduce MediaDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/media_delegate.h » ('j') | ash/media_delegate.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "ash/accelerators/accelerator_controller.h" 5 #include "ash/accelerators/accelerator_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <iostream> 9 #include <iostream>
10 #include <string> 10 #include <string>
11 11
12 #include "ash/accelerators/accelerator_commands.h" 12 #include "ash/accelerators/accelerator_commands.h"
13 #include "ash/accelerators/accelerator_table.h" 13 #include "ash/accelerators/accelerator_table.h"
14 #include "ash/accelerators/debug_commands.h" 14 #include "ash/accelerators/debug_commands.h"
15 #include "ash/ash_switches.h" 15 #include "ash/ash_switches.h"
16 #include "ash/caps_lock_delegate.h" 16 #include "ash/caps_lock_delegate.h"
17 #include "ash/debug.h" 17 #include "ash/debug.h"
18 #include "ash/display/display_controller.h" 18 #include "ash/display/display_controller.h"
19 #include "ash/display/display_manager.h" 19 #include "ash/display/display_manager.h"
20 #include "ash/focus_cycler.h" 20 #include "ash/focus_cycler.h"
21 #include "ash/ime_control_delegate.h" 21 #include "ash/ime_control_delegate.h"
22 #include "ash/launcher/launcher.h" 22 #include "ash/launcher/launcher.h"
23 #include "ash/launcher/launcher_delegate.h" 23 #include "ash/launcher/launcher_delegate.h"
24 #include "ash/launcher/launcher_model.h" 24 #include "ash/launcher/launcher_model.h"
25 #include "ash/magnifier/magnification_controller.h" 25 #include "ash/magnifier/magnification_controller.h"
26 #include "ash/magnifier/partial_magnification_controller.h" 26 #include "ash/magnifier/partial_magnification_controller.h"
27 #include "ash/media_delegate.h"
27 #include "ash/multi_profile_uma.h" 28 #include "ash/multi_profile_uma.h"
28 #include "ash/new_window_delegate.h" 29 #include "ash/new_window_delegate.h"
29 #include "ash/root_window_controller.h" 30 #include "ash/root_window_controller.h"
30 #include "ash/rotator/screen_rotation.h" 31 #include "ash/rotator/screen_rotation.h"
31 #include "ash/screenshot_delegate.h" 32 #include "ash/screenshot_delegate.h"
32 #include "ash/session_state_delegate.h" 33 #include "ash/session_state_delegate.h"
33 #include "ash/shelf/shelf_widget.h" 34 #include "ash/shelf/shelf_widget.h"
34 #include "ash/shell.h" 35 #include "ash/shell.h"
35 #include "ash/shell_delegate.h" 36 #include "ash/shell_delegate.h"
36 #include "ash/shell_window_ids.h" 37 #include "ash/shell_window_ids.h"
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 partial_magnification_controller()->is_enabled()) { 307 partial_magnification_controller()->is_enabled()) {
307 float scale = delta_index > 0 ? kDefaultPartialMagnifiedScale : 1; 308 float scale = delta_index > 0 ? kDefaultPartialMagnifiedScale : 1;
308 ash::Shell::GetInstance()->partial_magnification_controller()-> 309 ash::Shell::GetInstance()->partial_magnification_controller()->
309 SetScale(scale); 310 SetScale(scale);
310 } 311 }
311 312
312 return true; 313 return true;
313 } 314 }
314 315
315 bool HandleMediaNextTrack() { 316 bool HandleMediaNextTrack() {
316 Shell::GetInstance()->delegate()->HandleMediaNextTrack(); 317 Shell::GetInstance()->media_delegate()->HandleMediaNextTrack();
317 return true; 318 return true;
318 } 319 }
319 320
320 bool HandleMediaPlayPause() { 321 bool HandleMediaPlayPause() {
321 Shell::GetInstance()->delegate()->HandleMediaPlayPause(); 322 Shell::GetInstance()->media_delegate()->HandleMediaPlayPause();
322 return true; 323 return true;
323 } 324 }
324 325
325 bool HandleMediaPrevTrack() { 326 bool HandleMediaPrevTrack() {
326 Shell::GetInstance()->delegate()->HandleMediaPrevTrack(); 327 Shell::GetInstance()->media_delegate()->HandleMediaPrevTrack();
327 return true; 328 return true;
328 } 329 }
329 330
330 bool HandlePrintLayerHierarchy() { 331 bool HandlePrintLayerHierarchy() {
331 Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); 332 Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
332 for (size_t i = 0; i < root_windows.size(); ++i) { 333 for (size_t i = 0; i < root_windows.size(); ++i) {
333 ui::PrintLayerHierarchy(root_windows[i]->layer(), 334 ui::PrintLayerHierarchy(root_windows[i]->layer(),
334 root_windows[i]->GetLastMouseLocationInRoot()); 335 root_windows[i]->GetLastMouseLocationInRoot());
335 } 336 }
336 return true; 337 return true;
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 keyboard_brightness_control_delegate) { 984 keyboard_brightness_control_delegate) {
984 keyboard_brightness_control_delegate_ = 985 keyboard_brightness_control_delegate_ =
985 keyboard_brightness_control_delegate.Pass(); 986 keyboard_brightness_control_delegate.Pass();
986 } 987 }
987 988
988 bool AcceleratorController::CanHandleAccelerators() const { 989 bool AcceleratorController::CanHandleAccelerators() const {
989 return true; 990 return true;
990 } 991 }
991 992
992 } // namespace ash 993 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/media_delegate.h » ('j') | ash/media_delegate.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698