| // Copyright 2015 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| [DartPackage="mojo_services"] |
| module mojo; |
| |
| // A service to expose device specific information. |
| // All operations are stateless. |
| interface DeviceInfo { |
| // The device type this service is running on. It can be a function of things |
| // like whether there's an attached screen and its size, etc. |
| enum DeviceType { |
| UNKNOWN, |
| HEADLESS, // No attached display. Useful in tests. |
| WATCH, // Display smaller than 3.5". |
| PHONE, // Display smaller than 6.5" and larger than 3.5". |
| TABLET, // Display smaller than 10.5" and larger than 6.5". |
| |
| // Anything with a display larger than 10.5" with an attached keyboard. |
| DESKTOP, |
| |
| // Anything with a display larger than 10.5" without an attached keyboard. |
| TV, |
| }; |
| GetDeviceType() => (DeviceType device_type); |
| }; |