Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(407)

Side by Side Diff: ui/display/manager/display_manager.h

Issue 2573673003: Detect and fix overlapping displays (Closed)
Patch Set: Nits Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/display/display_layout.cc ('k') | ui/display/manager/display_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 UI_DISPLAY_MANAGER_DISPLAY_MANAGER_H_ 5 #ifndef UI_DISPLAY_MANAGER_DISPLAY_MANAGER_H_
6 #define UI_DISPLAY_MANAGER_DISPLAY_MANAGER_H_ 6 #define UI_DISPLAY_MANAGER_DISPLAY_MANAGER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 121
122 // Initialize default display. 122 // Initialize default display.
123 void InitDefaultDisplay(); 123 void InitDefaultDisplay();
124 124
125 // Initializes font related params that depends on display configuration. 125 // Initializes font related params that depends on display configuration.
126 void RefreshFontParams(); 126 void RefreshFontParams();
127 127
128 // Returns the display layout used for current displays. 128 // Returns the display layout used for current displays.
129 const DisplayLayout& GetCurrentDisplayLayout() const; 129 const DisplayLayout& GetCurrentDisplayLayout() const;
130 130
131 // Returns the actual display layout after it has been resolved and applied.
132 const DisplayLayout& GetCurrentResolvedDisplayLayout() const;
133
131 // Returns the current display list. 134 // Returns the current display list.
132 DisplayIdList GetCurrentDisplayIdList() const; 135 DisplayIdList GetCurrentDisplayIdList() const;
133 136
134 // Sets the layout for the current display pair. The |layout| specifies the 137 // Sets the layout for the current display pair. The |layout| specifies the
135 // locaion of the displays relative to their parents. 138 // locaion of the displays relative to their parents.
136 void SetLayoutForCurrentDisplays(std::unique_ptr<DisplayLayout> layout); 139 void SetLayoutForCurrentDisplays(std::unique_ptr<DisplayLayout> layout);
137 140
138 // Returns display for given |id|; 141 // Returns display for given |id|;
139 const Display& GetDisplayForId(int64_t id) const; 142 const Display& GetDisplayForId(int64_t id) const;
140 143
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 void UpdateNonPrimaryDisplayBoundsForLayout( 408 void UpdateNonPrimaryDisplayBoundsForLayout(
406 Displays* display_list, 409 Displays* display_list,
407 std::vector<size_t>* updated_indices); 410 std::vector<size_t>* updated_indices);
408 411
409 void CreateMirrorWindowIfAny(); 412 void CreateMirrorWindowIfAny();
410 413
411 void RunPendingTasksForTest(); 414 void RunPendingTasksForTest();
412 415
413 // Applies the |layout| and updates the bounds of displays in |display_list|. 416 // Applies the |layout| and updates the bounds of displays in |display_list|.
414 // |updated_ids| contains the ids for displays whose bounds have changed. 417 // |updated_ids| contains the ids for displays whose bounds have changed.
415 void ApplyDisplayLayout(const DisplayLayout& layout, 418 void ApplyDisplayLayout(DisplayLayout* layout,
416 Displays* display_list, 419 Displays* display_list,
417 std::vector<int64_t>* updated_ids); 420 std::vector<int64_t>* updated_ids);
418 421
419 Delegate* delegate_ = nullptr; // not owned. 422 Delegate* delegate_ = nullptr; // not owned.
420 423
421 // When set to true, DisplayManager will use DisplayConfigurator to configure 424 // When set to true, DisplayManager will use DisplayConfigurator to configure
422 // displays. By default, this is set to true when running on device and false 425 // displays. By default, this is set to true when running on device and false
423 // when running off device. 426 // when running off device.
424 bool configure_displays_ = false; 427 bool configure_displays_ = false;
425 428
426 std::unique_ptr<Screen> screen_; 429 std::unique_ptr<Screen> screen_;
427 430
428 std::unique_ptr<DisplayLayoutStore> layout_store_; 431 std::unique_ptr<DisplayLayoutStore> layout_store_;
429 432
433 std::unique_ptr<DisplayLayout> current_resolved_layout_;
434
430 int64_t first_display_id_ = kInvalidDisplayId; 435 int64_t first_display_id_ = kInvalidDisplayId;
431 436
432 // List of current active displays. 437 // List of current active displays.
433 Displays active_display_list_; 438 Displays active_display_list_;
434 // This list does not include the displays that will be removed if 439 // This list does not include the displays that will be removed if
435 // |UpdateDisplaysWith| is under execution. 440 // |UpdateDisplaysWith| is under execution.
436 // See https://crbug.com/632755 441 // See https://crbug.com/632755
437 Displays active_only_display_list_; 442 Displays active_only_display_list_;
438 443
439 // True if active_display_list is being modified and has displays that are not 444 // True if active_display_list is being modified and has displays that are not
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 base::ObserverList<DisplayObserver> observers_; 479 base::ObserverList<DisplayObserver> observers_;
475 480
476 base::WeakPtrFactory<DisplayManager> weak_ptr_factory_; 481 base::WeakPtrFactory<DisplayManager> weak_ptr_factory_;
477 482
478 DISALLOW_COPY_AND_ASSIGN(DisplayManager); 483 DISALLOW_COPY_AND_ASSIGN(DisplayManager);
479 }; 484 };
480 485
481 } // namespace display 486 } // namespace display
482 487
483 #endif // UI_DISPLAY_MANAGER_DISPLAY_MANAGER_H_ 488 #endif // UI_DISPLAY_MANAGER_DISPLAY_MANAGER_H_
OLDNEW
« no previous file with comments | « ui/display/display_layout.cc ('k') | ui/display/manager/display_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698