Chromium Code Reviews| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 230 // Returns the display at |index|. The display at 0 is | 230 // Returns the display at |index|. The display at 0 is |
| 231 // no longer considered "primary". | 231 // no longer considered "primary". |
| 232 const display::Display& GetDisplayAt(size_t index) const; | 232 const display::Display& GetDisplayAt(size_t index) const; |
| 233 | 233 |
| 234 const display::Display& GetPrimaryDisplayCandidate() const; | 234 const display::Display& GetPrimaryDisplayCandidate() const; |
| 235 | 235 |
| 236 // Returns the logical number of displays. This returns 1 | 236 // Returns the logical number of displays. This returns 1 |
| 237 // when displays are mirrored. | 237 // when displays are mirrored. |
| 238 size_t GetNumDisplays() const; | 238 size_t GetNumDisplays() const; |
| 239 | 239 |
| 240 // Returns only the currently active displays. This list does not include the | |
| 241 // displays that will be removed if |UpdateDisplaysWith| is currently | |
| 242 // executing. | |
| 243 // See https://crbug.com/632755 | |
| 244 const display::DisplayList& active_only_display_list() const { | |
| 245 return is_updating_display_list_ ? active_only_display_list_ | |
| 246 : active_display_list(); | |
| 247 } | |
| 248 | |
| 240 const display::DisplayList& active_display_list() const { | 249 const display::DisplayList& active_display_list() const { |
| 241 return active_display_list_; | 250 return active_display_list_; |
| 242 } | 251 } |
| 243 | 252 |
| 244 // Returns true if the display specified by |display_id| is currently | 253 // Returns true if the display specified by |display_id| is currently |
| 245 // connected and active. (mirroring display isn't active, for example). | 254 // connected and active. (mirroring display isn't active, for example). |
| 246 bool IsActiveDisplayId(int64_t display_id) const; | 255 bool IsActiveDisplayId(int64_t display_id) const; |
| 247 | 256 |
| 248 // Returns the number of connected displays. This returns 2 | 257 // Returns the number of connected displays. This returns 2 |
| 249 // when displays are mirrored. | 258 // when displays are mirrored. |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 405 Delegate* delegate_; // not owned. | 414 Delegate* delegate_; // not owned. |
| 406 | 415 |
| 407 std::unique_ptr<ScreenAsh> screen_; | 416 std::unique_ptr<ScreenAsh> screen_; |
| 408 | 417 |
| 409 std::unique_ptr<DisplayLayoutStore> layout_store_; | 418 std::unique_ptr<DisplayLayoutStore> layout_store_; |
| 410 | 419 |
| 411 int64_t first_display_id_; | 420 int64_t first_display_id_; |
| 412 | 421 |
| 413 // List of current active displays. | 422 // List of current active displays. |
| 414 display::DisplayList active_display_list_; | 423 display::DisplayList active_display_list_; |
| 424 // This list does not include the displays that will be removed if | |
| 425 // |UpdateDisplaysWith| is under execution. | |
| 426 // See https://crbug.com/632755 | |
| 427 display::DisplayList active_only_display_list_; | |
| 428 | |
| 429 // True if active_display_list is being modified and has displays that are not | |
| 430 // presently active. | |
| 431 // See https://crbug.com/632755 | |
| 432 bool is_updating_display_list_; | |
|
oshima
2016/08/17 01:21:08
nit: = false;
| |
| 415 | 433 |
| 416 int num_connected_displays_; | 434 int num_connected_displays_; |
| 417 | 435 |
| 418 bool force_bounds_changed_; | 436 bool force_bounds_changed_; |
| 419 | 437 |
| 420 // The mapping from the display ID to its internal data. | 438 // The mapping from the display ID to its internal data. |
| 421 std::map<int64_t, DisplayInfo> display_info_; | 439 std::map<int64_t, DisplayInfo> display_info_; |
| 422 | 440 |
| 423 // Selected display modes for displays. Key is the displays' ID. | 441 // Selected display modes for displays. Key is the displays' ID. |
| 424 std::map<int64_t, scoped_refptr<DisplayMode>> display_modes_; | 442 std::map<int64_t, scoped_refptr<DisplayMode>> display_modes_; |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 445 bool unified_desktop_enabled_; | 463 bool unified_desktop_enabled_; |
| 446 | 464 |
| 447 base::WeakPtrFactory<DisplayManager> weak_ptr_factory_; | 465 base::WeakPtrFactory<DisplayManager> weak_ptr_factory_; |
| 448 | 466 |
| 449 DISALLOW_COPY_AND_ASSIGN(DisplayManager); | 467 DISALLOW_COPY_AND_ASSIGN(DisplayManager); |
| 450 }; | 468 }; |
| 451 | 469 |
| 452 } // namespace ash | 470 } // namespace ash |
| 453 | 471 |
| 454 #endif // ASH_DISPLAY_DISPLAY_MANAGER_H_ | 472 #endif // ASH_DISPLAY_DISPLAY_MANAGER_H_ |
| OLD | NEW |