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

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

Issue 1540753002: Switch to standard integer types in ash/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: arraysize Created 5 years 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 | « no previous file | ash/accelerators/accelerator_controller.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_commands.h" 5 #include "ash/accelerators/accelerator_commands.h"
6 6
7 #include "ash/display/display_manager.h" 7 #include "ash/display/display_manager.h"
8 #include "ash/display/display_util.h" 8 #include "ash/display/display_util.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_delegate.h" 10 #include "ash/shell_delegate.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 } 65 }
66 66
67 bool ZoomInternalDisplay(bool up) { 67 bool ZoomInternalDisplay(bool up) {
68 if (up) 68 if (up)
69 base::RecordAction(base::UserMetricsAction("Accel_Scale_Ui_Up")); 69 base::RecordAction(base::UserMetricsAction("Accel_Scale_Ui_Up"));
70 else 70 else
71 base::RecordAction(base::UserMetricsAction("Accel_Scale_Ui_Down")); 71 base::RecordAction(base::UserMetricsAction("Accel_Scale_Ui_Down"));
72 72
73 DisplayManager* display_manager = Shell::GetInstance()->display_manager(); 73 DisplayManager* display_manager = Shell::GetInstance()->display_manager();
74 74
75 int64 display_id = display_manager->IsInUnifiedMode() 75 int64_t display_id = display_manager->IsInUnifiedMode()
76 ? DisplayManager::kUnifiedDisplayId 76 ? DisplayManager::kUnifiedDisplayId
77 : display_manager->GetDisplayIdForUIScaling(); 77 : display_manager->GetDisplayIdForUIScaling();
78 const DisplayInfo& display_info = display_manager->GetDisplayInfo(display_id); 78 const DisplayInfo& display_info = display_manager->GetDisplayInfo(display_id);
79 DisplayMode mode; 79 DisplayMode mode;
80 80
81 if (display_manager->IsInUnifiedMode()) { 81 if (display_manager->IsInUnifiedMode()) {
82 if (!GetDisplayModeForNextResolution(display_info, up, &mode)) 82 if (!GetDisplayModeForNextResolution(display_info, up, &mode))
83 return false; 83 return false;
84 } else { 84 } else {
85 if (!GetDisplayModeForNextUIScale(display_info, up, &mode)) 85 if (!GetDisplayModeForNextUIScale(display_info, up, &mode))
86 return false; 86 return false;
87 } 87 }
(...skipping 12 matching lines...) Expand all
100 std::find_if(modes.begin(), modes.end(), 100 std::find_if(modes.begin(), modes.end(),
101 [](const DisplayMode& mode) { return mode.native; }); 101 [](const DisplayMode& mode) { return mode.native; });
102 display_manager->SetDisplayMode(DisplayManager::kUnifiedDisplayId, *iter); 102 display_manager->SetDisplayMode(DisplayManager::kUnifiedDisplayId, *iter);
103 } else { 103 } else {
104 SetDisplayUIScale(display_manager->GetDisplayIdForUIScaling(), 1.0f); 104 SetDisplayUIScale(display_manager->GetDisplayIdForUIScaling(), 1.0f);
105 } 105 }
106 } 106 }
107 107
108 } // namespace accelerators 108 } // namespace accelerators
109 } // namespace ash 109 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/accelerators/accelerator_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698