| OLD | NEW |
| 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 ASH_DISPLAY_DISPLAY_LAYOUT_STORE_H_ | 5 #ifndef ASH_DISPLAY_DISPLAY_LAYOUT_STORE_H_ |
| 6 #define ASH_DISPLAY_DISPLAY_LAYOUT_STORE_H_ | 6 #define ASH_DISPLAY_DISPLAY_LAYOUT_STORE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // If no layout is registered, it creatas new layout using | 30 // If no layout is registered, it creatas new layout using |
| 31 // |default_display_layout_|. | 31 // |default_display_layout_|. |
| 32 DisplayLayout GetRegisteredDisplayLayout(const DisplayIdPair& pair); | 32 DisplayLayout GetRegisteredDisplayLayout(const DisplayIdPair& pair); |
| 33 | 33 |
| 34 // Returns the display layout for the display id pair | 34 // Returns the display layout for the display id pair |
| 35 // with display swapping applied. That is, this returns | 35 // with display swapping applied. That is, this returns |
| 36 // flipped layout if the displays are swapped. | 36 // flipped layout if the displays are swapped. |
| 37 DisplayLayout ComputeDisplayLayoutForDisplayIdPair( | 37 DisplayLayout ComputeDisplayLayoutForDisplayIdPair( |
| 38 const DisplayIdPair& display_pair); | 38 const DisplayIdPair& display_pair); |
| 39 | 39 |
| 40 // Update the mirrored flag in the display layout for | 40 // Update the multi display state in the display layout for |
| 41 // |display_pair|. This creates new display layout if no layout is | 41 // |display_pair|. This creates new display layout if no layout is |
| 42 // registered for |display_pair|. | 42 // registered for |display_pair|. |
| 43 void UpdateMirrorStatus(const DisplayIdPair& display_pair, | 43 void UpdateMultiDisplayState(const DisplayIdPair& display_pair, |
| 44 bool mirrored); | 44 bool mirrored, |
| 45 bool default_unified); |
| 45 | 46 |
| 46 // Update the |primary_id| in the display layout for | 47 // Update the |primary_id| in the display layout for |
| 47 // |display_pair|. This creates new display layout if no layout is | 48 // |display_pair|. This creates new display layout if no layout is |
| 48 // registered for |display_pair|. | 49 // registered for |display_pair|. |
| 49 void UpdatePrimaryDisplayId(const DisplayIdPair& display_pair, | 50 void UpdatePrimaryDisplayId(const DisplayIdPair& display_pair, |
| 50 int64 display_id); | 51 int64 display_id); |
| 51 | 52 |
| 52 private: | 53 private: |
| 53 // Creates new layout for display pair from |default_display_layout_|. | 54 // Creates new layout for display pair from |default_display_layout_|. |
| 54 DisplayLayout CreateDisplayLayout(const DisplayIdPair& display_pair); | 55 DisplayLayout CreateDisplayLayout(const DisplayIdPair& display_pair); |
| 55 | 56 |
| 56 // The default display layout. | 57 // The default display layout. |
| 57 DisplayLayout default_display_layout_; | 58 DisplayLayout default_display_layout_; |
| 58 | 59 |
| 59 // Display layout per pair of devices. | 60 // Display layout per pair of devices. |
| 60 std::map<DisplayIdPair, DisplayLayout> paired_layouts_; | 61 std::map<DisplayIdPair, DisplayLayout> paired_layouts_; |
| 61 | 62 |
| 62 DISALLOW_COPY_AND_ASSIGN(DisplayLayoutStore); | 63 DISALLOW_COPY_AND_ASSIGN(DisplayLayoutStore); |
| 63 }; | 64 }; |
| 64 | 65 |
| 65 } // namespace ash | 66 } // namespace ash |
| 66 | 67 |
| 67 #endif // ASH_DISPLAY_DISPLAY_LAYOUT_STORE_H_ | 68 #endif // ASH_DISPLAY_DISPLAY_LAYOUT_STORE_H_ |
| OLD | NEW |