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

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

Issue 2476663003: PlatformScreenOzone using DisplayManager (Closed)
Patch Set: Cleanup. Created 4 years 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
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 DisplayLayoutStore* layout_store() { return layout_store_.get(); } 101 DisplayLayoutStore* layout_store() { return layout_store_.get(); }
102 102
103 void set_delegate(Delegate* delegate) { delegate_ = delegate; } 103 void set_delegate(Delegate* delegate) { delegate_ = delegate; }
104 104
105 // When set to true, the DisplayManager calls OnDisplayMetricsChanged even if 105 // When set to true, the DisplayManager calls OnDisplayMetricsChanged even if
106 // the display's bounds didn't change. Used to swap primary display. 106 // the display's bounds didn't change. Used to swap primary display.
107 void set_force_bounds_changed(bool force_bounds_changed) { 107 void set_force_bounds_changed(bool force_bounds_changed) {
108 force_bounds_changed_ = force_bounds_changed; 108 force_bounds_changed_ = force_bounds_changed;
109 } 109 }
110 110
111 // When set to true, DisplayManager will use DisplayConfigurator to configure
msw 2016/12/19 20:02:52 nit: It's nice to have one clear comment on the me
kylechar 2016/12/20 15:19:46 Good point. Odds are both the setter/member variab
112 // displays.
113 void set_configure_displays(bool configure_displays) {
114 configure_displays_ = configure_displays;
115 }
116
111 // Returns the display id of the first display in the outupt list. 117 // Returns the display id of the first display in the outupt list.
112 int64_t first_display_id() const { return first_display_id_; } 118 int64_t first_display_id() const { return first_display_id_; }
113 119
114 // Initializes displays using command line flag. Returns false if no command 120 // Initializes displays using command line flag. Returns false if no command
115 // line flag was provided. 121 // line flag was provided.
116 bool InitFromCommandLine(); 122 bool InitFromCommandLine();
117 123
118 // Initialize default display. 124 // Initialize default display.
119 void InitDefaultDisplay(); 125 void InitDefaultDisplay();
120 126
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 void RunPendingTasksForTest(); 413 void RunPendingTasksForTest();
408 414
409 // Applies the |layout| and updates the bounds of displays in |display_list|. 415 // Applies the |layout| and updates the bounds of displays in |display_list|.
410 // |updated_ids| contains the ids for displays whose bounds have changed. 416 // |updated_ids| contains the ids for displays whose bounds have changed.
411 void ApplyDisplayLayout(const DisplayLayout& layout, 417 void ApplyDisplayLayout(const DisplayLayout& layout,
412 Displays* display_list, 418 Displays* display_list,
413 std::vector<int64_t>* updated_ids); 419 std::vector<int64_t>* updated_ids);
414 420
415 Delegate* delegate_ = nullptr; // not owned. 421 Delegate* delegate_ = nullptr; // not owned.
416 422
423 // When set to true, DisplayManager will use DisplayConfigurator to configure
424 // displays. By default, this is set to true when running on device and false
425 // when running off device.
426 bool configure_displays_;
427
417 std::unique_ptr<Screen> screen_; 428 std::unique_ptr<Screen> screen_;
418 429
419 std::unique_ptr<DisplayLayoutStore> layout_store_; 430 std::unique_ptr<DisplayLayoutStore> layout_store_;
420 431
421 int64_t first_display_id_ = kInvalidDisplayId; 432 int64_t first_display_id_ = kInvalidDisplayId;
422 433
423 // List of current active displays. 434 // List of current active displays.
424 Displays active_display_list_; 435 Displays active_display_list_;
425 // This list does not include the displays that will be removed if 436 // This list does not include the displays that will be removed if
426 // |UpdateDisplaysWith| is under execution. 437 // |UpdateDisplaysWith| is under execution.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 base::ObserverList<DisplayObserver> observers_; 476 base::ObserverList<DisplayObserver> observers_;
466 477
467 base::WeakPtrFactory<DisplayManager> weak_ptr_factory_; 478 base::WeakPtrFactory<DisplayManager> weak_ptr_factory_;
468 479
469 DISALLOW_COPY_AND_ASSIGN(DisplayManager); 480 DISALLOW_COPY_AND_ASSIGN(DisplayManager);
470 }; 481 };
471 482
472 } // namespace display 483 } // namespace display
473 484
474 #endif // UI_DISPLAY_MANAGER_DISPLAY_MANAGER_H_ 485 #endif // UI_DISPLAY_MANAGER_DISPLAY_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698