| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_UI_WINDOW_SIZER_WINDOW_SIZER_COMMON_UNITTEST_H_ | 5 #ifndef CHROME_BROWSER_UI_WINDOW_SIZER_WINDOW_SIZER_COMMON_UNITTEST_H_ |
| 6 #define CHROME_BROWSER_UI_WINDOW_SIZER_WINDOW_SIZER_COMMON_UNITTEST_H_ | 6 #define CHROME_BROWSER_UI_WINDOW_SIZER_WINDOW_SIZER_COMMON_UNITTEST_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 // window sizer test operations with a single call. | 87 // window sizer test operations with a single call. |
| 88 | 88 |
| 89 enum Source { DEFAULT, LAST_ACTIVE, PERSISTED, BOTH }; | 89 enum Source { DEFAULT, LAST_ACTIVE, PERSISTED, BOTH }; |
| 90 | 90 |
| 91 // Sets up the window bounds, monitor bounds, show states and more to get the | 91 // Sets up the window bounds, monitor bounds, show states and more to get the |
| 92 // resulting |out_bounds| and |out_show_state| from the WindowSizer. | 92 // resulting |out_bounds| and |out_show_state| from the WindowSizer. |
| 93 // |source| specifies which type of data gets set for the test: Either the | 93 // |source| specifies which type of data gets set for the test: Either the |
| 94 // last active window, the persisted value which was stored earlier, both or | 94 // last active window, the persisted value which was stored earlier, both or |
| 95 // none. For all these states the |bounds| and |work_area| get used, for the | 95 // none. For all these states the |bounds| and |work_area| get used, for the |
| 96 // show states either |show_state_persisted| or |show_state_last| will be used. | 96 // show states either |show_state_persisted| or |show_state_last| will be used. |
| 97 // |display_index| is the index of the display to return from |
| 98 // GetDisplayNearestWindow(), and is only used on aura. |
| 97 void GetWindowBoundsAndShowState(const gfx::Rect& monitor1_bounds, | 99 void GetWindowBoundsAndShowState(const gfx::Rect& monitor1_bounds, |
| 98 const gfx::Rect& monitor1_work_area, | 100 const gfx::Rect& monitor1_work_area, |
| 99 const gfx::Rect& monitor2_bounds, | 101 const gfx::Rect& monitor2_bounds, |
| 100 const gfx::Rect& bounds, | 102 const gfx::Rect& bounds, |
| 101 const gfx::Rect& work_area, | 103 const gfx::Rect& work_area, |
| 102 ui::WindowShowState show_state_persisted, | 104 ui::WindowShowState show_state_persisted, |
| 103 ui::WindowShowState show_state_last, | 105 ui::WindowShowState show_state_last, |
| 104 Source source, | 106 Source source, |
| 105 const Browser* browser, | 107 const Browser* browser, |
| 106 const gfx::Rect& passed_in, | 108 const gfx::Rect& passed_in, |
| 109 size_t display_index, |
| 107 gfx::Rect* out_bounds, | 110 gfx::Rect* out_bounds, |
| 108 ui::WindowShowState* out_show_state); | 111 ui::WindowShowState* out_show_state); |
| 109 | 112 |
| 110 // Sets up the window bounds, monitor bounds, and work area to get the | 113 // Sets up the window bounds, monitor bounds, and work area to get the |
| 111 // resulting |out_bounds| from the WindowSizer. | 114 // resulting |out_bounds| from the WindowSizer. |
| 112 // |source| specifies which type of data gets set for the test: Either the | 115 // |source| specifies which type of data gets set for the test: Either the |
| 113 // last active window, the persisted value which was stored earlier, both or | 116 // last active window, the persisted value which was stored earlier, both or |
| 114 // none. For all these states the |bounds| and |work_area| get used, for the | 117 // none. For all these states the |bounds| and |work_area| get used, for the |
| 115 // show states either |show_state_persisted| or |show_state_last| will be used. | 118 // show states either |show_state_persisted| or |show_state_last| will be used. |
| 116 void GetWindowBounds(const gfx::Rect& monitor1_bounds, | 119 void GetWindowBounds(const gfx::Rect& monitor1_bounds, |
| (...skipping 12 matching lines...) Expand all Loading... |
| 129 // |source|. The |display_config| is the primary display configuration used. | 132 // |source|. The |display_config| is the primary display configuration used. |
| 130 ui::WindowShowState GetWindowShowState( | 133 ui::WindowShowState GetWindowShowState( |
| 131 ui::WindowShowState show_state_persisted, | 134 ui::WindowShowState show_state_persisted, |
| 132 ui::WindowShowState show_state_last, | 135 ui::WindowShowState show_state_last, |
| 133 Source source, | 136 Source source, |
| 134 const Browser* browser, | 137 const Browser* browser, |
| 135 const gfx::Rect& bounds, | 138 const gfx::Rect& bounds, |
| 136 const gfx::Rect& display_config); | 139 const gfx::Rect& display_config); |
| 137 | 140 |
| 138 #endif // CHROME_BROWSER_UI_WINDOW_SIZER_WINDOW_SIZER_COMMON_UNITTEST_H_ | 141 #endif // CHROME_BROWSER_UI_WINDOW_SIZER_WINDOW_SIZER_COMMON_UNITTEST_H_ |
| OLD | NEW |