| 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 ASH_SYSTEM_CHROMEOS_SCREEN_LAYOUT_OBSERVER_H_ | 5 #ifndef ASH_SYSTEM_CHROMEOS_SCREEN_LAYOUT_OBSERVER_H_ |
| 6 #define ASH_SYSTEM_CHROMEOS_SCREEN_LAYOUT_OBSERVER_H_ | 6 #define ASH_SYSTEM_CHROMEOS_SCREEN_LAYOUT_OBSERVER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 // previous data to |old_info| if it's not NULL. | 44 // previous data to |old_info| if it's not NULL. |
| 45 void UpdateDisplayInfo(DisplayInfoMap* old_info); | 45 void UpdateDisplayInfo(DisplayInfoMap* old_info); |
| 46 | 46 |
| 47 // Compares the current display settings with |old_info| and determine what | 47 // Compares the current display settings with |old_info| and determine what |
| 48 // message should be shown for notification. Returns true if there's a | 48 // message should be shown for notification. Returns true if there's a |
| 49 // meaningful change. Note that it's possible to return true and set | 49 // meaningful change. Note that it's possible to return true and set |
| 50 // |message_out| to empty, which means the notification should be removed. It | 50 // |message_out| to empty, which means the notification should be removed. It |
| 51 // also sets |additional_message_out| which appears in the notification with | 51 // also sets |additional_message_out| which appears in the notification with |
| 52 // the |message_out|. | 52 // the |message_out|. |
| 53 bool GetDisplayMessageForNotification(const DisplayInfoMap& old_info, | 53 bool GetDisplayMessageForNotification(const DisplayInfoMap& old_info, |
| 54 base::string16* message_out, | 54 base::string16* out_message, |
| 55 base::string16* additional_message_out); | 55 base::string16* out_additional_message); |
| 56 | 56 |
| 57 // Creates or updates the display notification. | 57 // Creates or updates the display notification. |
| 58 void CreateOrUpdateNotification(const base::string16& message, | 58 void CreateOrUpdateNotification(const base::string16& message, |
| 59 const base::string16& additional_message); | 59 const base::string16& additional_message); |
| 60 | 60 |
| 61 // Returns the notification message that should be shown when mirror display |
| 62 // mode is exited. |
| 63 bool GetExitMirrorModeMessage(base::string16* out_message, |
| 64 base::string16* out_additional_message); |
| 65 |
| 61 DisplayInfoMap display_info_; | 66 DisplayInfoMap display_info_; |
| 62 | 67 |
| 68 enum class DisplayMode { |
| 69 SINGLE, |
| 70 EXTENDED_2, // 2 displays in extended mode. |
| 71 EXTENDED_3_PLUS, // 3+ displays in extended mode. |
| 72 MIRRORING, |
| 73 UNIFIED, |
| 74 DOCKED |
| 75 }; |
| 76 |
| 77 DisplayMode old_display_mode_ = DisplayMode::SINGLE; |
| 78 DisplayMode current_display_mode_ = DisplayMode::SINGLE; |
| 79 |
| 63 bool show_notifications_for_testing = true; | 80 bool show_notifications_for_testing = true; |
| 64 | 81 |
| 65 DISALLOW_COPY_AND_ASSIGN(ScreenLayoutObserver); | 82 DISALLOW_COPY_AND_ASSIGN(ScreenLayoutObserver); |
| 66 }; | 83 }; |
| 67 | 84 |
| 68 } // namespace ash | 85 } // namespace ash |
| 69 | 86 |
| 70 #endif // ASH_SYSTEM_CHROMEOS_SCREEN_LAYOUT_OBSERVER_H_ | 87 #endif // ASH_SYSTEM_CHROMEOS_SCREEN_LAYOUT_OBSERVER_H_ |
| OLD | NEW |