Make the ChromeOS session name more robust w.r.t. the device type.
[chromium-blink-merge.git] / ash / test / display_manager_test_api.h
blob6173655d207023e5c9ca6bb1f0926f52743cd88a
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;
18 namespace ui {
19 namespace test {
20 class EventGenerator;
24 namespace ash {
25 class DisplayManager;
27 namespace test {
29 class DisplayManagerTestApi {
30 public:
31 // Test if moving a mouse to |point_in_screen| warps it to another
32 // display.
33 static bool TestIfMouseWarpsAt(ui::test::EventGenerator& event_generator,
34 const gfx::Point& point_in_screen);
36 static void EnableUnifiedDesktopForTest();
38 explicit DisplayManagerTestApi(DisplayManager* display_manager);
39 virtual ~DisplayManagerTestApi();
41 // Update the display configuration as given in |display_specs|. The format of
42 // |display_spec| is a list of comma separated spec for each displays. Please
43 // refer to the comment in |ash::DisplayInfo::CreateFromSpec| for the format
44 // of the display spec.
45 void UpdateDisplay(const std::string& display_specs);
47 // Set the 1st display as an internal display and returns the display Id for
48 // the internal display.
49 int64 SetFirstDisplayAsInternalDisplay();
51 // Sets the display id for internal display and
52 // update the display mode list if necessary.
53 void SetInternalDisplayId(int64 id);
55 // Don't update the display when the root window's size was changed.
56 void DisableChangeDisplayUponHostResize();
58 // Sets the available color profiles for |display_id|.
59 void SetAvailableColorProfiles(
60 int64 display_id,
61 const std::vector<ui::ColorCalibrationProfile>& profiles);
63 private:
64 DisplayManager* display_manager_; // not owned
66 DISALLOW_COPY_AND_ASSIGN(DisplayManagerTestApi);
69 } // namespace test
70 } // namespace ash
72 #endif // ASH_TEST_DISPLAY_MANAGER_TEST_API_H_