Cast: Stop logging kVideoFrameSentToEncoder and rename a couple events.
[chromium-blink-merge.git] / chrome / browser / extensions / api / system_display / display_info_provider.h
blob50eec2e0d1484401959ee65922f0fbdbbac4f27c
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_
8 #include <string>
9 #include <vector>
11 #include "chrome/common/extensions/api/system_display.h"
13 namespace gfx {
14 class Display;
17 namespace extensions {
19 typedef std::vector<linked_ptr<
20 api::system_display::DisplayUnitInfo> > DisplayInfo;
22 class DisplayInfoProvider {
23 public :
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,
37 std::string* error);
39 private:
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_