| 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_DISPLAY_DISPLAY_MANAGER_H_ | 5 #ifndef ASH_DISPLAY_DISPLAY_MANAGER_H_ |
| 6 #define ASH_DISPLAY_DISPLAY_MANAGER_H_ | 6 #define ASH_DISPLAY_DISPLAY_MANAGER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 { | 58 { |
| 59 public: | 59 public: |
| 60 class ASH_EXPORT Delegate { | 60 class ASH_EXPORT Delegate { |
| 61 public: | 61 public: |
| 62 virtual ~Delegate() {} | 62 virtual ~Delegate() {} |
| 63 | 63 |
| 64 // Create or updates the mirroring window with |display_info_list|. | 64 // Create or updates the mirroring window with |display_info_list|. |
| 65 virtual void CreateOrUpdateMirroringDisplay( | 65 virtual void CreateOrUpdateMirroringDisplay( |
| 66 const DisplayInfoList& display_info_list) = 0; | 66 const DisplayInfoList& display_info_list) = 0; |
| 67 | 67 |
| 68 // Closes the mirror window if exists. | 68 // Closes the mirror window if not necessary. |
| 69 virtual void CloseMirroringDisplay() = 0; | 69 virtual void CloseMirroringDisplayIfNotNecessary() = 0; |
| 70 | 70 |
| 71 // Called before and after the display configuration changes. | 71 // Called before and after the display configuration changes. |
| 72 // When |clear_focus| is true, the implementation should | 72 // When |clear_focus| is true, the implementation should |
| 73 // deactivate the active window and set the focus window to NULL. | 73 // deactivate the active window and set the focus window to NULL. |
| 74 virtual void PreDisplayConfigurationChange(bool clear_focus) = 0; | 74 virtual void PreDisplayConfigurationChange(bool clear_focus) = 0; |
| 75 virtual void PostDisplayConfigurationChange() = 0; | 75 virtual void PostDisplayConfigurationChange() = 0; |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 typedef std::vector<gfx::Display> DisplayList; | 78 typedef std::vector<gfx::Display> DisplayList; |
| 79 | 79 |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 bool software_mirroring_enabled() const { | 336 bool software_mirroring_enabled() const { |
| 337 return multi_display_mode_ == MIRRORING; | 337 return multi_display_mode_ == MIRRORING; |
| 338 }; | 338 }; |
| 339 | 339 |
| 340 void set_change_display_upon_host_resize(bool value) { | 340 void set_change_display_upon_host_resize(bool value) { |
| 341 change_display_upon_host_resize_ = value; | 341 change_display_upon_host_resize_ = value; |
| 342 } | 342 } |
| 343 | 343 |
| 344 // Creates software mirroring display related information. The display | 344 // Creates software mirroring display related information. The display |
| 345 // used to mirror the content is removed from the |display_info_list|. | 345 // used to mirror the content is removed from the |display_info_list|. |
| 346 void CreateSoftwareMirroringDisplay(DisplayInfoList* display_info_list); | 346 void CreateSoftwareMirroringDisplayInfo(DisplayInfoList* display_info_list); |
| 347 | 347 |
| 348 gfx::Display* FindDisplayForId(int64 id); | 348 gfx::Display* FindDisplayForId(int64 id); |
| 349 | 349 |
| 350 // Add the mirror display's display info if the software based | 350 // Add the mirror display's display info if the software based |
| 351 // mirroring is in use. | 351 // mirroring is in use. |
| 352 void AddMirrorDisplayInfoIfAny(DisplayInfoList* display_info_list); | 352 void AddMirrorDisplayInfoIfAny(DisplayInfoList* display_info_list); |
| 353 | 353 |
| 354 // Inserts and update the DisplayInfo according to the overscan | 354 // Inserts and update the DisplayInfo according to the overscan |
| 355 // state. Note that The DisplayInfo stored in the |internal_display_info_| | 355 // state. Note that The DisplayInfo stored in the |internal_display_info_| |
| 356 // can be different from |new_info| (due to overscan state), so | 356 // can be different from |new_info| (due to overscan state), so |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 gfx::Display::Rotation registered_internal_display_rotation_; | 424 gfx::Display::Rotation registered_internal_display_rotation_; |
| 425 | 425 |
| 426 base::WeakPtrFactory<DisplayManager> weak_ptr_factory_; | 426 base::WeakPtrFactory<DisplayManager> weak_ptr_factory_; |
| 427 | 427 |
| 428 DISALLOW_COPY_AND_ASSIGN(DisplayManager); | 428 DISALLOW_COPY_AND_ASSIGN(DisplayManager); |
| 429 }; | 429 }; |
| 430 | 430 |
| 431 } // namespace ash | 431 } // namespace ash |
| 432 | 432 |
| 433 #endif // ASH_DISPLAY_DISPLAY_MANAGER_H_ | 433 #endif // ASH_DISPLAY_DISPLAY_MANAGER_H_ |
| OLD | NEW |