Adding wrapper class WKBackForwardListItemHolder
[chromium-blink-merge.git] / ash / test / display_manager_test_api.h
blobb73e65d8fcfe48ef47755b97e0dbbb167fbc0ad8
1 // Copyright (c) 2012 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 ASH_TEST_DISPLAY_MANAGER_TEST_API_H_
6 #define ASH_TEST_DISPLAY_MANAGER_TEST_API_H_
8 #include <string>
9 #include <vector>
11 #include "base/basictypes.h"
12 #include "ui/display/types/display_constants.h"
14 namespace gfx {
15 class Point;
16 class Size;
19 namespace ui {
20 namespace test {
21 class EventGenerator;
25 namespace ash {
26 class DisplayManager;
28 namespace test {
30 class DisplayManagerTestApi {
31 public:
32 // Test if moving a mouse to |point_in_screen| warps it to another
33 // display.
34 static bool TestIfMouseWarpsAt(ui::test::EventGenerator& event_generator,
35 const gfx::Point& point_in_screen);
37 static void EnableUnifiedDesktopForTest();
39 DisplayManagerTestApi();
40 virtual ~DisplayManagerTestApi();
42 // Update the display configuration as given in |display_specs|. The format of
43 // |display_spec| is a list of comma separated spec for each displays. Please
44 // refer to the comment in |ash::DisplayInfo::CreateFromSpec| for the format
45 // of the display spec.
46 void UpdateDisplay(const std::string& display_specs);
48 // Set the 1st display as an internal display and returns the display Id for
49 // the internal display.
50 int64 SetFirstDisplayAsInternalDisplay();
52 // Don't update the display when the root window's size was changed.
53 void DisableChangeDisplayUponHostResize();
55 // Sets the available color profiles for |display_id|.
56 void SetAvailableColorProfiles(
57 int64 display_id,
58 const std::vector<ui::ColorCalibrationProfile>& profiles);
60 private:
61 friend class ScopedSetInternalDisplayId;
62 // Sets the display id for internal display and
63 // update the display mode list if necessary.
64 void SetInternalDisplayId(int64 id);
66 DisplayManager* display_manager_; // not owned
68 DISALLOW_COPY_AND_ASSIGN(DisplayManagerTestApi);
71 class ScopedDisable125DSFForUIScaling {
72 public:
73 ScopedDisable125DSFForUIScaling();
74 ~ScopedDisable125DSFForUIScaling();
76 private:
77 DISALLOW_COPY_AND_ASSIGN(ScopedDisable125DSFForUIScaling);
80 class ScopedSetInternalDisplayId {
81 public:
82 ScopedSetInternalDisplayId(int64 id);
83 ~ScopedSetInternalDisplayId();
85 private:
86 DISALLOW_COPY_AND_ASSIGN(ScopedSetInternalDisplayId);
89 // Sets the display mode that matches the |resolution| for |display_id|.
90 bool SetDisplayResolution(int64 display_id, const gfx::Size& resolution);
92 } // namespace test
93 } // namespace ash
95 #endif // ASH_TEST_DISPLAY_MANAGER_TEST_API_H_