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

Unified Diff: ash/touch/touchscreen_util.cc

Issue 2480203002: ui: Cleanup class/struct forward declarations (Closed)
Patch Set: Sync CL to position 430550 Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/mus/window_manager.cc ('k') | base/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/touch/touchscreen_util.cc
diff --git a/ash/touch/touchscreen_util.cc b/ash/touch/touchscreen_util.cc
index 5e487d12d8db5c1f219eed9759b5a105a5028eef..73a202355e93637d14c5a70d0eff59e2f9af67eb 100644
--- a/ash/touch/touchscreen_util.cc
+++ b/ash/touch/touchscreen_util.cc
@@ -30,7 +30,7 @@ bool IsDeviceConnectedViaUsb(const base::FilePath& path) {
std::vector<base::FilePath::StringType> components;
path.GetComponents(&components);
- for (base::FilePath::StringType component : components) {
+ for (const auto& component : components) {
if (base::StartsWith(component, "usb",
base::CompareCase::INSENSITIVE_ASCII))
return true;
@@ -41,7 +41,7 @@ bool IsDeviceConnectedViaUsb(const base::FilePath& path) {
// Returns the UDL association score between |display| and |device|. A score <=
// 0 means that there is no association.
-int GetUdlAssociationScore(display::ManagedDisplayInfo* display,
+int GetUdlAssociationScore(const display::ManagedDisplayInfo* display,
const ui::TouchscreenDevice* device) {
// If the devices are not both connected via USB, then there cannot be a UDL
// association score.
@@ -68,7 +68,7 @@ int GetUdlAssociationScore(display::ManagedDisplayInfo* display,
// Tries to find a UDL device that best matches |display|. Returns nullptr
// if one is not found.
const ui::TouchscreenDevice* GuessBestUdlDevice(
- display::ManagedDisplayInfo* display,
+ const display::ManagedDisplayInfo* display,
const DeviceList& devices) {
int best_score = 0;
const ui::TouchscreenDevice* best_device = nullptr;
@@ -110,7 +110,7 @@ void AssociateUdlDevices(DisplayInfoList* displays, DeviceList* devices) {
}
// Returns true if |display| is internal.
-bool IsInternalDisplay(display::ManagedDisplayInfo* display) {
+bool IsInternalDisplay(const display::ManagedDisplayInfo* display) {
return display::Display::IsInternalDisplayId(display->id());
}
@@ -218,7 +218,7 @@ void AssociateToSingleDisplay(DisplayInfoList* displays, DeviceList* devices) {
<< " displays and " << devices->size() << " devices to match)";
// We only associate to one display.
- if (displays->size() != 1 || devices->size() == 0)
+ if (displays->size() != 1 || devices->empty())
return;
display::ManagedDisplayInfo* display = *displays->begin();
« no previous file with comments | « ash/mus/window_manager.cc ('k') | base/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698