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

Side by Side Diff: extensions/browser/api/system_display/display_info_provider.h

Issue 389633002: Move system.* family of APIs to extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Better comments Created 6 years, 5 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_SYSTEM_DISPLAY_DISPLAY_INFO_PROVIDER_H_ 5 #ifndef EXTENSIONS_BROWSER_API_SYSTEM_DISPLAY_DISPLAY_INFO_PROVIDER_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_SYSTEM_DISPLAY_DISPLAY_INFO_PROVIDER_H_ 6 #define EXTENSIONS_BROWSER_API_SYSTEM_DISPLAY_DISPLAY_INFO_PROVIDER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "chrome/common/extensions/api/system_display.h" 11 #include "extensions/common/api/system_display.h"
12 12
13 namespace gfx { 13 namespace gfx {
14 class Display; 14 class Display;
15 } 15 }
16 16
17 namespace extensions { 17 namespace extensions {
18 18
19 typedef std::vector<linked_ptr< 19 typedef std::vector<linked_ptr<
20 api::system_display::DisplayUnitInfo> > DisplayInfo; 20 core_api::system_display::DisplayUnitInfo> > DisplayInfo;
21 21
22 class DisplayInfoProvider { 22 class DisplayInfoProvider {
23 public : 23 public :
24 static DisplayInfoProvider* Get(); 24 static DisplayInfoProvider* Get();
25 25
26 DisplayInfoProvider(); 26 DisplayInfoProvider();
27 virtual ~DisplayInfoProvider(); 27 virtual ~DisplayInfoProvider();
28 28
29 // This is for tests that run in its own process (e.g. browser_tests). 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. 30 // Using this in other tests (e.g. unit_tests) will result in DCHECK failure.
31 static void InitializeForTesting(DisplayInfoProvider* display_info_provider); 31 static void InitializeForTesting(DisplayInfoProvider* display_info_provider);
32 32
33 DisplayInfo GetAllDisplaysInfo(); 33 DisplayInfo GetAllDisplaysInfo();
34 34
35 virtual bool SetInfo(const std::string& display_id, 35 virtual bool SetInfo(const std::string& display_id,
36 const api::system_display::DisplayProperties& info, 36 const core_api::system_display::DisplayProperties& info,
37 std::string* error); 37 std::string* error);
38 38
39 private: 39 private:
40 // Update the content of the |unit| obtained for |display| using 40 // Update the content of the |unit| obtained for |display| using
41 // platform specific method. 41 // platform specific method.
42 virtual void UpdateDisplayUnitInfoForPlatform( 42 virtual void UpdateDisplayUnitInfoForPlatform(
43 const gfx::Display& display, 43 const gfx::Display& display,
44 extensions::api::system_display::DisplayUnitInfo* unit); 44 extensions::core_api::system_display::DisplayUnitInfo* unit);
45 45
46 DISALLOW_COPY_AND_ASSIGN(DisplayInfoProvider); 46 DISALLOW_COPY_AND_ASSIGN(DisplayInfoProvider);
47 }; 47 };
48 48
49 } // namespace extensions 49 } // namespace extensions
50 50
51 #endif // CHROME_BROWSER_EXTENSIONS_API_SYSTEM_DISPLAY_DISPLAY_INFO_PROVIDER_H_ 51 #endif // EXTENSIONS_BROWSER_API_SYSTEM_DISPLAY_DISPLAY_INFO_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698