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

Side by Side Diff: ui/display/types/fake_display_controller.h

Issue 2340383002: Add FakeDisplaySnapshot builder and related changes. (Closed)
Patch Set: Fixes for comments. Created 4 years, 3 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
« no previous file with comments | « ui/display/fake_display_snapshot.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 UI_DISPLAY_TYPES_FAKE_DISPLAY_CONTROLLER_H_ 5 #ifndef UI_DISPLAY_TYPES_FAKE_DISPLAY_CONTROLLER_H_
6 #define UI_DISPLAY_TYPES_FAKE_DISPLAY_CONTROLLER_H_ 6 #define UI_DISPLAY_TYPES_FAKE_DISPLAY_CONTROLLER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory>
11
10 #include "ui/display/types/display_types_export.h" 12 #include "ui/display/types/display_types_export.h"
11 13
12 namespace gfx { 14 namespace gfx {
13 class Size; 15 class Size;
14 } 16 }
15 17
18 namespace ui {
19 class DisplaySnapshot;
20 }
21
16 namespace display { 22 namespace display {
17 23
18 // Controls the fake display state. Provided by the NativeDisplayDelegate if 24 // Controls the fake display state. Provided by the NativeDisplayDelegate if
19 // it is intended for use off device where there are no physical displays and 25 // it is intended for use off device where there are no physical displays and
20 // we need to fake the display state. 26 // we need to fake the display state.
21 class DISPLAY_TYPES_EXPORT FakeDisplayController { 27 class DISPLAY_TYPES_EXPORT FakeDisplayController {
22 public: 28 public:
23 // Adds a fake display with the specified size, returns the display id or 29 // Adds a fake display with the specified size, returns the display id or
24 // |kInvalidDisplayId| if it fails. 30 // |kInvalidDisplayId| if it fails.
25 virtual int64_t AddDisplay(const gfx::Size& display_size) = 0; 31 virtual int64_t AddDisplay(const gfx::Size& display_size) = 0;
26 32
33 // Adds |display| to the list of displays and returns true if successful. Will
34 // fail if an existing display has the same id as |display|.
35 virtual bool AddDisplay(std::unique_ptr<ui::DisplaySnapshot> display) = 0;
36
27 // Removes a fake display with specified id, returns true if successful. 37 // Removes a fake display with specified id, returns true if successful.
28 virtual bool RemoveDisplay(int64_t display_id) = 0; 38 virtual bool RemoveDisplay(int64_t display_id) = 0;
29 39
30 protected: 40 protected:
31 virtual ~FakeDisplayController() {} 41 virtual ~FakeDisplayController() {}
32 }; 42 };
33 43
34 } // namespace display 44 } // namespace display
35 45
36 #endif // UI_DISPLAY_TYPES_FAKE_DISPLAY_CONTROLLER_H_ 46 #endif // UI_DISPLAY_TYPES_FAKE_DISPLAY_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ui/display/fake_display_snapshot.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698