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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_SYSTEM_DISPLAY_DISPLAY_INFO_PROVIDER_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_SYSTEM_DISPLAY_DISPLAY_INFO_PROVIDER_H_
11 #include "chrome/common/extensions/api/system_display.h"
17 namespace extensions
{
19 typedef std::vector
<linked_ptr
<
20 api::system_display::DisplayUnitInfo
> > DisplayInfo
;
22 class DisplayInfoProvider
{
24 static DisplayInfoProvider
* Get();
26 DisplayInfoProvider();
27 virtual ~DisplayInfoProvider();
29 // This is for tests that run in its own process (e.g. browser_tests).
30 // Using this in other tests (e.g. unit_tests) will result in DCHECK failure.
31 static void InitializeForTesting(DisplayInfoProvider
* display_info_provider
);
33 DisplayInfo
GetAllDisplaysInfo();
35 virtual bool SetInfo(const std::string
& display_id
,
36 const api::system_display::DisplayProperties
& info
,
40 // Update the content of the |unit| obtained for |display| using
41 // platform specific method.
42 virtual void UpdateDisplayUnitInfoForPlatform(
43 const gfx::Display
& display
,
44 extensions::api::system_display::DisplayUnitInfo
* unit
);
46 DISALLOW_COPY_AND_ASSIGN(DisplayInfoProvider
);
49 } // namespace extensions
51 #endif // CHROME_BROWSER_EXTENSIONS_API_SYSTEM_DISPLAY_DISPLAY_INFO_PROVIDER_H_