| Index: ash/touch/touchscreen_util.cc
|
| diff --git a/ash/touch/touchscreen_util.cc b/ash/touch/touchscreen_util.cc
|
| index 88df3dd38a3f82df3ab4a0c9a545fbdca25ced01..f99ad42f584ef8277746b41ff78b07d6b51be619 100644
|
| --- a/ash/touch/touchscreen_util.cc
|
| +++ b/ash/touch/touchscreen_util.cc
|
| @@ -15,11 +15,11 @@ namespace ash {
|
|
|
| namespace {
|
|
|
| -using DisplayInfoList = std::vector<DisplayInfo*>;
|
| +using DisplayInfoList = std::vector<ui::DisplayInfo*>;
|
| using DeviceList = std::vector<const ui::TouchscreenDevice*>;
|
|
|
| // Helper method to associate |display| and |device|.
|
| -void Associate(DisplayInfo* display, const ui::TouchscreenDevice* device) {
|
| +void Associate(ui::DisplayInfo* display, const ui::TouchscreenDevice* device) {
|
| display->AddInputDevice(device->id);
|
| display->set_touch_support(display::Display::TOUCH_SUPPORT_AVAILABLE);
|
| }
|
| @@ -40,7 +40,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(DisplayInfo* display,
|
| +int GetUdlAssociationScore(ui::DisplayInfo* display,
|
| const ui::TouchscreenDevice* device) {
|
| // If the devices are not both connected via USB, then there cannot be a UDL
|
| // association score.
|
| @@ -66,7 +66,7 @@ int GetUdlAssociationScore(DisplayInfo* display,
|
|
|
| // Tries to find a UDL device that best matches |display|. Returns nullptr
|
| // if one is not found.
|
| -const ui::TouchscreenDevice* GuessBestUdlDevice(DisplayInfo* display,
|
| +const ui::TouchscreenDevice* GuessBestUdlDevice(ui::DisplayInfo* display,
|
| const DeviceList& devices) {
|
| int best_score = 0;
|
| const ui::TouchscreenDevice* best_device = nullptr;
|
| @@ -88,7 +88,7 @@ void AssociateUdlDevices(DisplayInfoList* displays, DeviceList* devices) {
|
|
|
| DisplayInfoList::iterator display_it = displays->begin();
|
| while (display_it != displays->end()) {
|
| - DisplayInfo* display = *display_it;
|
| + ui::DisplayInfo* display = *display_it;
|
| const ui::TouchscreenDevice* device = GuessBestUdlDevice(display, *devices);
|
|
|
| if (device) {
|
| @@ -108,7 +108,7 @@ void AssociateUdlDevices(DisplayInfoList* displays, DeviceList* devices) {
|
| }
|
|
|
| // Returns true if |display| is internal.
|
| -bool IsInternalDisplay(DisplayInfo* display) {
|
| +bool IsInternalDisplay(ui::DisplayInfo* display) {
|
| return display::Display::IsInternalDisplayId(display->id());
|
| }
|
|
|
| @@ -130,7 +130,7 @@ void AssociateInternalDevices(DisplayInfoList* displays, DeviceList* devices) {
|
| // associated with an external device.
|
|
|
| // Capture the internal display reference as we remove it from |displays|.
|
| - DisplayInfo* internal_display = nullptr;
|
| + ui::DisplayInfo* internal_display = nullptr;
|
| DisplayInfoList::iterator display_it =
|
| std::find_if(displays->begin(), displays->end(), &IsInternalDisplay);
|
| if (display_it != displays->end()) {
|
| @@ -175,7 +175,7 @@ void AssociateSameSizeDevices(DisplayInfoList* displays, DeviceList* devices) {
|
|
|
| DisplayInfoList::iterator display_it = displays->begin();
|
| while (display_it != displays->end()) {
|
| - DisplayInfo* display = *display_it;
|
| + ui::DisplayInfo* display = *display_it;
|
| const gfx::Size native_size = display->GetNativeModeSize();
|
|
|
| // Try to find an input device with roughly the same size as the display.
|
| @@ -219,7 +219,7 @@ void AssociateToSingleDisplay(DisplayInfoList* displays, DeviceList* devices) {
|
| if (displays->size() != 1 || devices->size() == 0)
|
| return;
|
|
|
| - DisplayInfo* display = *displays->begin();
|
| + ui::DisplayInfo* display = *displays->begin();
|
| for (const ui::TouchscreenDevice* device : *devices) {
|
| VLOG(2) << "=> Matched device " << device->name << " to display "
|
| << display->name();
|
| @@ -233,7 +233,7 @@ void AssociateToSingleDisplay(DisplayInfoList* displays, DeviceList* devices) {
|
| } // namespace
|
|
|
| void AssociateTouchscreens(
|
| - std::vector<DisplayInfo>* all_displays,
|
| + std::vector<ui::DisplayInfo>* all_displays,
|
| const std::vector<ui::TouchscreenDevice>& all_devices) {
|
| // |displays| and |devices| contain pointers directly to the values stored
|
| // inside of |all_displays| and |all_devices|. When a display or input device
|
| @@ -241,7 +241,7 @@ void AssociateTouchscreens(
|
|
|
| // Construct our initial set of display/devices that we will process.
|
| DisplayInfoList displays;
|
| - for (DisplayInfo& display : *all_displays) {
|
| + for (ui::DisplayInfo& display : *all_displays) {
|
| display.ClearInputDevices();
|
|
|
| if (display.GetNativeModeSize().IsEmpty()) {
|
| @@ -257,7 +257,7 @@ void AssociateTouchscreens(
|
| for (const ui::TouchscreenDevice& device : all_devices)
|
| devices.push_back(&device);
|
|
|
| - for (const DisplayInfo* display : displays) {
|
| + for (const ui::DisplayInfo* display : displays) {
|
| VLOG(2) << "Received display " << display->name()
|
| << " (size: " << display->GetNativeModeSize().ToString()
|
| << ", sys_path: " << display->sys_path().LossyDisplayName() << ")";
|
| @@ -273,7 +273,7 @@ void AssociateTouchscreens(
|
| AssociateSameSizeDevices(&displays, &devices);
|
| AssociateToSingleDisplay(&displays, &devices);
|
|
|
| - for (const DisplayInfo* display : displays)
|
| + for (const ui::DisplayInfo* display : displays)
|
| LOG(WARNING) << "Unmatched display " << display->name();
|
| for (const ui::TouchscreenDevice* device : devices)
|
| LOG(WARNING) << "Unmatched device " << device->name;
|
|
|